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

Phintu + Macron below rendered as two copies of phinthu #7

Closed
Richard57 opened this issue Jul 21, 2018 · 2 comments
Closed

Phintu + Macron below rendered as two copies of phinthu #7

Richard57 opened this issue Jul 21, 2018 · 2 comments

Comments

@Richard57
Copy link

This happens at least with HarfBuzz as the render (observed with Versions 1.2.7 and 1.8.4 of HarfBuzz), as may be seen for the string กฺ̱
garuda
(This image was generated with the command
hb-view --font-size 120 -o garuda.png -Opng /usr/share/fonts/truetype/tlwg/Garuda.ttf กฺ̱)

This bug was observed with the plain fonts Garuda, Kinnari, Laksaman, Loma, Norasi, Purisa, Sawasdee, TlwgMono, TlwgTypewriter, TlwgTypist, TlwgTypo, Umpush and Waree

This is not a HarfBuzz bug; it does not occur with the fonts Tahoma or Code2000.

@Richard57
Copy link
Author

Richard57 commented Jul 22, 2018

I've located the bug in Garuda.sfd. (I'm not fluent in FontForge.) There's a segment of code there:

ChainSub2: glyph "'ccmp' Thai Macron Below Vowel Reordering" 0 0 0 3
 String: 22 macronbelowcmb uni0E38
 BString: 0 
 FString: 0 
 2
  SeqLookup: 0 "Thai Sara U Macron Reordering"
  SeqLookup: 1 "Thai Sara U Macron Reordering"
 String: 22 macronbelowcmb uni0E39
 BString: 0 
 FString: 0 
 2
  SeqLookup: 0 "Thai Sara UU Macron Reordering"
  SeqLookup: 1 "Thai Sara UU Macron Reordering"
 String: 22 macronbelowcmb uni0E3A
 BString: 0 
 FString: 0 
 2
  SeqLookup: 0 "Thai Phinthu Macron Reordering"
  SeqLookup: 1 "Thai Maitaikhu Macron Reordering"
EndFPST

The last SeqLookup should invoke "Thai Phinthu Macron Reordering", not "Thai Maitaikhu Macron Reordering". The incorrect line has no effect, and so we get two phinthus. I believe this bug is present in all the font files.

@thep
Copy link
Contributor

thep commented Jul 22, 2018

Indeed. I've tried fixing it and the problem is gone. I'll work on all the fonts soon. Thank you very much for your investigation!

@thep thep closed this as completed in 7867845 Jul 24, 2018
abhabongse pushed a commit to abhabongse/fonts-tlwg that referenced this issue Dec 20, 2018
* */*.sfd (except tlwg/TlwgMono*.sfd):
  - Fix wrong substitution in
    "'ccmp' Thai Macron Below Vowel Reordering"
    which caused Phinthu + Macron Below to appear as double Phinthu.
  - Bump font versions as needed.

Thanks @Richard57 for the report and investigation.
Closes: #7
tlwg#7
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

2 participants