freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] CFF in OpenType is SID to CID mapping correct?


From: Boris Letocha
Subject: [ft-devel] CFF in OpenType is SID to CID mapping correct?
Date: Sun, 26 Jul 2009 22:26:27 +0200

Hi,

I got strange Japanese font Hiragino Mincho ProN. With this head table (part 
only):
  'head' version:      1.0
  fontRevision:        8.0
  checkSumAdjustment:  0x89D296A4
  magicNumber:         0x5F0F3CF5
  flags:               0x0083- baseline(y)=0 - lsb(x)=0 
  unitsPerEm:          1000
  created:             Fri Aug 10 05:04:48 2007
  modified:            Fri Aug 10 05:04:48 2007
  xMin:                -349
  yMin:                -297
  xMax:                1165
  yMax:                1229

It is OpenType font with embeded CFF. It has Adobe Japan1 encoding so it is not 
0xFFFF where FreeType switching off SID to CID mapping. Problem is that its 
CMAP table looks like transform to CIDs directly. And because last 8 glyphs had 
different SIDs from CIDs these does not "work" (shows undefined character 
instead).
Unicode -> correct CID - this is also in this CMAP
0xFA40 -> 20317
0xFA20 -> 20318
0x8B7F -> 20319
0x5906 -> 20320
0x609E -> 20321
0x66B5 -> 20322
0x7152 -> 20323
0x9A42 -> 20324

Unfortunately in Windows it works correctly, I tried to search in Microsoft 
documentation but didn't find clear place where it says if SID to CID 
conversion needs to be done or not. And I didn't saw enough such fonts to come 
up with some workaround hack.
I tried to check it in ftstring (git master version), but I was not able to 
enter Unicode characters on command line. Anyway even though we don't use 
latest version I didn't found and interesting changes in source code, so I 
expecting problem is still there.

(Unrelated problem: Also ftstring unlike ftview display bitmap looks like 
switched order of 4 bytes like big/little endian problem (I am using jam and 
MSVC2005 for compilation))

As font is 7.5 MB zipped I will send to Werner and to any other on request.

Thanks for any information about this,

Boris Letocha





reply via email to

[Prev in Thread] Current Thread [Next in Thread]