For what it's worth Jonathan and I looked into this in Vancouver and tracked it down to hb-ft's abuse of FreeType API with disregard to hinting issues. I'll try to address it soonish...
behdad On 12-07-31 03:22 PM, Jonathan Kew wrote: > On 31/7/12 19:29, Behdad Esfahbod wrote: >> Interesting. I'll take a look. > > It might be worth calling CTFontGetUnitsPerEm to see what Core Text considers > the em-square of the font to be. ISTR that I've seen cases where Core > Graphics, at least, "normalizes" the em-units of certain fonts that aren't > using a "typical" size; I'm not sure if that carries through to Core Text > metrics as well, but it might be a factor here... > > JK > >> >> On 07/31/2012 01:49 PM, Rolf Langenhuijzen wrote: >>> I did a similar test with 2 fonts and it was different between the two.. >>> could it be some internal font thing that is causing this? >>> >>> OSX: >>> hb-shape --shapers=coretext "/dev/fonts/MaiolaPro-Regular.otf" ABC >>> [A=0+670|B=1+565|C=2+640] >>> >>> hb-shape --shapers=ot "/dev/fonts/MaiolaPro-Regular.otf" ABC >>> [A=0+660|B=1+555|C=2+630] >>> >>> hb-shape --shapers=ot "/dev/Whitney-Book-Pro.otf" ABC >>> [A=0+691|B=1+547|C=2+638] >>> >>> hb-shape --shapers=coretext "/dev/Whitney-Book-Pro.otf" ABC >>> [A=0+691|B=1+547|C=2+638] >>> >>> I tried on Ubuntu: >>> hb-shape --shapers=ot "MaiolaPro-Regular.otf" ABC >>> [A=0+660|B=1+555|C=2+630] >>> >>> So the same as on OSX, not the same as with coretext as you are getting… >>> >>> Regards, >>> Rolf >>> >>> On Jul 31, 2012, at 12:42 PM, Dohyun Kim wrote: >>> >>>> Hi, >>>> >>>> I have compiled harfbuzz-ng on Mac OS X Lion. >>>> While testing some fonts, I encounterd a strange mismatch between >>>> coretext and ot backends: >>>> >>>> $ ./hb-shape --shapers=coretext /System/Library/Fonts/AppleGothic.ttf ABC >>>> [gid41=0+726|gid42=1+644|gid43=2+685] >>>> >>>> $ ./hb-shape --shapers=ot /System/Library/Fonts/AppleGothic.ttf ABC >>>> [gid41=0+743|gid42=1+659|gid43=2+701] >>>> >>>> The Units Per Em of AppleGothic is 1000. >>>> However, ot backend under Mac seems to consider upem as 1024 and >>>> increase glyph widths in proportion, resulting in incorrect glyph >>>> positions. >>>> >>>> BTW, ot backend on ubuntu machine gives the same result as coretext under >>>> Mac. >>>> >>>> Best, >>>> -- >>>> Dohyun Kim >>>> College of Law, Dongguk University >>>> Seoul, Republic of Korea >>>> _______________________________________________ >>>> HarfBuzz mailing list >>>> [email protected] >>>> http://lists.freedesktop.org/mailman/listinfo/harfbuzz >>> >>> _______________________________________________ >>> HarfBuzz mailing list >>> [email protected] >>> http://lists.freedesktop.org/mailman/listinfo/harfbuzz >>> >> _______________________________________________ >> HarfBuzz mailing list >> [email protected] >> http://lists.freedesktop.org/mailman/listinfo/harfbuzz >> > > _______________________________________________ > HarfBuzz mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/harfbuzz -- behdad http://behdad.org/ _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
