diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2006-08-08 06:12:13 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2006-08-08 06:12:13 -0400 |
commit | 501e5cc8839e104ec21a5aba61cff3580d34f26b (patch) | |
tree | 20af63aea33d777b67fb89e1bc94d905efe2de2f /src | |
parent | 89fc22de871d61517a4955875f12326b4dc3389a (diff) | |
download | cairo-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.c | 15 |
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, |