Closed lemzwerg closed 9 years ago
Doug, do we generate the names in our tools or we get it as an input from our partners? If from partners, please re-assign it to waksmonskiMT
@marekjez86, phase 2 fonts were all delivered as 'ttf' and we didn't generate any of them. Note that this bug is against TTF. And, Lao/Khmer fonts were NOT made by MTI. I think we have to fix this ourselves if important.
How are you seeing these glyph names? Are you using ttx?
I've tried both FontForge and FreeType's ftview
demo program. With ttx it's hard to 'see' glyphs :-)
The bug can also be reproduced in the opentype.js glyph inspector — click on “Choose File”, then upload NaoSansLaoUI-Regular.ttf:
Looks to me like wrong post
table in the font.
With ttx dump, it's hard to tell because it does not give gid. Anyway, we can say either that post table is wrong or 'nonmarkingreturn' is missing in glyf table (as the 3rd glyph; gid=2). See https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6post.html
I used ftxdumper (from Apple's font suite) to get the following post and cmap table dump: (fontforge can be used to get gid's too ; Encoding - Recode - glyph order ). If you compare two tables, it's obvious why there's an off-by-one error.
<PostScriptName glyphRefID="0" NameString=".notdef" />
<PostScriptName glyphRefID="1" NameString=".null" />
<PostScriptName glyphRefID="2" NameString="nonmarkingreturn" />
<PostScriptName glyphRefID="3" NameString="space" />
<PostScriptName glyphRefID="4" NameString="exclam" />
<PostScriptName glyphRefID="5" NameString="quotedbl" />
<PostScriptName glyphRefID="6" NameString="numbersign" />
<PostScriptName glyphRefID="7" NameString="dollar" />
<PostScriptName glyphRefID="8" NameString="percent" />
<PostScriptName glyphRefID="9" NameString="ampersand" />
<PostScriptName glyphRefID="10" NameString="quotesingle" />
<PostScriptName glyphRefID="11" NameString="parenleft" />
<PostScriptName glyphRefID="12" NameString="parenright" />
<PostScriptName glyphRefID="13" NameString="asterisk" />
<PostScriptName glyphRefID="14" NameString="plus" />
<PostScriptName glyphRefID="15" NameString="comma" />
<PostScriptName glyphRefID="16" NameString="hyphen" />
<PostScriptName glyphRefID="17" NameString="period" />
<PostScriptName glyphRefID="18" NameString="slash" />
<PostScriptName glyphRefID="19" NameString="zero" />
<PostScriptName glyphRefID="20" NameString="one" />
<PostScriptName glyphRefID="21" NameString="two" />
<map charValue="0x0020" glyphRefID="2"/>
<map charValue="0x0021" glyphRefID="3"/>
<map charValue="0x0022" glyphRefID="4"/>
<map charValue="0x0023" glyphRefID="5"/>
<map charValue="0x0024" glyphRefID="6"/>
<map charValue="0x0025" glyphRefID="7"/>
<map charValue="0x0026" glyphRefID="8"/>
<map charValue="0x0027" glyphRefID="9"/>
<map charValue="0x0028" glyphRefID="10"/>
<map charValue="0x0029" glyphRefID="11"/>
<map charValue="0x002A" glyphRefID="12"/>
<map charValue="0x002B" glyphRefID="13"/>
<map charValue="0x002C" glyphRefID="14"/>
<map charValue="0x002D" glyphRefID="15"/>
<map charValue="0x002E" glyphRefID="16"/>
<map charValue="0x002F" glyphRefID="17"/>
<map charValue="0x0030" glyphRefID="18"/>
<map charValue="0x0031" glyphRefID="19"/>
BTW, using the ftview
demo program you can easily see the glyph ID → glyph name mapping, too.
Fixing notofonts/khmer#15 (dropping zzxx features/langsys) with subsetter also fixed this issue. However, during the process, glyph names for variant glyphs such as uni0Exx.blw, uni0Exx.right are lost. (they're changed to glyph0101, etc). Let me try to preserve them.
Fixing notofonts/khmer#15 (dropping zzxx features/langsys) with subsetter also fixed this issue.
Looks like you just subsetted with --no-glyph-names
Yup. I noticed that and fixed it for notofonts/khmer#15.
I'll take care of this after notofonts/khmer#15.
[commit abed4e560220062e1a0a1dd5623cf1922acbc639]
All Lao fonts (
unhinted/*Lao*.ttf
) contain some glyph names that are off by 1. For example, glyph 'one' is called 'zero'.