Post

Replies

Boosts

Views

Activity

[CoreText] Algorithm naming table
Hi, I would like to know if it would be possible to share me the algorithm how CoreText pick the the family name, full name, etc in the naming table https://docs.microsoft.com/en-us/typography/opentype/spec/name#name-ids for TrueType and OpenType Font. If this can help you understand what kind of information I am looking for, here is FontConfig algorithm: Sort naming table in ASC in this platformID, nameID, platEncID, isEnglish(), langID isEnglish() is a method that return True if the name = {platformID: 1, langID: 0} or {platformID: 3, langID: 0x409} Split the naming table in table that only contain one type of platformID. Finally, search nameID the user want in that order: MICROSOFT, APPLE, MACINTOSH, ISO and that the first match. Or, if you prefer code example, here is FontConfig algorithm in python: https://github.com/moi15moi/fonttools/blob/add-strategy-naming-table/Lib/fontTools/ttLib/tables/sortNamesStrategy/FontConfigStrategy.py Why do I want to know that? I would like to implement the way the way CoreText picks up the name in fonttools. Here is where I discuss about it: https://github.com/fonttools/fonttools/pull/2636 Thank you
2
0
1.3k
Jun ’22
[SFNT name] Should I use shift-jis instead of mac_roman for some specific attributes?
Hi, I am wondering if the section a) Mac OS encodings for script code 0, smRoman miss Japanese at: http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt Same thing here: https://developer.apple.com/documentation/coreservices/1399980-afp_text_encodings There is no mention about Shift-JIS when the platformID is 1, platEncID is 0 and the langage is 11 :  I am asking the question because I have this font (I do not own the font. It is purely a demonstration): https://mega.nz/file/S9ERDRpQ#bcPhS06kv-D5jt64aTNDbZVd6gZr6ZfJDYT91yYsoWk The font has this sfnt name:     <namerecord nameID="1" platformID="1" platEncID="0" langID="0xb">       FjÉCÅ[É}310     </namerecord> If I use mac_roman to decode this font name (which seems to be the choice when by default), I will not get the right result, but if I use the encoding mac Shift-JIS, I get Fjイーマ310. If my question is not clear, don't hesitate to get back to me PS: Sorry, I did not know what I should wrote in the tags section
4
0
950
Jul ’22