Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect x_advance in English result using Jellee Roman font since release 2.1.2 (easily reproducible) #1421

Closed
chanon opened this issue Nov 28, 2018 · 13 comments

Comments

@chanon
Copy link

chanon commented Nov 28, 2018

I was integrating harfbuzz to my game and thought I did something wrong at first.

Thanks to the binary win32 releases I was able to use hb-view to verify that it seems to be a bug in harfbuzz since 2.1.2

2.1.2 and 2.1.3 produce the same results.
2.1.1 and before behave correctly.

To reproduce, get the Jellee Roman font. Eg. from here:
https://smartfonts.com/jellee-roman.font

With version 2.1.1:

hb-view.exe "Jellee Roman Bold.ttf" abcdefghijklmnop > result1.png

gives:
result

And

hb-view.exe "Jellee Roman Bold.ttf" ckckck > result2.png

gives:
result2

With version 2.1.2 (and 2.1.3):

hb-view.exe "Jellee Roman Bold.ttf" abcdefghijklmnop > result1.png

gives:
result

And

hb-view.exe "Jellee Roman Bold.ttf" ckckck > result2.png

result2

Notice the wrong advance of the c and k letters.

Otherwise, if this is an intended change, then it is pretty unexpected.

@ebraminio
Copy link
Collaborator

ebraminio commented Nov 28, 2018

@ebraminio
Copy link
Collaborator

Fixes if I revert the commit

@ebraminio
Copy link
Collaborator

A format2 subtable, states itself as AAT kern (version 1) but expects OT one (version 0), interesting

@ebraminio
Copy link
Collaborator

ebraminio commented Nov 28, 2018

Hmm, actually it got broken when format 2 support is added apparently, broken font I guess, we should see how CoreText and Uniscribe deals with it I guess however.

@behdad
Copy link
Member

behdad commented Nov 28, 2018

Our Format2 impl in kern table is untested. Thanks. I'll debug.

@ebraminio
Copy link
Collaborator

OK with CoreText

@behdad
Copy link
Member

behdad commented Nov 28, 2018

Can you paste the CoreText output with a few sequences? Those in the report, and maybe: AV VA Te eT Tr rT Td TA LV Vd pV Vq bV

@ebraminio
Copy link
Collaborator

a

$ util/hb-shape "Jellee Roman Bold.ttf" "abcdefghijklmnop ckckck AV VA Te eT Tr rT Td TA LV Vd pV Vq bV" --shaper coretext        
[a=0+626|b=1+672|c=2+549|d=3+672|e=4+620|f=5+393|g=6+672|h=7+665|i=8+316|j=9+316|k=10+590|l=11+316|m=12+1020|n=13+666|o=14+643|p=15+671|space=16+250|c=17+579|k=18+591|c=19+579|k=20+591|c=21+579|k=22+591|space=23+250|A=24+660|V=25+742|space=26+250|V=27+662|A=28+740|space=29+250|T=30+522|e=31+620|space=32+250|e=33+620|T=34+652|space=35+250|T=36+652|r=37+453|space=38+250|r=39+452|T=40+652|space=41+250|T=42+522|d=43+672|space=44+250|T=45+552|A=46+740|space=47+250|L=48+629|V=49+742|space=50+250|V=51+683|d=52+672|space=53+250|p=54+601|V=55+742|space=56+250|V=57+683|q=58+672|space=59+250|b=60+601|V=61+742]

@khaledhosny
Copy link
Collaborator

FontTools does not seem to be able to dump such kern subtable format, however FontForge can and the classes seem to be OK and I don’t seen any obvious bad values.

@behdad
Copy link
Member

behdad commented Nov 28, 2018

@ebraminio can I get those on separate lines please? Very hard to use as is. Thanks.

@behdad
Copy link
Member

behdad commented Nov 28, 2018

Oh, OFL. Great. We should add it to test suite. And yes, PITA that fonttools doesn't implement this format yet. Volunteers?

@ebraminio
Copy link
Collaborator

abcdefghijklmnop
ckckck
AV
VA
Te
eT
Tr
rT
Td
TA
LV
Vd
pV
Vq
bV

util/hb-shape --text-file a.txt Jellee\ Roman\ Bold.ttf --shaper coretext

[a=0+626|b=1+672|c=2+549|d=3+672|e=4+620|f=5+393|g=6+672|h=7+665|i=8+316|j=9+316|k=10+590|l=11+316|m=12+1020|n=13+666|o=14+643|p=15+671]
[c=0+579|k=1+591|c=2+578|k=3+590|c=4+579|k=5+590]
[A=0+660|V=1+743]
[V=0+663|A=1+740]
[T=0+521|e=1+621]
[e=0+621|T=1+652]
[T=0+652|r=1+452]
[r=0+452|T=1+652]
[T=0+521|d=1+672]
[T=0+551|A=1+741]
[L=0+629|V=1+742]
[V=0+682|d=1+671]
[p=0+602|V=1+743]
[V=0+682|q=1+671]
[b=0+602|V=1+743]

@behdad
Copy link
Member

behdad commented Nov 28, 2018

Any chance you can also provide me with the ftxdumperfuser of the kern table?

@behdad behdad closed this as completed in a3267cf Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants