LayoutFarm/Typography

Typography.OpenFont.Tables.CFF.CFF.cs

db300 opened this issue · 7 comments

db300 commented

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

db300 commented

@prepare

Thank you, I download it, and delete the link :)

I will review it again

HYCuFangSongJ is CID font.

This was fixed, see also => #201


N9KQOn6BqZ

HYCuFangSongJ, no glyphname, but render by glyph index


Jd7hIw5P1V

HYCuFangSongJ, Hello

db300 commented

Great.