[vlc-commits] [Git][videolan/vlc][master] freetype: distinguish synthesized styles in the outline cache
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Tue Oct 27 07:33:16 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
3bbb5a8d by Nir Halay at 2026-10-27T08:04:17+01:00
freetype: distinguish synthesized styles in the outline cache
Include successfully synthesized italic and bold styles in the flags used by the outline cache. Otherwise styled glyphs can reuse outlines cached for the regular face, leaving an upright outline behind an italic foreground.
- - - - -
1 changed file:
- modules/text_renderer/freetype/text_layout.c
Changes:
=====================================
modules/text_renderer/freetype/text_layout.c
=====================================
@@ -1116,10 +1116,12 @@ static int LoadGlyphs( filter_t *p_filter, paragraph_t *p_paragraph,
{
FT_Matrix matrix = { .xx = 0x10000L, .xy = 0.12 * 0x10000L,
.yy = 0x10000L, .yx = 0 };
- FT_Glyph_Transform( transformed, &matrix, 0 );
+ if( !FT_Glyph_Transform( transformed, &matrix, 0 ) )
+ style_flags |= FT_STYLE_FLAG_ITALIC;
}
- if( b_embolden )
- FT_Outline_Embolden( &((FT_OutlineGlyph)transformed)->outline, 1<<6 );
+ if( b_embolden &&
+ !FT_Outline_Embolden( &((FT_OutlineGlyph)transformed)->outline, 1<<6 ) )
+ style_flags |= FT_STYLE_FLAG_BOLD;
vlc_ftcache_Glyph_Release( p_sys->ftcache, &p_bitmaps->cglyph );
p_bitmaps->cglyph.p_glyph = transformed;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3bbb5a8d907f90db9d8c4c76b845b149e7241e4d
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3bbb5a8d907f90db9d8c4c76b845b149e7241e4d
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list