| 204 | } |
| 205 | |
| 206 | bool getFontWhitespaceWidth(double &spaceAdvance, double &tabAdvance, FontHandle *font, FontCoordinateScaling coordinateScaling) { |
| 207 | double scale = getFontCoordinateScale(font->face, coordinateScaling); |
| 208 | FT_Error error = FT_Load_Char(font->face, ' ', FT_LOAD_NO_SCALE); |
| 209 | if (error) |
| 210 | return false; |
| 211 | spaceAdvance = scale*font->face->glyph->advance.x; |
| 212 | error = FT_Load_Char(font->face, '\t', FT_LOAD_NO_SCALE); |
| 213 | if (error) |
| 214 | return false; |
| 215 | tabAdvance = scale*font->face->glyph->advance.x; |
| 216 | return true; |
| 217 | } |
| 218 | |
| 219 | bool getGlyphCount(unsigned &output, FontHandle *font) { |
| 220 | output = (unsigned) font->face->num_glyphs; |
nothing calls this directly
no test coverage detected