diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-01-05 12:53:55 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-01-05 12:53:55 +0000 |
commit | 3d5d2d88a06a59d82cdcf962f82e58abe69cb9bc (patch) | |
tree | c638e8535ab5ea92eaf638f457d4f3774c31a17a /misc/xine-fontconv.c | |
parent | 88cf6bc33e2c522723554cadb91b9a684ca4c1af (diff) | |
download | xine-lib-3d5d2d88a06a59d82cdcf962f82e58abe69cb9bc.tar.gz xine-lib-3d5d2d88a06a59d82cdcf962f82e58abe69cb9bc.tar.bz2 |
fix for rendering italic fonts by Christian Vogler
CVS patchset: 1338
CVS date: 2002/01/05 12:53:55
Diffstat (limited to 'misc/xine-fontconv.c')
-rw-r--r-- | misc/xine-fontconv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/xine-fontconv.c b/misc/xine-fontconv.c index cfedab180..a9730809f 100644 --- a/misc/xine-fontconv.c +++ b/misc/xine-fontconv.c @@ -47,6 +47,8 @@ #include <freetype/ftglyph.h> #endif +#define MAX(a, b) ((a) > (b)? (a) : (b)) + #define f266ToInt(x) (((x)+32)>>6) /* round fractional fixed point */ /* coordinates are in 26.6 pixels (i.e. 1/64th of pixels)*/ #define f266CeilToInt(x) (((x)+63)>>6) /* ceiling */ @@ -292,7 +294,7 @@ void render_font (FT_Face face, char *fontname, int size, int thickness) { error = FT_Get_Glyph( face->glyph, &glyph ); if( i == 0 ) { - out_bitmap = create_bitmap( f266CeilToInt(face->glyph->metrics.horiAdvance), + out_bitmap = create_bitmap( f266CeilToInt(MAX(face->glyph->metrics.horiAdvance, face->glyph->metrics.width + face->glyph->metrics.horiBearingX)), f266CeilToInt((max_bearing_y<<6) - face->glyph->metrics.horiBearingY + face->glyph->metrics.height + thickness) ); } |