Browse Source

Merge pull request #303 from olliwang/freetype

Fixes the kerning value for freetype.
shared-context
Mikko Mononen GitHub 8 years ago
parent
commit
189e051527
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/fontstash.h

+ 1
- 1
src/fontstash.h View File

@@ -235,7 +235,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 (int)ftKerning.x;
return (int)((ftKerning.x + 32) >> 6); // Round up and convert to integer
}

#else


Loading…
Cancel
Save