<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Oct 29, 2021, at 03:34, Lawrence D'Oliveiro <<a href="mailto:ldo@geek-central.gen.nz" class="">ldo@geek-central.gen.nz</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Fri, 29 Oct 2021 01:56:45 -0500, Michael Brennen wrote:<br class=""><br class=""><blockquote type="cite" class="">... it finds the font in the .ttf file, NOT the .ttf.orig file. The<br class="">difference is that in this configuration gs does not go through FC to<br class="">find the fonts.<br class=""></blockquote><br class="">OK, so the problem lies somewhere in the Fontconfig setup, but only<br class="">when running that Ghostscript installation. Therefore there must be<br class="">something different in how Fontconfig is configured when running<br class="">Ghostscript. Environment variables in Apache?<br class=""><br class=""><blockquote type="cite" class="">The difficulty is that there is a *lot* going on<br class="">in those files, and trying to gain some idea of what they do is not<br class="">trivial.<br class=""></blockquote><br class="">Yes. And we need to do this while reproducing the problem--that is,<br class="">running Ghostscript and watching it fail to find the .ttf file and use<br class="">.ttf.orig instead. Looking at the FC_DEBUG flags, it may be worthwhile<br class="">turning on just about everything (FC_DEBUG=8191). You may end up with a<br class="">huge logfile, but at least you can search through it to see where the<br class="">.ttf.orig name is coming from.<br class=""></div></div></blockquote></div><div class=""><br class=""></div><div class="">Glancing briefly over the source, it appears that FcFontSetMatchInternal() should be printing significant debug information when FC_DEBUG=2 (=FC_DBG_MATCHV), but it is not.</div><div class=""><br class=""></div><div class="">I am running gs as follows:</div><div class=""><br class=""></div><div class="">================================</div><div class=""><div class=""><font face="Courier" class="">export FC_DEBUG=2</font></div><div class=""><font face="Courier" class="">/usr/bin/gs -dNOPAUSE -sDEVICE=jpeg -dJPEGQ=100 -r288 -dDownScaleFactor=4 -sOutputFile=file-q-%02d.jpg "source.ai" -dBATCH >fc_gs_log 2>&1</font></div></div><div class="">================================</div><div class=""></div><font face="FontinSans-Regular" class=""><span class=""><div class=""><font face="FontinSans-Regular" class=""><span class=""><br class=""></span></font></div><br class=""></span></font><div class=""><font face="FontinSans-Regular" class=""><span class="">The contents of fc_gs_log are as follows. </span>FC_DEBUG is set to 2, but there is no debug information. Does anyone have an idea why the extensive debug info is missing? I think I need to see that to understand why the .ttf file is being skipped. Thanks much….</font></div><div class=""><font face="FontinSans-Regular" class=""><span class=""><br class=""></span></font></div><div class=""><font face="FontinSans-Regular" class=""><span class=""><br class=""></span></font><div class="">================================</div><div class=""></div><div class=""><font face="Courier" class=""><span class="">GPL Ghostscript 9.25 (2018-09-13)<br class=""></span><div class="">Copyright (C) 2018 Artifex Software, Inc.  All rights reserved.</div><div class="">This software comes with NO WARRANTY: see the file PUBLIC for details.</div><div class="">Processing pages 1 through 2.</div><div class="">Page 1</div><div class="">Querying operating system for font files...</div><div class="">DEBUG: FC_WEIGHT didn't match</div><div class="">FC_DEBUG=2</div><div class="">**** Warning: glyf overlaps cmap, truncating.</div><div class="">**** Warning: glyf overlaps cmap, truncating.</div><div class="">**** Warning: glyf overlaps cmap, truncating.</div><div class="">**** Warning: glyf overlaps cmap, truncating.</div><div class="">**** Warning: glyf overlaps cmap, truncating.</div><div class="">Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/MoongladeDEMO-Regular.</div><div class="">Can't find (or can't open) font file MoongladeDEMO-Regular.</div><div class="">Loading MoongladeDEMO-Regular font from /var/www/ext/resources/fonts/2- Moonglade Regular DEMO.ttf.orig... 4484276 3144792 12161916 2847020 3 done.</div><div class="">Page 2</div><div class="">Can't find (or can't open) font file /usr/share/ghostscript/Resource/Font/MoongladeDEMO-Regular.</div><div class="">Can't find (or can't open) font file MoongladeDEMO-Regular.</div><div class="">Loading MoongladeDEMO-Regular font from /var/www/ext/resources/fonts/2- Moonglade Regular DEMO.ttf.orig... 4765108 3344760 2344716 1014065 3 done.</div></font></div></div></body></html>