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

Function CFEGetFontMetrics

modules/commodetto/cfeBMF.c:171–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171void CFEGetFontMetrics(CommodettoFontEngine bmf, int32_t *ascent, int32_t *descent, int32_t *leading)
172{
173 if (0 == bmf->charCount) {
174 if (ascent) *ascent = 0;
175 if (descent) *descent = 0;
176 if (leading) *leading = 0;
177 return;
178 }
179
180 if (ascent)
181 *ascent = bmf->ascent;
182 if (descent)
183 *descent = bmf->height - bmf->ascent;
184 if (leading)
185 *leading = 0;
186}
187
188CFEGlyph CFEGetGlyphFromGlyphID(CommodettoFontEngine bmf, uint16_t glyphID, uint8_t needPixels)
189{

Callers 2

PiuStyleLookupFontFunction · 0.50
PiuStyleLookupFontFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected