[GRASS-dev] Can't get font face index to work

Glynn Clements glynn at gclements.plus.com
Thu May 3 00:02:59 EDT 2007


Glynn Clements wrote:

> > Any index I try is displaying the same default face 0.
> > 
> > Bypassing the freetypecap for now so I can try it:
> > 
> > d.font path="/System/Library/Fonts/Times.dfont"
> > d.text -m text="some text"
> > 
> > -> Times roman used
> > 
> > d.font path="/System/Library/Fonts/Times.dfont|1"
> > d.text -m text="some text"
> > 
> > -> Times roman
> > 
> > ...
> > 
> > d.font path="/System/Library/Fonts/Times.dfont|4"
> > d.text -m text="some text"
> > 
> > -> Times roman
> > 
> > This one is outside the range of available faces (4) in this font file.
> > 
> > 
> > Tried putting them in the freetypecap:
> > 
> > Times0:/System/Library/Fonts/Times.dfont|0:utf-8:
> > Times1:/System/Library/Fonts/Times.dfont|1:utf-8:
> > Times2:/System/Library/Fonts/Times.dfont|2:utf-8:
> > Times3:/System/Library/Fonts/Times.dfont|3:utf-8:
> > 
> > d.font doesn't complain, but when I click where I want to draw the  
> > text, it says "WARNING: unable to open font map 'Times0'"
> 
> Weird. I would expect specifying an explicit path to fail, as the
> driver code checks for the existence of the file before stripping the
> index. Using a name from the freetypecap file should work, though.

Actually, I expect using a name from the freetypecap file to result in
the index being ignored. parse_freetypecap() strips the index so that
it can check for file existence, then returns the stripped version.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list