The FT_LOAD_TARGET_* flags aren't separate bitfields, but rather an embedded subfield, so test with FT_LOAD_TARGET_MODE (val->key.flags) == FT_RENDER_LCD, and similar.

This commit is contained in:
Owen Taylor 2005-07-21 18:12:21 +00:00
parent 3c0bfb3975
commit 857c9fe1c4
2 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2005-07-21 Owen Taylor <otaylor@redhat.com>
* src/cairo-ft-font.c: The FT_LOAD_TARGET_* flags aren't separate
bitfields, but rather an embedded subfield, so test with
FT_LOAD_TARGET_MODE (val->key.flags) == FT_RENDER_LCD, and similar.
2005-07-21 Keith Packard <keithp@keithp.com>
reviewed by: cworth, otaylor

View file

@ -837,8 +837,8 @@ _render_glyph_outline (FT_Face face,
/* Looks like fb handles zero-sized images just fine */
if ((val->key.flags & FT_LOAD_MONOCHROME) != 0)
format = CAIRO_FORMAT_A8;
else if ((val->key.flags &
(FT_LOAD_TARGET_LCD | FT_LOAD_TARGET_LCD_V)) != 0)
else if (FT_LOAD_TARGET_MODE (val->key.flags) == FT_RENDER_MODE_LCD ||
FT_LOAD_TARGET_MODE (val->key.flags) == FT_RENDER_MODE_LCD_V)
format= CAIRO_FORMAT_ARGB32;
else
format = CAIRO_FORMAT_A8;
@ -858,9 +858,9 @@ _render_glyph_outline (FT_Face face,
/* XXX not a complete set of flags. This code
* will go away when cworth rewrites the glyph
* cache code */
if (val->key.flags & FT_LOAD_TARGET_LCD)
if (FT_LOAD_TARGET_MODE (val->key.flags) == FT_RENDER_MODE_LCD)
rgba = FC_RGBA_RGB;
else if (val->key.flags & FT_LOAD_TARGET_LCD_V)
else if (FT_LOAD_TARGET_MODE (val->key.flags) == FT_RENDER_MODE_LCD_V)
rgba = FC_RGBA_VBGR;
switch (rgba) {