Typography.OpenFont.Tables.CFF.CFF.cs
db300 opened this issue · 7 comments
Line 1023:
cff1Glyphs[i]._cff1GlyphData.Name = _uniqueStringTable[sid - Cff1FontSet.N_STD_STRINGS - 1];
If sid - Cff1FontSet.N_STD_STRINGS - 1 >= _uniqueStringTable.Length, throw an exception.
So, I rewrite as following:
var index = sid - Cff1FontSet.N_STD_STRINGS - 1;
if (index < _uniqueStringTable.Length)
cff1Glyphs[i]._cff1GlyphData.Name = _uniqueStringTable[sid - Cff1FontSet.N_STD_STRINGS - 1];
Thank you, I will check it.
@db300 , could you provide a font that has that glyph-name problem?
I want to debug and make sure that the problem is from font-file, or from bug in the library
I will review it again
HYCuFangSongJ is CID font.
This was fixed, see also => #201
HYCuFangSongJ, no glyphname, but render by glyph index
HYCuFangSongJ, Hello
Great.