[gs-cvs] gs/src

Ray Johnston ray at ghostscript.com
Wed Apr 20 13:05:43 PDT 2005


Update of /cvs/ghostscript/gs/src
In directory casper2:/tmp/cvs-serv25186/src

Modified Files:
	zbfont.c 
Log Message:
Use the OrigFontName from an embedded font's FOntInfo dictionary since this
is where Windows PostScript dirver puts the real font name when embedding
fonts. Bug 688006 for customer 32.


Index: zbfont.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/zbfont.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- zbfont.c	15 Nov 2004 01:12:06 -0000	1.28
+++ zbfont.c	20 Apr 2005 20:05:41 -0000	1.29
@@ -534,7 +534,11 @@
 	    )
 	    memset(pomat, 0, sizeof(*pomat));
     }
-    if (dict_find_string((porigfont != NULL ? porigfont : op), ".Alias", &pfontname) > 0) {
+    /* Use the FontInfo/OrigFontName key preferrentially (created by MS PSCRIPT driver) */
+    if ((dict_find_string((porigfont != NULL ? porigfont : op), "FontInfo", &pfontname) > 0) &&
+        (dict_find_string(pfontname, "OrigFontName", &pfontname) > 0)) {
+	get_font_name(mem, pfname, pfontname);
+    } else if (dict_find_string((porigfont != NULL ? porigfont : op), ".Alias", &pfontname) > 0) {
         /* If we emulate the font, we want the requested name rather than a substitute. */
 	get_font_name(mem, pfname, pfontname);
     } else if (dict_find_string((porigfont != NULL ? porigfont : op), "FontName", &pfontname) > 0) {



More information about the gs-cvs mailing list