|
|
@@ -202,7 +202,7 @@ int fons__tt_buildGlyphBitmap(FONSttFontImpl *font, int glyph, float size, float |
|
|
|
ftError = FT_Get_Advance(font->font, glyph, FT_LOAD_NO_SCALE, (FT_Fixed*)advance); |
|
|
|
if (ftError) return 0; |
|
|
|
ftGlyph = font->font->glyph; |
|
|
|
*lsb = ftGlyph->metrics.horiBearingX; |
|
|
|
*lsb = (int)ftGlyph->metrics.horiBearingX; |
|
|
|
*x0 = ftGlyph->bitmap_left; |
|
|
|
*x1 = *x0 + ftGlyph->bitmap.width; |
|
|
|
*y0 = -ftGlyph->bitmap_top; |
|
|
@@ -233,7 +233,7 @@ int fons__tt_getGlyphKernAdvance(FONSttFontImpl *font, int glyph1, int glyph2) |
|
|
|
{ |
|
|
|
FT_Vector ftKerning; |
|
|
|
FT_Get_Kerning(font->font, glyph1, glyph2, FT_KERNING_DEFAULT, &ftKerning); |
|
|
|
return ftKerning.x; |
|
|
|
return (int)ftKerning.x; |
|
|
|
} |
|
|
|
|
|
|
|
#else |
|
|
@@ -421,6 +421,8 @@ struct FONScontext |
|
|
|
void* errorUptr; |
|
|
|
}; |
|
|
|
|
|
|
|
#ifdef STB_TRUETYPE_IMPLEMENTATION |
|
|
|
|
|
|
|
static void* fons__tmpalloc(size_t size, void* up) |
|
|
|
{ |
|
|
|
unsigned char* ptr; |
|
|
@@ -446,6 +448,8 @@ static void fons__tmpfree(void* ptr, void* up) |
|
|
|
// empty |
|
|
|
} |
|
|
|
|
|
|
|
#endif // STB_TRUETYPE_IMPLEMENTATION |
|
|
|
|
|
|
|
// Copyright (c) 2008-2010 Bjoern Hoehrmann <bjoern@hoehrmann.de> |
|
|
|
// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details. |
|
|
|
|
|
|
|