[Xorg-commit] xc/lib/font/fontfile fontdir.c,1.1.4.2,1.1.4.3 fontfile.c,1.1.4.2,1.1.4.3

Kaleb Keithley xserver-commit at pdx.freedesktop.org
Sat Dec 6 15:24:55 EET 2003


Committed by: kaleb

Update of /cvs/xorg/xc/lib/font/fontfile
In directory pdx:/home/kaleb/xorg/xc.XORG-CURRENT/lib/font/fontfile

Modified Files:
      Tag: XORG-CURRENT
	fontdir.c fontfile.c 
Log Message:
merge XFree86 4.3.99.901 (RC1) from vendor branch

Index: fontdir.c
===================================================================
RCS file: /cvs/xorg/xc/lib/font/fontfile/fontdir.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- fontdir.c	26 Nov 2003 22:48:40 -0000	1.1.4.2
+++ fontdir.c	6 Dec 2003 13:24:22 -0000	1.1.4.3
@@ -1,3 +1,4 @@
+/* $XdotOrg$ */
 /* $Xorg: fontdir.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */
 
 /*
@@ -25,7 +26,7 @@
 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 @@
     FontScalableExtraPtr    extra;
     FontEntryPtr	    bitmap = 0, scalable;
     Bool		    isscale;
+#ifdef FONTDIRATTRIB
+    Bool		    scalable_xlfd;
+#endif
 
     renderer = FontFileMatchRenderer (fileName);
     if (!renderer)
@@ -656,8 +660,15 @@
 	      !(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;

Index: fontfile.c
===================================================================
RCS file: /cvs/xorg/xc/lib/font/fontfile/fontfile.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- fontfile.c	26 Nov 2003 22:48:40 -0000	1.1.4.2
+++ fontfile.c	6 Dec 2003 13:24:23 -0000	1.1.4.3
@@ -1,3 +1,4 @@
+/* $XdotOrg$ */
 /* $Xorg: fontfile.c,v 1.4 2001/02/09 02:04:03 xorgcvs Exp $ */
 
 /*
@@ -25,7 +26,7 @@
 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 +532,8 @@
 
     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);





More information about the xorg-commit mailing list