| 155 | } |
| 156 | |
| 157 | void CFELayoutRun(CommodettoFontEngine tf, const char *utf8, int32_t byteLength, CFERun run, int32_t runLength, int32_t width) |
| 158 | { |
| 159 | const char *utf8End = utf8 + byteLength; |
| 160 | |
| 161 | while (utf8 < utf8End) { |
| 162 | CFEGlyph glyph; |
| 163 | uint16_t glyphID = unicodeToMacRoman(PocoNextFromUTF8((uint8_t **)&utf8)); |
| 164 | if (kInvalidGlyphID == glyphID) |
| 165 | continue; |
| 166 | |
| 167 | glyph = CFEGetGlyphFromGlyphID(tf, glyphID, false); |
| 168 | if (NULL == glyph) |
| 169 | continue; |
| 170 | |
| 171 | run->glyphID = glyphID; |
| 172 | run->advance = glyph->advance; |
| 173 | |
| 174 | runLength -= 1; |
| 175 | if (1 == runLength) |
| 176 | break; //@@ report run array overflow |
| 177 | } |
| 178 | |
| 179 | run->glyphID = kInvalidGlyphID; |
| 180 | } |
| 181 | |
| 182 | void CFEGetOutlineFromUnicode(CommodettoFontEngine cfe, uint32_t unicode, uint8_t **outline, uint32_t *outlineSize) |
| 183 | { |
nothing calls this directly
no test coverage detected