Bugs in .buildnativefontmap
"Russell Lang" <[email protected]> Thu, 25 Nov 2004 00:13:03 +1100
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Message-ID | <41A5238F.32010.1FC9BE44@localhost> |
Craig Ringer is working on a fontconfig patch based on the nativefonts interface. Some debugging on IRC this night found two errors in .buildnativefontmap. For GS_8_1X and HEAD. Log message: Correct errors in .buildnativefontmap procedure. DETAILS: The enumeration of fonts returned by .getnativefonts was being given "array true" which was causing a typecheck in forall because of a missing exch. It should have been "true array". Also, .findfontname was returning a name rather than a string, so cvn was failing because it was already a name. Russell Lang [email protected] Ghostgum Software Pty Ltd http://www.ghostgum.com.au/ _______________________________________________ gs-code-review mailing list [email protected] http://www.ghostscript.com/mailman/listinfo/gs-code-review
gs_fonts1.txt
(application/octet-stream, 609 B)
--- l:/cvs/gs/lib/gs_fonts.ps Fri Aug 06 22:01:45 2004
+++ lib/gs_fonts.ps Wed Nov 24 12:57:53 2004
@@ -371,6 +371,7 @@
} if
.getnativefonts dup
{
+ exch
{
% stack: [ (name) (path) ]
% verify the font name ourselves
@@ -384,7 +385,7 @@
not { dup 0 get } if % stack: (newname) [ (name) (path) ]
% DEBUG { ( found ) print dup print (\n) print flush } if
% add entry to the fontmap
- 1 index exch 0 exch cvn put
+ 1 index exch 0 exch dup type /nametype eq not {cvn} if put
aload pop .definefontmap
} ifelse
} forall