mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 16:58:01 +02:00
ft: Add missing break to enable BGR subpixel rendering
Reported-by: Ingo Ruhnke <grumbel@gmx.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40456 Original-patch-by: Simon Elmir <nerd65536+freedesktop@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
9208df1630
commit
7df2c113b1
1 changed files with 11 additions and 10 deletions
|
|
@ -1344,25 +1344,26 @@ _render_glyph_outline (FT_Face face,
|
|||
|
||||
switch (render_mode) {
|
||||
case FT_RENDER_MODE_LCD:
|
||||
if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_BGR) {
|
||||
if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_BGR)
|
||||
rgba = FC_RGBA_BGR;
|
||||
} else {
|
||||
else
|
||||
rgba = FC_RGBA_RGB;
|
||||
}
|
||||
case FT_RENDER_MODE_LCD_V:
|
||||
if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_VBGR) {
|
||||
rgba = FC_RGBA_VBGR;
|
||||
} else {
|
||||
rgba = FC_RGBA_VRGB;
|
||||
}
|
||||
break;
|
||||
|
||||
case FT_RENDER_MODE_LCD_V:
|
||||
if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_VBGR)
|
||||
rgba = FC_RGBA_VBGR;
|
||||
else
|
||||
rgba = FC_RGBA_VRGB;
|
||||
break;
|
||||
|
||||
case FT_RENDER_MODE_MONO:
|
||||
case FT_RENDER_MODE_LIGHT:
|
||||
case FT_RENDER_MODE_NORMAL:
|
||||
case FT_RENDER_MODE_MAX:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if HAVE_FT_LIBRARY_SETLCDFILTER
|
||||
FT_Library_SetLcdFilter (library, lcd_filter);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue