[GRASS-dev] font path question for Linux and Windows

Paul Kelly paul-grass at stjohnspoint.co.uk
Fri May 4 06:34:55 EDT 2007


On Fri, 4 May 2007, Glynn Clements wrote:

> William Kyngesburye wrote:
>
>> It's already been discussed (r.in.wms problem) that /I is a GNU
>> extension to sed.  OSX, at least, is BSD.  Don't know what to say
>> otherwise...
>
> An alternative is to change -iname to -name, and include both upper-
> and lower-case versions of the extension in exts.

OK, that works (see patch below). The font names are a bit cryptic though, 
as they all seem to be constrained to the 8 character limit, but I suppose 
that isn't so important.

Index: mkftcap
===================================================================
RCS file: /home/grass/grassrepository/grass6/tools/mkftcap/mkftcap,v
retrieving revision 1.6
diff -u -r1.6 mkftcap
--- mkftcap     3 May 2007 04:25:17 -0000       1.6
+++ mkftcap     4 May 2007 10:26:51 -0000
@@ -1,6 +1,6 @@
  #!/bin/sh

-exts='ttf pfa pfb'
+exts='ttf TTF pfa PFA pfb PFB'

  (
      for dir in /usr/lib/X11/fonts /usr/share/X11/fonts /usr/share/fonts \
@@ -10,7 +10,7 @@
      do
          if [ -d "$dir" ] ; then
              for ext in $exts ; do
-                find "$dir" -type f -iname '*.'"$ext" -print \
+                find "$dir" -type f -name '*.'"$ext" -print \
                      | sed 's!^\(.*\)/\(.*\)$!\2:\1/\2:utf-8:!' \
                      | sed 's/\.'"$ext"':/:/'
              done





More information about the grass-dev mailing list