| 188 | } |
| 189 | |
| 190 | void FontDebugGlyph(FontGlyph* glyph, int indent) |
| 191 | { |
| 192 | char utf8[16]; |
| 193 | uint32_t len = dmUtf8::ToUtf8(glyph->m_Codepoint, utf8); |
| 194 | utf8[len] = 0; |
| 195 | |
| 196 | Indent(indent); printf("glyph: '%s' 0x%0X\n", utf8, glyph->m_Codepoint); |
| 197 | Indent(indent+1); printf("width: %.3f\n", glyph->m_Width); |
| 198 | Indent(indent+1); printf("height: %.3f\n", glyph->m_Height); |
| 199 | Indent(indent+1); printf("advance: %.3f\n", glyph->m_Advance); |
| 200 | Indent(indent+1); printf("lbearing: %.3f\n", glyph->m_LeftBearing); |
| 201 | Indent(indent+1); printf("ascent: %.3f\n", glyph->m_Ascent); |
| 202 | Indent(indent+1); printf("descent: %.3f\n", glyph->m_Descent); |
| 203 | } |
| 204 | |
| 205 | void FontDebug(HFont hfont, float scale, float padding, const char* text) |
| 206 | { |