"/TimesNewRomanPSMT findfont" selects the system font in /usr/share/... After Times-Roman is substituted for the TimesNewRomanPSMT the algorithm looks first at system fonts before %rom%. %rom% should be preferred, uninstalling the system font allows the %rom%Resource/Font/NimbusRomNo9L-Regu... Of course, "/Times-Roman findfont" select the rom urw font as expected.
This problem is caused by the interaction between fontconfig and Fontmap features. As a work-around, Ghostscript can be configured with --disable-fontconfig flag. This bug may cause raster differences between hosts. The test can be split into 2 parts: /aaa findfont pop % calls fontconfig /Times-Roman findfont % loads the font from fontconfig location Initially, Fontmap file maps /Times-Roman to /NumbusRomNo9L-Regu There's no entry for /NumbusRomNo9L-Regu . fontconfig maps all font names to the corresponding files in the system location. As a result, /NumbusRomNo9L-Regu is mapped to the system location and /Times-Roman is redirected to the same place.
Really, I think the problem is that the native font enumeration is overriding what's in the Fontmap. Can we just change the code to avoid overwriting existing names?
Created attachment 5344 [details] Ghostscript_New_Color_Management.pdf The attachment (Michael's color management document) is another example of the fontconfig problem. I believe fontconfig is below reasonable functionality standards to be the default configuration. ./gs ~/Downloads/Ghostscript_New_Color_Management.pdf GPL Ghostscript 8.70 (2009-07-28) Copyright (C) 2009 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 21. Page 1 Substituting font Times-Roman for Times New Roman. Loading NimbusRomNo9L-Regu font from %rom%Resource/Font/NimbusRomNo9L-Regu... 2376936 1052123 11409548 10103367 3 done. Substituting font Times-Bold for Times New Roman,Bold. Loading NimbusRomNo9L-Medi font from %rom%Resource/Font/NimbusRomNo9L-Medi... 2514176 1193585 11446308 10140906 3 done. >>showpage, press <return> to continue<< Page 2 Substituting font Times-Roman for Times New Roman. Substituting font Times-Bold for Times New Roman,Bold. Can't find (or can't open) font file %rom%Resource/Font/ArialMT. Can't find (or can't open) font file ArialMT. Can't find (or can't open) font file %rom%Resource/Font/ArialMT. Can't find (or can't open) font file ArialMT. Querying operating system for font files... Error: /rangecheck in /findfont Operand stack: --dict:9/18(L)-- F6 12 FontObject --dict:9/9(L)-- --dict:9/9(L)-- Arial Arial Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop --nostringval-- --nostringval-- 3 1 21 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- 1820 8 9 %oparray_pop Dictionary stack: --dict:1146/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:285/300(ro)(G)-- --dict:22/25(L)-- --dict:4/6(L)-- --dict:27/40(L)-- Current allocation mode is local GPL Ghostscript 8.70: Unrecoverable error, exit code 1
I'm afraid we do need to turn off fontconfig and cairo (link dependency) until this is resolved. There are simply too many broken files. Assign the problem back to Alex when it the default is disabled. We'll try fontconfig again when (and if) this problem is fixed.
Re-assigning bugs which still have work to do.
Assigning to Chris per discussion with Henry. This isn't exactly a font issue, but he can work with Alex to determine the best way to tackle it.
Fixed in: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=3edd8e8e We will now first check the explicitly defined fontmap (i.e. the one built from the file Resource/Init/FontMap), *then* we'll check for the font resource file by name (i.e. in Resource/Font), and last we'll check the native fonts. The problem with the cluster is unsolvable if we keep fontconfig and don't specify the exact font set installed on every cluster machine. If we do want reinstate the fontconfig option in the cluster builds, we can keep consistent results by disabling it at run-time with the "-dNONATIVEFONTMAP" option.