-
Notifications
You must be signed in to change notification settings - Fork 682
Description
When bisecting the ~2900 Mac failures when rolling HarfBuzz in Chromium, even at the end of the investigation range of 339036d..fbbd926, at 1622ba5 I do not see the large number of failures yet (only the ~14 failures that have something to do with kerning in the range of db9600b..97e5913) as long as I do not remove compilation of hb-coretext.* - i.e. switch the shaper for Mac. I assume there is not anything in the last two commits from 1622ba5..fbbd926, so I think the difference comes from switch the Mac shaper from CoreText to OT:
Could it be there is an issue with default feature activation? Or is there an issue in the integration? But also, I have some findings from hb-view and hb-shape in HarfBuzz.
Testing locally with HarfBuzz at 8f3048a it looks like for /System/Library/Fonts/Times.ttc no kern is activated or computed:
$ ttx -l -y0 /System/Library/Fonts/Times.ttc
Listing table info for "/System/Library/Fonts/Times.ttc":
tag checksum length offset
---- ---------- ------- -------
OS/2 0xB05125F4 96 2472
bsln 0x047F0816 72 2184
cmap 0x344BC11E 6706 711560
cvt 0x9B693F39 1054 8860
fdsc 0x40192B36 48 1768
feat 0x0005021E 28 711412
fpgm 0x9C748D06 1416 15196
glyf 0x039FCFD3 116680 476516
hdmx 0x8FEE8772 23176 156556
head 0x77382961 54 1960
hhea 0x11FD0FC9 36 1624
hmtx 0x9130EA17 5772 65596
just 0x031801CA 120 711440
kern 0xF953018D 708 3536
loca 0xA6D38AE3 2888 35532
maxp 0x0DEA07DD 32 1496
meta 0xA7C67DEB 4624 51704
morx 0x32AE1F71 199196 718268
name 0xEAB2D8C2 1260 9916
post 0xD364F808 16968 88684
prep 0xEEC97ED7 1731 19572
prop 0xC1FFA795 772 4996
So it has kern and morx.
Running
$ hb-view --shapers=coretext /System/Library/Fonts/Times.ttc "Text You" > text_you_coretext.png
results in
Running
hb-view --shapers=ot /System/Library/Fonts/Times.ttc "Text You" > text_you_ot.png
results in
So, kerning is missing when shaping with ot. The e and o are not pulled in towards the T and Y respectively.
I've experimented with --features=+kern for ot, but that did not lead to a change.
When I disable kern in the CoreText shaper and compare against ot, I get an identical result.
$ hb-shape --shapers=coretext --features=-kern /System/Library/Fonts/Times.ttc "Text You" [T=0+1251|e=1+909|x=2+1024|t=3+569|space=4+512|Y=5+1479|o=6+1024|u=7+1024]
$ hb-shape --shapers=ot --features=-kern /System/Library/Fonts/Times.ttc "Text You" [T=0+1251|e=1+909|x=2+1024|t=3+569|space=4+512|Y=5+1479|o=6+1024|u=7+1024]

