Commit e124678e authored by Francois Cartegnie's avatar Francois Cartegnie

freetype: fix strikeout style corruption

parent 1b7e0d98
...@@ -845,7 +845,7 @@ static inline int RenderAXYZ( filter_t *p_filter, ...@@ -845,7 +845,7 @@ static inline int RenderAXYZ( filter_t *p_filter,
BlendPixel ); BlendPixel );
/* underline/strikethrough are only rendered for the normal glyph */ /* underline/strikethrough are only rendered for the normal glyph */
if( g == 2 && ch->i_line_thickness > 0 ) if( g == 2 && ch->i_line_thickness > 0 && p_glyph->bitmap.rows )
BlendAXYZLine( p_picture, BlendAXYZLine( p_picture,
i_glyph_x, i_glyph_y + p_glyph->top, i_glyph_x, i_glyph_y + p_glyph->top,
i_a, i_x, i_y, i_z, i_a, i_x, i_y, i_z,
......
...@@ -1021,6 +1021,12 @@ static int LayoutLine( filter_t *p_filter, ...@@ -1021,6 +1021,12 @@ static int LayoutLine( filter_t *p_filter,
i_line_offset -= i_line_offset -=
abs( FT_FLOOR( FT_MulFix( p_face->descender * 2, abs( FT_FLOOR( FT_MulFix( p_face->descender * 2,
p_face->size->metrics.y_scale ) ) ); p_face->size->metrics.y_scale ) ) );
p_bitmaps->glyph_bbox.yMax =
__MAX( p_bitmaps->glyph_bbox.yMax,
- i_line_offset );
p_bitmaps->glyph_bbox.yMin =
__MIN( p_bitmaps->glyph_bbox.yMin,
i_line_offset - i_line_thickness );
} }
else if( i_line_thickness > 0 ) else if( i_line_thickness > 0 )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment