summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-10-10 13:00:35 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-10-10 13:09:30 -0700
commit550b2f76401c292d982700b60326e0a837e391b4 (patch)
tree11dbbe57d0cff0957671b9b28f4c9ce286e4a459 /src
parent21a59c10803582c8f90d3b5f32e8f0240c050adf (diff)
downloadxorg-lib-libXft-550b2f76401c292d982700b60326e0a837e391b4.tar.gz
Remove fontconfig and freetype ifdef-fu and instead require non-ancinet versions of both
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'src')
-rw-r--r--src/xftdpy.c12
-rw-r--r--src/xftfreetype.c32
2 files changed, 1 insertions, 43 deletions
diff --git a/src/xftdpy.c b/src/xftdpy.c
index 73b0bed..c5b756e 100644
--- a/src/xftdpy.c
+++ b/src/xftdpy.c
@@ -369,22 +369,16 @@ _XftDefaultInit (Display *dpy)
goto bail1;
if (!_XftDefaultInitInteger (dpy, pat, FC_RGBA))
goto bail1;
-#ifdef FC_LCD_FILTER
if (!_XftDefaultInitInteger (dpy, pat, FC_LCD_FILTER))
goto bail1;
-#endif
if (!_XftDefaultInitBool (dpy, pat, FC_ANTIALIAS))
goto bail1;
-#ifdef FC_EMBOLDEN
if (!_XftDefaultInitBool (dpy, pat, FC_EMBOLDEN))
goto bail1;
-#endif
if (!_XftDefaultInitBool (dpy, pat, FC_AUTOHINT))
goto bail1;
-#ifdef FC_HINT_STYLE
if (!_XftDefaultInitInteger (dpy, pat, FC_HINT_STYLE))
goto bail1;
-#endif
if (!_XftDefaultInitBool (dpy, pat, FC_HINTING))
goto bail1;
if (!_XftDefaultInitBool (dpy, pat, FC_MINSPACE))
@@ -475,28 +469,24 @@ XftDefaultSubstitute (Display *dpy, int screen, FcPattern *pattern)
XftDefaultGetBool (dpy, FC_ANTIALIAS, screen,
True));
}
-#ifdef FC_EMBOLDEN
if (FcPatternGet (pattern, FC_EMBOLDEN, 0, &v) == FcResultNoMatch)
{
FcPatternAddBool (pattern, FC_EMBOLDEN,
XftDefaultGetBool (dpy, FC_EMBOLDEN, screen,
False));
}
-#endif
if (FcPatternGet (pattern, FC_HINTING, 0, &v) == FcResultNoMatch)
{
FcPatternAddBool (pattern, FC_HINTING,
XftDefaultGetBool (dpy, FC_HINTING, screen,
True));
}
-#ifdef FC_HINT_STYLE
if (FcPatternGet (pattern, FC_HINT_STYLE, 0, &v) == FcResultNoMatch)
{
FcPatternAddInteger (pattern, FC_HINT_STYLE,
XftDefaultGetInteger (dpy, FC_HINT_STYLE, screen,
FC_HINT_FULL));
}
-#endif
if (FcPatternGet (pattern, FC_AUTOHINT, 0, &v) == FcResultNoMatch)
{
FcPatternAddBool (pattern, FC_AUTOHINT,
@@ -525,14 +515,12 @@ XftDefaultSubstitute (Display *dpy, int screen, FcPattern *pattern)
XftDefaultGetInteger (dpy, FC_RGBA, screen,
subpixel));
}
-#ifdef FC_LCD_FILTER
if (FcPatternGet (pattern, FC_LCD_FILTER, 0, &v) == FcResultNoMatch)
{
FcPatternAddInteger (pattern, FC_LCD_FILTER,
XftDefaultGetInteger (dpy, FC_LCD_FILTER, screen,
FC_LCD_DEFAULT));
}
-#endif
if (FcPatternGet (pattern, FC_MINSPACE, 0, &v) == FcResultNoMatch)
{
FcPatternAddBool (pattern, FC_MINSPACE,
diff --git a/src/xftfreetype.c b/src/xftfreetype.c
index 4f71023..a3b8332 100644
--- a/src/xftfreetype.c
+++ b/src/xftfreetype.c
@@ -176,13 +176,8 @@ _XftUnlockFile (XftFtFile *f)
_XftLockError ("too many file unlocks");
}
-#if HAVE_FT_BITMAP_SIZE_Y_PPEM
#define X_SIZE(face,i) ((face)->available_sizes[i].x_ppem)
#define Y_SIZE(face,i) ((face)->available_sizes[i].y_ppem)
-#else
-#define X_SIZE(face,i) ((face)->available_sizes[i].width << 6)
-#define Y_SIZE(face,i) ((face)->available_sizes[i].height << 6)
-#endif
_X_HIDDEN FcBool
_XftSetFace (XftFtFile *f, FT_F26Dot6 xsize, FT_F26Dot6 ysize, FT_Matrix *matrix)
@@ -224,12 +219,9 @@ _XftSetFace (XftFtFile *f, FT_F26Dot6 xsize, FT_F26Dot6 ysize, FT_Matrix *matrix
* files have but a single strike per file, we can
* simply try both sizes.
*/
- if (
-#if HAVE_FT_BITMAP_SIZE_Y_PPEM
- FT_Set_Char_Size (face, face->available_sizes[best].x_ppem,
+ if (FT_Set_Char_Size (face, face->available_sizes[best].x_ppem,
face->available_sizes[best].y_ppem, 0, 0) != 0
&&
-#endif
FT_Set_Char_Size (face, face->available_sizes[best].width << 6,
face->available_sizes[best].height << 6,
0, 0) != 0)
@@ -379,9 +371,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
double aspect;
FcMatrix *font_matrix;
FcBool hinting, vertical_layout, autohint, global_advance;
-#ifdef FC_HINT_STYLE
int hint_style;
-#endif
FcChar32 hash, *hashp;
FT_Face face;
int nhash;
@@ -469,7 +459,6 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
goto bail1;
}
-#ifdef FC_LCD_FILTER
/*
* Get lcd_filter value
*/
@@ -482,7 +471,6 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
default:
goto bail1;
}
-#endif
/*
* Get matrix and transform values
@@ -557,7 +545,6 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
goto bail1;
}
-#ifdef FC_EMBOLDEN
switch (FcPatternGetBool (pattern, FC_EMBOLDEN, 0, &fi->embolden)) {
case FcResultNoMatch:
fi->embolden = FcFalse;
@@ -567,11 +554,7 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
default:
goto bail1;
}
-#else
- fi->embolden = FcFalse;
-#endif
-#ifdef FC_HINT_STYLE
switch (FcPatternGetInteger (pattern, FC_HINT_STYLE, 0, &hint_style)) {
case FcResultNoMatch:
hint_style = FC_HINT_FULL;
@@ -581,12 +564,9 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
default:
goto bail1;
}
-#endif
if (!hinting
-#ifdef FC_HINT_STYLE
|| hint_style == FC_HINT_NONE
-#endif
)
{
fi->load_flags |= FT_LOAD_NO_HINTING;
@@ -597,15 +577,11 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
*/
if (fi->antialias)
{
-#ifdef FC_HINT_STYLE
-#ifdef FT_LOAD_TARGET_LIGHT
if (FC_HINT_NONE < hint_style && hint_style < FC_HINT_FULL)
{
fi->load_flags |= FT_LOAD_TARGET_LIGHT;
}
else
-#endif
-#endif
{
/* autohinter will snap stems to integer widths, when
* the LCD targets are used.
@@ -613,23 +589,17 @@ XftFontInfoFill (Display *dpy, _Xconst FcPattern *pattern, XftFontInfo *fi)
switch (fi->rgba) {
case FC_RGBA_RGB:
case FC_RGBA_BGR:
-#ifdef FT_LOAD_TARGET_LCD
fi->load_flags |= FT_LOAD_TARGET_LCD;
-#endif
break;
case FC_RGBA_VRGB:
case FC_RGBA_VBGR:
-#ifdef FT_LOAD_TARGET_LCD_V
fi->load_flags |= FT_LOAD_TARGET_LCD_V;
-#endif
break;
}
}
}
-#ifdef FT_LOAD_TARGET_MONO
else
fi->load_flags |= FT_LOAD_TARGET_MONO;
-#endif
/* set vertical layout if requested */
switch (FcPatternGetBool (pattern, FC_VERTICAL_LAYOUT, 0, &vertical_layout)) {