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

ulCodePageRange not set in NotoSansSinhala-Regular.ttf #468

Closed
plutext opened this issue Oct 6, 2018 · 3 comments
Closed

ulCodePageRange not set in NotoSansSinhala-Regular.ttf #468

plutext opened this issue Oct 6, 2018 · 3 comments

Comments

@plutext
Copy link

plutext commented Oct 6, 2018

#304 fixed this issue for NotoSans; building Noto Sans I have confirmed the fix worked, see further https://github.com/googlei18n/noto-fonts/issues/1046#issuecomment-427291648

The build said it was using ufo2ft-2.3.1-py2.

However

ttx NotoSansSinhala-Regular.ttf

on freshly built ttf still yields:

    <ulCodePageRange1 value="00000000 00000000 00000000 00000000"/>
    <ulCodePageRange2 value="00000000 00000000 00000000 00000000"/>

The result is that when Word converts a docx using this font to PDF, some other font is substituted.

If I compare that to Nirmala (the Sinhala font Word uses on my computer), I see

    <ulCodePageRange1 value="00000000 00000000 00000000 00000001"/>
    <ulCodePageRange2 value="00000000 00000000 00000000 00000000"/>

Altering NotoSansSinhala-Regular.ttx to match, then ttx'ing it back to ttf, I confirmed Word 2016 does now use this font in its PDF output.

@anthrotype
Copy link
Member

anthrotype commented Oct 8, 2018

Thanks for the report.
I think we should change the ufo2ft calcCodePageRanges so that it always at least enables one bit (the first one, for "Basic Latin" "Latin 1") when no bits are enabled following our current algorithm:

https://github.com/googlei18n/ufo2ft/blob/c9925b38a103d2396528a5ec0b23d26016969e25/Lib/ufo2ft/util.py#L179-L265

Or even simpy enable Basic Latin all the time?

@anthrotype
Copy link
Member

sorry, the bit 0 of OS/2.uCodePageRange1 is for codepage 1252, aka Latin 1.

@madig
Copy link
Collaborator

madig commented Oct 8, 2018

@moyogo

anthrotype added a commit to notofonts/noto-source that referenced this issue Oct 9, 2018
notably, includes ufo2ft==2.3.2 which fixes issue with NotoSansSinhala missing OS/2.ulCodePageRange
googlefonts/fontmake#468
moyogo pushed a commit to notofonts/Noto-LatinGreekCyrillic that referenced this issue May 5, 2021
notably, includes ufo2ft==2.3.2 which fixes issue with NotoSansSinhala missing OS/2.ulCodePageRange
googlefonts/fontmake#468
moyogo pushed a commit to notofonts/Noto-LatinGreekCyrillic that referenced this issue May 5, 2021
notably, includes ufo2ft==2.3.2 which fixes issue with NotoSansSinhala missing OS/2.ulCodePageRange
googlefonts/fontmake#468
moyogo pushed a commit to notofonts/Noto-Thai that referenced this issue May 31, 2021
notably, includes ufo2ft==2.3.2 which fixes issue with NotoSansSinhala missing OS/2.ulCodePageRange
googlefonts/fontmake#468
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

3 participants