diff options
author | Stefan Holst <holstsn@users.sourceforge.net> | 2005-07-27 23:46:34 +0000 |
---|---|---|
committer | Stefan Holst <holstsn@users.sourceforge.net> | 2005-07-27 23:46:34 +0000 |
commit | 46d91559a96d72d38741473294fee04f68d36cd8 (patch) | |
tree | a5ad55bc15edc0b37500c8264a99097db0514616 | |
parent | ea9855ca71b5bf1648071b41baf9ff695bba7bae (diff) | |
download | xine-lib-46d91559a96d72d38741473294fee04f68d36cd8.tar.gz xine-lib-46d91559a96d72d38741473294fee04f68d36cd8.tar.bz2 |
ft2 patch by Andrei Lahun: fix spacing and hinting
CVS patchset: 7691
CVS date: 2005/07/27 23:46:34
-rw-r--r-- | src/xine-engine/osd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index f5169a966..745069570 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -1066,7 +1066,7 @@ static int osd_render_text (osd_object_t *osd, int x1, int y1, } previous = i; - if (FT_Load_Glyph(osd->ft2->face, i, FT_LOAD_DEFAULT)) { + if (FT_Load_Glyph(osd->ft2->face, i, FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING)) { xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("osd: error loading glyph\n")); continue; } @@ -1232,7 +1232,7 @@ static int osd_get_text_size(osd_object_t *osd, const char *text, int *width, in } previous = i; - if (FT_Load_Glyph(osd->ft2->face, i, FT_LOAD_DEFAULT)) { + if (FT_Load_Glyph(osd->ft2->face, i, FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING)) { xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("osd: error loading glyph %i\n"), i); text++; continue; @@ -1273,7 +1273,8 @@ static int osd_get_text_size(osd_object_t *osd, const char *text, int *width, in * to also add the left bearing because the letter might be shifted left or * right and then the right edge is also shifted */ - *width -= osd->ft2->face->glyph->advance.x / 64; + if (osd->ft2->face->glyph->bitmap.width) + *width -= osd->ft2->face->glyph->advance.x / 64; *width += osd->ft2->face->glyph->bitmap.width; *width += osd->ft2->face->glyph->bitmap_left; *height = osd->ft2->face->size->metrics.height / 64; |