[cairo-commit] src/cairo-ft-font.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Oct 13 05:09:07 PDT 2011


 src/cairo-ft-font.c |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 7df2c113b16666d4b1f3e4c6f4cb045c40929c4f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Oct 13 13:02:51 2011 +0100

    ft: Add missing break to enable BGR subpixel rendering
    
    Reported-by: Ingo Ruhnke <grumbel at gmx.de>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40456
    Original-patch-by: Simon Elmir <nerd65536+freedesktop at gmail.com>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index b3c1478..5790395 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -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;
-	    }
+	    break;
+
 	case FT_RENDER_MODE_LCD_V:
-	    if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_VBGR) {
+	    if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_VBGR)
 		rgba = FC_RGBA_VBGR;
-	    } else {
+	    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);


More information about the cairo-commit mailing list