[GRASSLIST:9824] Learning to use freetype fonts

David Finlayson david.p.finlayson at gmail.com
Sat Jan 14 03:54:28 EST 2006


I recently compiled GRASS with freetype support and I am trying to
learn to use it. When I follow the following sequence to define a
default font, it fails:

GRASS 6.1.cvs (WASPN_NAD83):~ > locate bitstream | grep 'Vera'
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoBI.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraBI.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraBd.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraIt.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoBd.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoIt.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMono.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraSe.ttf
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraSeBd.ttf
GRASS 6.1.cvs (WASPN_NAD83):~ > d.font.freetype
font=/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf
GRASS 6.1.cvs (WASPN_NAD83):~ > d.text.freetype -n text="Hello"
east=20,20 ERROR: No font selected

But, if I call the font directly in the command it works:

GRASS 6.1.cvs (WASPN_NAD83):~ > d.text.freetype -n text="Hello"
east=20,20 path=/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf

(successfully draws on the monitor)

Without d.text.freetype working, I can't see text in legends or map
titles. What's the secret to getting this working?

Thanks,

David


--
David Finlayson
Marine Geology & Geophysics
School of Oceanography
Box 357940
University of Washington
Seattle, WA  98195-7940
USA

Office: Marine Sciences Building, Room 112
Phone: (206) 616-9407
Web: http://students.washington.edu/dfinlays




More information about the grass-user mailing list