summaryrefslogtreecommitdiff
path: root/src/fontfile/fontdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fontfile/fontdir.c')
-rw-r--r--src/fontfile/fontdir.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/fontfile/fontdir.c b/src/fontfile/fontdir.c
index 28e58b6..e94c483 100644
--- a/src/fontfile/fontdir.c
+++ b/src/fontfile/fontdir.c
@@ -1,3 +1,4 @@
+/* $XdotOrg: fontdir.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */
/* $Xorg: fontdir.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */
/*
@@ -25,7 +26,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
-/* $XFree86: xc/lib/font/fontfile/fontdir.c,v 3.22 2003/07/07 16:40:11 eich Exp $ */
+/* $XFree86: xc/lib/font/fontfile/fontdir.c,v 3.23 2003/12/02 19:50:40 dawes Exp $ */
/*
* Author: Keith Packard, MIT X Consortium
@@ -629,6 +630,9 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName)
FontScalableExtraPtr extra;
FontEntryPtr bitmap = 0, scalable;
Bool isscale;
+#ifdef FONTDIRATTRIB
+ Bool scalable_xlfd;
+#endif
renderer = FontFileMatchRenderer (fileName);
if (!renderer)
@@ -656,8 +660,15 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName)
!(vals.values_supplied & ENHANCEMENT_SPECIFY_MASK);
#ifdef FONTDIRATTRIB
#define UNSCALED_ATTRIB "unscaled"
- /* For scalable fonts, check if the "unscaled" attribute is present */
- if (isscale && dir->attributes && dir->attributes[0] == ':') {
+ scalable_xlfd = (isscale &&
+ (((vals.values_supplied & PIXELSIZE_MASK) == 0) ||
+ ((vals.values_supplied & POINTSIZE_MASK) == 0)));
+ /*
+ * For scalable fonts without a scalable XFLD, check if the "unscaled"
+ * attribute is present.
+ */
+ if (isscale && !scalable_xlfd &&
+ dir->attributes && dir->attributes[0] == ':') {
char *ptr1 = dir->attributes + 1;
char *ptr2;
int length;