diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-12-04 22:03:04 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-12-04 22:03:04 +0000 |
commit | d82accff22e36919479b3ac1de72de6115688138 (patch) | |
tree | 8f8a36eb04d0845b87d30b881adc47d1f35cbc77 /src/fontfile | |
parent | fb0cbe6e7287d635a5f368e055cc0aae6ed50125 (diff) |
XFree86 4.3.99.901 (RC 1)xf86-4_3_99_901
Diffstat (limited to 'src/fontfile')
-rw-r--r-- | src/fontfile/fontdir.c | 16 | ||||
-rw-r--r-- | src/fontfile/fontfile.c | 4 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/fontfile/fontdir.c b/src/fontfile/fontdir.c index 28e58b6..b558c70 100644 --- a/src/fontfile/fontdir.c +++ b/src/fontfile/fontdir.c @@ -25,7 +25,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 +629,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 +659,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; diff --git a/src/fontfile/fontfile.c b/src/fontfile/fontfile.c index 6378c39..a0323be 100644 --- a/src/fontfile/fontfile.c +++ b/src/fontfile/fontfile.c @@ -25,7 +25,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/fontfile.c,v 3.19 2003/11/08 02:02:03 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontfile.c,v 3.21 2003/12/02 19:50:40 dawes Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -531,6 +531,8 @@ FontFileGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo, dir = (FontDirectoryPtr) fpe->private; bitmap = &entry->u.bitmap; + if (!bitmap || !bitmap->renderer->GetInfoBitmap) + return BadFontName; strcpy (fileName, dir->directory); strcat (fileName, bitmap->fileName); ret = (*bitmap->renderer->GetInfoBitmap) (fpe, pFontInfo, entry, fileName); |