aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ftfont.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ftfont.c b/src/ftfont.c
index d3c836c0f2d..46abe35ff9a 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -1572,6 +1572,12 @@ ftfont_glyph_metrics (FT_Face ft_face, int c, int *advance, int *lbearing,
1572 if (FT_Load_Glyph (ft_face, c, FT_LOAD_DEFAULT) == 0) 1572 if (FT_Load_Glyph (ft_face, c, FT_LOAD_DEFAULT) == 0)
1573 { 1573 {
1574 FT_Glyph_Metrics *m = &ft_face->glyph->metrics; 1574 FT_Glyph_Metrics *m = &ft_face->glyph->metrics;
1575
1576 /* At first glance this might appear to truncate the glyph's
1577 horizontal advance, but FreeType internally rounds the
1578 advance width to a pixel boundary prior to returning these
1579 metrics. */
1580
1575 *advance = m->horiAdvance >> 6; 1581 *advance = m->horiAdvance >> 6;
1576 *lbearing = m->horiBearingX >> 6; 1582 *lbearing = m->horiBearingX >> 6;
1577 *rbearing = (m->horiBearingX + m->width) >> 6; 1583 *rbearing = (m->horiBearingX + m->width) >> 6;