[cairo-ft] Fontconfig defines for LCD constants when using Fontconfig < 2.6

This adds define for compatibility when without the new lcd filtering
constants (Fontconfig patch not yet applied, see bug 13566).
This commit is contained in:
Sylvain Pasche 2008-01-22 23:59:36 +01:00 committed by Behdad Esfahbod
parent 0013f2c269
commit 28d18f3f93
2 changed files with 18 additions and 0 deletions

View file

@ -1480,6 +1480,15 @@ typedef struct _cairo_ft_scaled_font {
const cairo_scaled_font_backend_t _cairo_ft_scaled_font_backend;
/* Fontconfig version older than 2.6 didn't have these options */
#ifndef FC_LCD_FILTER
#define FC_LCD_FILTER "lcdfilter"
#define FC_LCD_NONE 0
#define FC_LCD_DEFAULT 1
#define FC_LCD_LIGHT 2
#define FC_LCD_LEGACY 3
#endif
/* The load flags passed to FT_Load_Glyph control aspects like hinting and
* antialiasing. Here we compute them from the fields of a FcPattern.
*/

View file

@ -132,6 +132,15 @@ get_integer_default (Display *dpy,
#define FC_HINT_FULL 3
#endif
/* Fontconfig version older than 2.6 didn't have these options */
#ifndef FC_LCD_FILTER
#define FC_LCD_FILTER "lcdfilter"
#define FC_LCD_NONE 0
#define FC_LCD_DEFAULT 1
#define FC_LCD_LIGHT 2
#define FC_LCD_LEGACY 3
#endif
static void
_cairo_xlib_init_screen_font_options (Display *dpy, cairo_xlib_screen_info_t *info)
{