MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / unicodeToMacRoman

Function unicodeToMacRoman

modules/commodetto/cfeNFNT.c:208–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206 0x00AF, 0x02D8, 0x02D9, 0x02DA, 0x00B8, 0x02DD, 0x02DB, 0x02C7};
207
208uint16_t unicodeToMacRoman(uint32_t unicode)
209{
210 uint8_t i;
211
212 if (unicode < 128)
213 return unicode;
214
215 // faster implementation possible with unicode to macroman table
216 for (i = 0; i < 128; i++)
217 if (c_read16(&gMacRomanToUnicode[i]) == unicode)
218 return i + 128;
219
220 return kInvalidGlyphID;
221}

Callers 2

CFEGetGlyphFromUnicodeFunction · 0.85
CFELayoutRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected