1 --- misc/cairo-1.10.2/src/cairo-ft-font.c 2012-01-06 09:09:21.500373823 +0000
2 +++ misc/build/cairo-1.10.2/src/cairo-ft-font.c 2012-01-06 09:31:01.645238786 +0000
5 #if HAVE_FT_LIBRARY_SETLCDFILTER
6 #include FT_LCD_FILTER_H
11 /* Fontconfig version older than 2.6 didn't have these options */
12 @@ -1217,6 +1219,26 @@
13 return CAIRO_STATUS_SUCCESS;
16 +static void try_FT_Library_SetLcdFilter( FT_Library library,
19 +#if HAVE_FT_LIBRARY_SETLCDFILTER
20 + FT_Library_SetLcdFilter (library, lcd_filter);
22 + static void (*pFT_Library_SetLcdFilter) (FT_Library, int);
23 + static int dlsymed = 0;
27 + pFT_Library_SetLcdFilter = dlsym(RTLD_DEFAULT, "FT_Library_SetLcdFilter");
31 + if (pFT_Library_SetLcdFilter)
32 + (*pFT_Library_SetLcdFilter) (library, lcd_filter);
36 /* Converts an outline FT_GlyphSlot into an image
38 * This could go through _render_glyph_bitmap as well, letting
39 @@ -1350,15 +1372,11 @@
43 -#if HAVE_FT_LIBRARY_SETLCDFILTER
44 - FT_Library_SetLcdFilter (library, lcd_filter);
46 + try_FT_Library_SetLcdFilter(library, lcd_filter);
48 fterror = FT_Render_Glyph (face->glyph, render_mode);
50 -#if HAVE_FT_LIBRARY_SETLCDFILTER
51 - FT_Library_SetLcdFilter (library, FT_LCD_FILTER_NONE);
53 + try_FT_Library_SetLcdFilter(library, FT_LCD_FILTER_NONE);
56 return _cairo_error (CAIRO_STATUS_NO_MEMORY);