Skip to content

Commit

Permalink
Improve glyph rasterization by using subpixeloffset64
Browse files Browse the repository at this point in the history
Improves some glyph spacing issues
  • Loading branch information
past-due committed Mar 31, 2019
1 parent 0fcad70 commit 35e5a8d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ivis_opengl/textdraw.cpp
Expand Up @@ -150,6 +150,10 @@ struct FTFace

RasterizedGlyph get(uint32_t codePoint, Vector2i subpixeloffset64)
{
FT_Vector delta;
delta.x = subpixeloffset64.x;
delta.y = subpixeloffset64.y;
FT_Set_Transform(m_face, nullptr, &delta);
FT_Error error = FT_Load_Glyph(m_face,
codePoint, // the glyph_index in the font file
WZ_FT_LOAD_FLAGS
Expand Down

0 comments on commit 35e5a8d

Please sign in to comment.