[GRASS-user] freetype support in grass6.4.2

Hamish hamish_b at yahoo.com
Fri Dec 16 20:33:22 EST 2011


Martin Album Ytre-Eide wrote:
> I am using grass6.4.2svn on an ubuntu laptop and I would
> like to use a different font - DejaVuSansMono-Bold. 
> 
> I have tried:   
> grass.run_command('d.text',flags='s' ,at='15,80',size='18',
> text='testings',
> path='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf')
> without errors, but no text.....
> 
> When I try: g.mkfontcap -o
> extradirs='/usr/share/fonts/truetype/ttf-dejavu/' 
> I get :
> 
> WARNING: This GRASS installation was compiled without
> Freetype support,
>          extradirs parameter
> ignored
> 
> When I compile I have: --with-freetype
> --with-freetype-includes=/usr/include/freetype2
> 
> And for me it seems to compile wtih Freetype support.
> 
> What do I do wrong? 

I don't have an exact answer to your question, but I would suggest to
run 'd.font -l' (or -L) and check if it is already there, then
in an Xmonitor try 'd.font DejaVuSansMono-Bold' before running
d.text (without path= or font=).

I don't think extrafont= is needed for that standard font dir, maybe try
g.mkfontcap without it?

Also [fwiw in my personal preference] the Vera font does a nicer job than
the almost-the-same DejaView, especially for numbers. I don't know why
Ubuntu dropped it but you can install the .deb from Debian and it all
works fine.


Hamish


More information about the grass-user mailing list