Fix build for old versions of freetype without FT_Library_SetLcdFilter
http://codereview.appspot.com/4625071/ git-svn-id: http://skia.googlecode.com/svn/trunk@1764 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
cd88d7c233
commit
5070d79edd
@ -39,7 +39,9 @@
|
|||||||
// In the past, FT_GlyphSlot_Own_Bitmap was defined in this header file.
|
// In the past, FT_GlyphSlot_Own_Bitmap was defined in this header file.
|
||||||
#include FT_SYNTHESIS_H
|
#include FT_SYNTHESIS_H
|
||||||
#include FT_XFREE86_H
|
#include FT_XFREE86_H
|
||||||
|
#ifdef FT_LCD_FILTER_H
|
||||||
#include FT_LCD_FILTER_H
|
#include FT_LCD_FILTER_H
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef FT_ADVANCES_H
|
#ifdef FT_ADVANCES_H
|
||||||
#include FT_ADVANCES_H
|
#include FT_ADVANCES_H
|
||||||
@ -116,8 +118,12 @@ InitFreetype() {
|
|||||||
|
|
||||||
// Setup LCD filtering. This reduces colour fringes for LCD rendered
|
// Setup LCD filtering. This reduces colour fringes for LCD rendered
|
||||||
// glyphs.
|
// glyphs.
|
||||||
|
#ifdef FT_LCD_FILTER_DEFAULT
|
||||||
err = FT_Library_SetLcdFilter(gFTLibrary, FT_LCD_FILTER_DEFAULT);
|
err = FT_Library_SetLcdFilter(gFTLibrary, FT_LCD_FILTER_DEFAULT);
|
||||||
gLCDSupport = err == 0;
|
gLCDSupport = err == 0;
|
||||||
|
#else
|
||||||
|
gLCDSupport = false;
|
||||||
|
#endif
|
||||||
gLCDSupportValid = true;
|
gLCDSupportValid = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user