summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2006-08-08 06:12:13 -0400
committerBehdad Esfahbod <behdad@behdad.org>2006-08-08 06:12:13 -0400
commit501e5cc8839e104ec21a5aba61cff3580d34f26b (patch)
tree20af63aea33d777b67fb89e1bc94d905efe2de2f /src
parent89fc22de871d61517a4955875f12326b4dc3389a (diff)
downloadcairo-501e5cc8839e104ec21a5aba61cff3580d34f26b.tar.gz
Restructure subpixel_order handling such that the code doesn't look suspicious!
Shouldn't make /any/ difference at all in any case.
Diffstat (limited to 'src')
-rw-r--r--src/cairo-ft-font.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index ca78d62ca..daa9e9de8 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -1233,6 +1233,8 @@ _get_pattern_ft_options (FcPattern *pattern)
antialias = FcTrue;
if (antialias) {
+ cairo_subpixel_order_t subpixel_order;
+
if (!bitmap)
ft_options.load_flags |= FT_LOAD_NO_BITMAP;
@@ -1247,25 +1249,28 @@ _get_pattern_ft_options (FcPattern *pattern)
switch (rgba) {
case FC_RGBA_RGB:
- ft_options.base.subpixel_order = CAIRO_SUBPIXEL_ORDER_RGB;
+ subpixel_order = CAIRO_SUBPIXEL_ORDER_RGB;
break;
case FC_RGBA_BGR:
- ft_options.base.subpixel_order = CAIRO_SUBPIXEL_ORDER_BGR;
+ subpixel_order = CAIRO_SUBPIXEL_ORDER_BGR;
break;
case FC_RGBA_VRGB:
- ft_options.base.subpixel_order = CAIRO_SUBPIXEL_ORDER_VRGB;
+ subpixel_order = CAIRO_SUBPIXEL_ORDER_VRGB;
break;
case FC_RGBA_VBGR:
- ft_options.base.subpixel_order = CAIRO_SUBPIXEL_ORDER_VBGR;
+ subpixel_order = CAIRO_SUBPIXEL_ORDER_VBGR;
break;
case FC_RGBA_UNKNOWN:
case FC_RGBA_NONE:
default:
+ subpixel_order = CAIRO_SUBPIXEL_ORDER_DEFAULT;
break;
}
- if (ft_options.base.subpixel_order != CAIRO_SUBPIXEL_ORDER_DEFAULT)
+ if (subpixel_order != CAIRO_SUBPIXEL_ORDER_DEFAULT) {
+ ft_options.base.subpixel_order = subpixel_order;
ft_options.base.antialias = CAIRO_ANTIALIAS_SUBPIXEL;
+ }
#ifdef FC_HINT_STYLE
if (FcPatternGetInteger (pattern,