If a font has a family name containing '-', mkfontscale generates the
(Bfamily name exactly like that into fonts.scale.
(B
(BThis occurs for example with the GohaTibebZemen.{otf,ttf} fonts which
(Bgot included into XFree86 CVS recently:
(B
(B    mfabian@magellan:/usr/X11R6/lib/X11/fonts/truetype$ grep "^Goha.*" fonts.scale
(B    GohaTibebZemen.otf -misc-Goha-Tibeb Zemen-medium-r-normal--0-0-0-0-p-0-iso10646-1
(B    GohaTibebZemen.otf -misc-Goha-Tibeb 
(BZemen-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific
(B    GohaTibebZemen.ttf -misc-Goha-Tibeb Zemen-medium-r-normal--0-0-0-0-p-0-iso10646-1
(B    mfabian@magellan:/usr/X11R6/lib/X11/fonts/truetype$ ftdump GohaTibebZemen.otf
(B    There is 1 face in this file.
(B
(B    ----- Face number: 0 -----
(B
(B    font name entries
(B       family:     Goha-Tibeb Zemen
(B       style:      Regular
(B       postscript: GohaTibebZemen
(B
(B    font type entries
(B       FreeType driver: cff
(B       sfnt wrapped:    yes
(B       type:            scalable
(B       direction:       horizontal
(B       fixed width:     no
(B       glyph names:     yes
(B       EM size:         1000
(B       global BBox:     (11,-189):(1223,802)
(B       ascent:          820
(B       descent:         -180
(B       text height:     1150
(B
(B    charmaps
(B       0: platform: 0, encoding: 3
(B       1: platform: 1, encoding: 0
(B       2: platform: 3, encoding: 1
(B       3: platform: 7, encoding: 3
(B    mfabian@magellan:/usr/X11R6/lib/X11/fonts/truetype$
(B
(BThe XLFD thus generated doesn't work of course. How should this be
(Bfixed? Should the fonts be fixed?
(B
(BBut maybe it is no reason for the font maker to remove a '-' only
(Bbecause it doesn't work in a XLFD.  Is a family name with a '-'
(Ballowed or not?
(B
(BMaybe one should work around that problem in mkfontscale by replacing
(Bthe '-' characters with ' ', for example like that:
(B
(BIndex: mkfontscale.c
(B===================================================================
(BRCS file: /cvs/xc/programs/mkfontscale/mkfontscale.c,v
(Bretrieving revision 1.3
(Bdiff -u -r1.3 mkfontscale.c
(B--- mkfontscale.c       2003/01/26 02:20:41     1.3
(B+++ mkfontscale.c       2003/02/04 18:50:28
(B@@ -317,7 +317,8 @@
(B         *spacing, *full_name;
(B     ListPtr encoding, entries = NULL;
(B     int i, found, rc;
(B-
(B+    char *p;
(B+    
(B     i = strlen(dirname_given);
(B     if(i == 0)
(B         dirname = strcat_reliable(".", "/");
(B@@ -477,7 +478,14 @@
(B             fprintf(stderr, "Couldn't get family name for %s\n", filename);
(B             family = entry->d_name;
(B         }
(B-
(B+       
(B+       while((p = strpbrk(family, "-"))) {
(B+               *p = ' ';
(B+       }
(B+       while((p = strpbrk(foundry, "-"))) {
(B+               *p = ' ';
(B+       }
(B+       
(B         if(!weight) weight = "medium";
(B         if(!slant) slant = "r";
(B         if(!sWidth) sWidth = "normal";
(B
(B-- 
(BMike Fabian   <[EMAIL PROTECTED]>   http://www.suse.de/~mfabian
$B?gL2ITB-$O$$$$;E;v$NE($@!#(B
(B_______________________________________________
(BFonts mailing list
([EMAIL PROTECTED]
(Bhttp://XFree86.Org/mailman/listinfo/fonts


Reply via email to