🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

OTF charsets issue

Started by
17 comments, last by wintertime 4 years ago

Hello everyone.

I am working on my own OTF parser on C# and I am currently stuck on charsets.

I successfully parsed the list of charsets and found out that it contains several formats, which is not described in Adobe CFF documentation.

It contains Unicode, AFII, human readable characters and some feature sets.

And now I am stuck with it, because I dont know how to cast all this to Unicode.

OK, actually the most questions I have to the AFII part, because it contains code for Cyrillic and Asian characters, which contains quite a lot of Unicode list of characters (a few thousands) and I cannot find info how to convert AFII codes to Unicode in automatic way. I found some matching tables, but I think that entering manually ~10 000 characters is not a good practice.

I want to cast all entries inside charset list to Unicode to simplify user input as far as all entered characters anyway will belong to Unicode.

So, my question is: If anyone present here know anything about this issue, please, help me to solve it. I would appreciate any help.

Advertisement

I found a paper from Adobe that describes the difference between Unicode (as character encoding) and AFII (as glyph registry) so maybe you can find your answers here

https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5013.Cyrillic_Font_Spec.pdf

Unfortunately this Adobe paper does not answer how to convert AFII to Unicode in automatic way

TL;DR from what I read in the paper, you can't because AFII is “not an encoding but a glyph registry mapping glyph names", so you have to download and convert the registry from what I understand so far

I would appreciate if you tell me where exactly I can find that registry to download it and convert to Unicode, because I didnt find any links or other resources in the internet regarding AFII…

I mean resources that contains all the glyphs available in AFII

I think this is what you want? No idea really but I did a quick Google search to find out what AFII is and found this…

https://github.com/charlesmchen/typefacet/blob/master/data/Adobe%20Glyph%20List/aglfn13.txt

🙂🙂🙂🙂🙂<←The tone posse, ready for action.

Partially… I am not sure that ~4K entries can cover Cyrillic, Chinese, Japanese, Korean and other languages.

Correct me if I am wrong, but this list seems not to be full or I am missing something?

I'm also interested in this topic. And for me it's not seems right to just hardcode thousands of mapping values even if there will be the full list of them. Maybe in OTF / CFF there is some table to map user input to glyphs? Something like ‘cmap’ table in TTF?

@shaarigan @fleabay

Please respond.

Have you looked at (the source code of) Freetype? It supports OpenType fonts and is under a liberal license, so you can probably just copy their solution.

This topic is closed to new replies.

Advertisement