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

Typography.OpenFont.Tables.CFF.CFF.cs #198

Closed
db300 opened this issue May 4, 2020 · 7 comments
Closed

Typography.OpenFont.Tables.CFF.CFF.cs #198

db300 opened this issue May 4, 2020 · 7 comments

Comments

@db300
Copy link

db300 commented May 4, 2020

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];

@prepare
Copy link
Member

prepare commented May 4, 2020

Thank you, I will check it.

@prepare
Copy link
Member

prepare commented May 7, 2020

@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
Copy link
Author

db300 commented May 7, 2020

@prepare

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

@prepare
Copy link
Member

prepare commented May 7, 2020

@prepare
Copy link
Member

prepare commented May 7, 2020

I will review it again

@prepare
Copy link
Member

prepare commented May 28, 2020

HYCuFangSongJ is CID font.

This was fixed, see also => #201


N9KQOn6BqZ

HYCuFangSongJ, no glyphname, but render by glyph index


Jd7hIw5P1V

HYCuFangSongJ, Hello

@prepare prepare closed this as completed May 28, 2020
@db300
Copy link
Author

db300 commented May 29, 2020

Great.

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

2 participants