|
From: | Nikolaus Waxweiler |
Subject: | Re: Dealing with different character map formats when mapping glyph indicies to character codes |
Date: | Tue, 23 May 2023 21:56:54 +0100 |
Hi Craig,you should be able to trust the (Unicode) cmap sub-tables you find in a font to give you the intended Unicode character to glyph ID mapping. You can probably follow the logic in
https://github.com/fonttools/fonttools/blob/77a35fe16d07c16e3bb52863344df35520e9b770/Lib/fontTools/ttLib/ttFont.py#L806-L841to determine which cmap to look at. I wouldn't try and do any overlap analysis in a first pass.
[Prev in Thread] | Current Thread | [Next in Thread] |