Module Name:xsrc
Committed By: mrg
Date: Fri May 31 21:04:06 UTC 2013
Modified Files:
xsrc/external/mit/libXft/dist/src: xftdpy.c
Log Message:
merge libXft 2.3.1.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/libXft/dist/src/xftdpy.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/libXft/dist/src/xftdpy.c
diff -u xsrc/external/mit/libXft/dist/src/xftdpy.c:1.2 xsrc/external/mit/libXft/dist/src/xftdpy.c:1.3
--- xsrc/external/mit/libXft/dist/src/xftdpy.c:1.2 Sun Nov 8 10:17:36 2009
+++ xsrc/external/mit/libXft/dist/src/xftdpy.c Fri May 31 21:04:06 2013
@@ -32,19 +32,19 @@ _XftCloseDisplay (Display *dpy, XExtCode
info = _XftDisplayInfoGet (dpy, FcFalse);
if (!info)
return 0;
-
+
/*
* Get rid of any dangling unreferenced fonts
*/
info->max_unref_fonts = 0;
XftFontManageMemory (dpy);
-
+
/*
* Clean up the default values
*/
if (info->defaults)
FcPatternDestroy (info->defaults);
-
+
/*
* Unhook from the global list
*/
@@ -52,7 +52,7 @@ _XftCloseDisplay (Display *dpy, XExtCode
if (info->display == dpy)
break;
*prev = info->next;
-
+
free (info);
return 0;
}
@@ -126,8 +126,8 @@ _XftDisplayInfoGet (Display *dpy, FcBool
{
Visual *visual = DefaultVisual (dpy, DefaultScreen (dpy));
XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual);
-
- printf ("XftDisplayInfoGet Default visual 0x%x ",
+
+ printf ("XftDisplayInfoGet Default visual 0x%x ",
(int) visual->visualid);
if (format)
{
@@ -146,7 +146,7 @@ _XftDisplayInfoGet (Display *dpy, FcBool
}
else
printf ("No Render format for default visual\n");
-
+
printf ("XftDisplayInfoGet initialized, hasRender set to \"%s\"\n",
info->hasRender ? "True" : "False");
}
@@ -156,7 +156,7 @@ _XftDisplayInfoGet (Display *dpy, FcBool
info->colors[i].pict = 0;
}
info->fonts = NULL;
-
+
info->next = _XftDisplayInfo;
_XftDisplayInfo = info;
@@ -167,7 +167,7 @@ _XftDisplayInfoGet (Display *dpy, FcBool
if (XftDebug () & XFT_DBG_CACHE)
printf ("global max cache memory %ld\n", info->max_glyph_memory);
-
+
info->num_unref_fonts = 0;
info->max_unref_fonts = XftDefaultGetInteger (dpy,
XFT_MAX_UNREF_FONTS, 0,
@@ -177,7 +177,7 @@ _XftDisplayInfoGet (Display *dpy, FcBool
memset (info->fontHash, '\0', sizeof (XftFont *) * XFT_NUM_FONT_HASH);
return info;
-
+
bail1:
free (info);
bail0:
@@ -282,7 +282,7 @@ XftDefaultSet (Display *dpy, FcPattern *
}
_X_HIDDEN int
-XftDefaultParseBool (char *v)
+XftDefaultParseBool (const char *v)
{
charc0, c1;
@@ -307,7 +307,7 @@ XftDefaultParseBool (char *v)
}
static Bool
-_XftDefaultInitBool (Display *dpy, FcPattern *pat, char *option)
+_XftDefaultInitBool (Display *dpy, FcPattern *pat, const char *option)
{
char*v;
int i;
@@ -319,7 +319,7 @@ _XftDefaultInitBool (Display *dpy, FcPat
}
static Bool
-_XftDefaultInitDouble (Display *dpy, FcPattern *pat, char *option)
+_XftDefaultInitDouble (Display *dpy, FcPattern *pat, const char *option)
{
char*v, *e;
double d;
@@ -335,7 +335,7 @@ _XftDefaultInitDouble (Display *dpy, FcP
}
static Bool
-_XftDefaultInitInteger (Display *dpy, FcPattern *pat, char *option)
+_XftDefaultInitInteger (Display *dpy, FcPattern *pat, const char *option)
{
char*v, *e;
int i;
@@ -369,27 +369,25 @@ _XftDefaultInit (Display *dpy)
goto bail1;
if (!_XftDefaultInitInteger (dpy, pat, FC_RGBA))
goto bail1;
+if (!_XftDefaultInitInteger (dpy, pat, FC_LCD_FILTER))
+ goto bail1;
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))
goto bail1;
if (!_XftDefaultInitInteger (dpy, pat, XFT_MAX_GLYPH_MEMORY))
goto bail1;
-
+
return pat;
-
+
bail1:
FcPatternDestroy (pat);
bail0:
@@ -404,7 +402,7 @@ _XftDefaultGet (Display *dpy, const char
if (!info)
return FcResultNoMatch;
-
+
if (!info->defaults)
{
info->defaults = _XftDefaultInit (dpy);
@@ -462,7 +460,7 @@ XftDefaultSubstitute (Display *dpy, int
if (FcPatternGet (pattern, XFT_RENDER, 0, &v) == FcResultNoMatch)
{
FcPatternAddBool (pattern, XFT_RENDER,
- XftDefaultGetBool (dpy, XFT_RENDER, screen,
+ XftDefaultGetBool (dpy, XFT_RENDER, screen,
XftDefaultHasRender (dpy)));
}
if (FcPatternGet (pattern, FC_ANT