diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:28:20 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:28:20 +0000 |
commit | fb0cbe6e7287d635a5f368e055cc0aae6ed50125 (patch) | |
tree | 24940f60afb7e084ca0760710bf9d1ffd21c384a /src/fontfile/fontdir.c | |
parent | ca219ad2fc4f392505d378dfa5a2b34d33de6d61 (diff) |
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16
Diffstat (limited to 'src/fontfile/fontdir.c')
-rw-r--r-- | src/fontfile/fontdir.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/src/fontfile/fontdir.c b/src/fontfile/fontdir.c index a2bd411..28e58b6 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.19 2002/05/31 18:45:50 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontdir.c,v 3.22 2003/07/07 16:40:11 eich Exp $ */ /* * Author: Keith Packard, MIT X Consortium @@ -678,11 +678,10 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName) #endif if (!isscale || (vals.values_supplied & SIZE_SPECIFY_MASK)) { - /* If the fontname says it is nonScalable, make sure that the - * renderer supports OpenBitmap and GetInfoBitmap. + /* + * If the renderer doesn't support OpenBitmap, FontFileOpenFont + * will still do the right thing. */ - if (renderer->OpenBitmap && renderer->GetInfoBitmap) - { entry.type = FONT_ENTRY_BITMAP; entry.u.bitmap.renderer = renderer; entry.u.bitmap.pFont = NullFont; @@ -693,7 +692,6 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName) xfree (entry.u.bitmap.fileName); return FALSE; } - } } /* * Parse out scalable fields from XLFD names - a scalable name @@ -701,11 +699,6 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName) */ if (isscale) { - /* If the fontname says it is scalable, make sure that the - * renderer supports OpenScalable and GetInfoScalable. - */ - if (renderer->OpenScalable && renderer->GetInfoScalable) - { if (vals.values_supplied & SIZE_SPECIFY_MASK) { bzero((char *)&zeroVals, sizeof(zeroVals)); @@ -728,10 +721,13 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName) if (!(existing->u.scalable.fileName = FontFileSaveString (fileName))) return FALSE; } - FontFileCompleteXLFD(&vals, &vals); - FontFileAddScaledInstance (existing, &vals, NullFont, - bitmap->name.name); - return TRUE; + if(bitmap) + { + FontFileCompleteXLFD(&vals, &vals); + FontFileAddScaledInstance (existing, &vals, NullFont, + bitmap->name.name); + return TRUE; + } } } if (!(entry.u.scalable.fileName = FontFileSaveString (fileName))) @@ -795,11 +791,13 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName) } if (vals.values_supplied & SIZE_SPECIFY_MASK) { - FontFileCompleteXLFD(&vals, &vals); - FontFileAddScaledInstance (scalable, &vals, NullFont, - bitmap->name.name); + if(bitmap) + { + FontFileCompleteXLFD(&vals, &vals); + FontFileAddScaledInstance (scalable, &vals, NullFont, + bitmap->name.name); + } } - } } return TRUE; } |