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

Old Hungarian font name and unicode rangebits #2

Open
LornaSIL opened this issue Jun 21, 2021 · 7 comments
Open

Old Hungarian font name and unicode rangebits #2

LornaSIL opened this issue Jun 21, 2021 · 7 comments

Comments

@LornaSIL
Copy link

Defect Report

https://github.com/googlefonts/noto-fonts/blob/main/unhinted/ttf/NotoSansOldHungarian/NotoSansOldHungarian-Regular.ttf

Title

Font name is inconsistent and cannot be used in Word 2016 and in some other applications. No Unicode range bits are set for Non-Plane 0.

Font

NotoSansOldHungarian-Regular.ttf

Where the font came from, and when

https://github.com/googlefonts/noto-fonts/blob/main/unhinted/ttf/NotoSansOldHungarian/NotoSansOldHungarian-Regular.ttf
Date: 2021-06-21

Font Version

2.002

OS name and version

Windows 10

Application name and version

Word 2016 and Windows font Previewer

Issue

In the Windows Font Previewer
image

and in Microsoft Word the font seems to be called Noto Sans OldHung
image

but in Notepad the font is called Noto Sans Old Hungarian.

  1. When I attempt to select the font in Word 2016, I can see Noto Sans OldHung as a font selection,
    When I select the font Word reverts to using Arial and I get square boxes.
    image

  2. When I attempt to select the font in Notepad, I can see Noto Sans Old Hungarian and I am able to select the font and it displays the correct shape.
    image

  3. The font properties demonstrates there is no Unicode rangebit set for Old Hungarian which is in the SMP.
    image

This appears to be a mixture of two problems:

  1. Inconsistent font name
  2. No Unicode rangebit set for the SMP so font fallback is happening

Character data

𐲀𐲁𐲂𐲃𐲄𐲅𐳽𐳾𐳿

Screenshot

See above

Tools for reporting bugs

Useful tools for reporting bugs are available at: https://github.com/googlei18n/

Harfbuzz hb-view and hb-shape

These are part of the HarfBuzz distribution and can help isolate if an issue is in the app/OS, shaping engine, or font.

  • hb-view renders the text with the exact font (for example, to see how ligatured characters shape) using your installed version of HarfBuzz.

For example:

  hb-view --font-file {path to font} --text-file {path to text file} --output-file '{sample}.png'
  • hb-shape shows glyph selection and positioning

Fontview

  • Fontview displays the text.

Fontdiff

  • Fontdiff displays the text using two versions of the font side by side.
@tamasbartos
Copy link

@LornaSIL As I know, this bug is not the NotoSansOldHungarian-Regular font's bug. Microsoft blocked in their MS-Word program Old Hungarian script capability.

@tamasbartos
Copy link

@LornaSIL The font works with LibreOffice.

@LornaSIL
Copy link
Author

It is a technical issue in the font as explained above. LO is apparently more forgiving than Word, but it doesn't work in several other applications including Word and keyman.com On-Screen keyboard. We just get tofu.

@simoncozens
Copy link
Contributor

@LornaSIL, could you try with the latest builds? We are now passing all the fontbakery checks, so if there is still a problem on Windows and fontbakery isn't catching it, that's a fontbakery issue...

@LornaSIL
Copy link
Author

fontbakery is giving this warning in my tests (on the font downloaded from here: https://github.com/notofonts/old-hungarian/releases/tag/NotoSansOldHungarian-v2.005):

WARN

UnicodeRange bit 57 "Non-Plane 0 *" should be 1 because cmap has 108 of the 1048576 codepoints in this range. [code: bad-range-bit]

Otherwise, the font name is now consistent which is very helpful. Word still has trouble selecting the font, but I was able to go into the Advanced font settings and select it now.

I don't know what app you are using, but we are using a ufo workflow and in fontinfo.plist this would be one of the settingsunder openTypeOS2UnicodeRanges:

  <key>openTypeOS2UnicodeRanges</key>
    <integer>57</integer>

In a UI setting I think it would be "Non-Plane 0" https://learn.microsoft.com/en-us/typography/opentype/spec/os2#ur

@simoncozens
Copy link
Contributor

My approach tends to be that if I'm having to set OS/2 table entries manually then the compiler is broken. It knows what codepoints are in the font, surely it can calculate those unicode range bits for me.

@LornaSIL
Copy link
Author

I just know that MS apps tend to use font fallback if the bits aren't set properly. In this case I still get square boxes, but with a bit of effort I was able to select the font.
So, it's definitely better with consistent font names!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants