summaryrefslogtreecommitdiff
path: root/dix/dixfonts.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-05-20 10:20:14 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-05-20 10:20:14 +0930
commit99d28c3ef37aeffe7d8ec41e45a650ba248c6958 (patch)
treef64efb86b1bc5f0c864d6a4ad0d79291f96b1c15 /dix/dixfonts.c
parentfc7e2566cc076c0d979f74871bc436df43401058 (diff)
parent0178b6a4abed0df3e90ba393709ed566105e7c2c (diff)
Merge branch 'master' into mpx
Conflicts: Xext/xprint.c (removed in master) config/hal.c dix/main.c hw/kdrive/ati/ati_cursor.c (removed in master) hw/kdrive/i810/i810_cursor.c (removed in master) hw/xprint/ddxInit.c (removed in master) xkb/ddxLoad.c
Diffstat (limited to 'dix/dixfonts.c')
-rw-r--r--dix/dixfonts.c58
1 files changed, 27 insertions, 31 deletions
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index 0e6fa0300..83b264a29 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -302,8 +302,14 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
c->fontname = newname;
c->fnamelen = newlen;
c->current_fpe = 0;
- if (--aliascount <= 0)
+ if (--aliascount <= 0) {
+ /* We've tried resolving this alias 20 times, we're
+ * probably stuck in an infinite loop of aliases pointing
+ * to each other - time to take emergency exit!
+ */
+ err = BadImplementation;
break;
+ }
continue;
}
if (err == BadFontName) {
@@ -1931,37 +1937,27 @@ GetDefaultPointSize ()
FontResolutionPtr
GetClientResolutions (int *num)
{
-#ifdef XPRINT
- if (requestingClient && requestingClient->fontResFunc != NULL &&
- !requestingClient->clientGone)
- {
- return (*requestingClient->fontResFunc)(requestingClient, num);
- }
- else
-#endif
- {
- static struct _FontResolution res;
- ScreenPtr pScreen;
+ static struct _FontResolution res;
+ ScreenPtr pScreen;
- pScreen = screenInfo.screens[0];
- res.x_resolution = (pScreen->width * 25.4) / pScreen->mmWidth;
- /*
- * XXX - we'll want this as long as bitmap instances are prevalent
- so that we can match them from scalable fonts
- */
- if (res.x_resolution < 88)
- res.x_resolution = 75;
- else
- res.x_resolution = 100;
- res.y_resolution = (pScreen->height * 25.4) / pScreen->mmHeight;
- if (res.y_resolution < 88)
- res.y_resolution = 75;
- else
- res.y_resolution = 100;
- res.point_size = 120;
- *num = 1;
- return &res;
- }
+ pScreen = screenInfo.screens[0];
+ res.x_resolution = (pScreen->width * 25.4) / pScreen->mmWidth;
+ /*
+ * XXX - we'll want this as long as bitmap instances are prevalent
+ so that we can match them from scalable fonts
+ */
+ if (res.x_resolution < 88)
+ res.x_resolution = 75;
+ else
+ res.x_resolution = 100;
+ res.y_resolution = (pScreen->height * 25.4) / pScreen->mmHeight;
+ if (res.y_resolution < 88)
+ res.y_resolution = 75;
+ else
+ res.y_resolution = 100;
+ res.point_size = 120;
+ *num = 1;
+ return &res;
}
/*