[gs-commits] rev 10883 - trunk/gs/lib

hintak at ghostscript.com hintak at ghostscript.com
Mon Mar 8 21:54:37 UTC 2010


Author: hintak
Date: 2010-03-08 21:54:37 +0000 (Mon, 08 Mar 2010)
New Revision: 10883

Modified:
   trunk/gs/lib/mkcidfm.ps
Log:
convert font file name to lowser case before matching; make it possible for upper case ARIALUNI.TTF to match; bug 688437

Modified: trunk/gs/lib/mkcidfm.ps
===================================================================
--- trunk/gs/lib/mkcidfm.ps	2010-03-08 21:49:56 UTC (rev 10882)
+++ trunk/gs/lib/mkcidfm.ps	2010-03-08 21:54:37 UTC (rev 10883)
@@ -494,11 +494,28 @@
   } loop
 } def
 
+% Convert string (font file name) to lowercase, take care not to touch
+% non-upper case letters. There are a few similiar routines elsewhere
+% for reference:
+%   /.ToLower in lib/pdf2dsc.ps
+%   /toupper in lib/printafm.ps
+%   /.lowerstring in Resource/Init/gs_fonts.ps
+/lowercase {
+  dup length 1 sub  -1 0 {
+      1 index exch 2 copy
+      get
+      dup dup 65 ge exch 90 le and {
+          2#00100000 or
+          } if
+      put
+      } for
+} def
 
 % Check if a font basename matches one of the possible cid substitutions.  
 % If it does, add the font and full path to the foundfonts dictionary
 /checkfont {
   dup basename
+  lowercase
   cidsubs
   {
     /Path get



More information about the gs-commits mailing list