[GRASS-dev] Re: [GRASS GIS] #1338: Text doesn't display for d.legend and d.barscale

GRASS GIS trac at osgeo.org
Tue Mar 29 15:08:28 EDT 2011


#1338: Text doesn't display for d.legend and d.barscale
----------------------------+-----------------------------------------------
 Reporter:  snorfalorpagus  |       Owner:  grass-dev@…              
     Type:  defect          |      Status:  new                      
 Priority:  critical        |   Milestone:  7.0.0                    
Component:  Display         |     Version:  svn-trunk                
 Keywords:  cairo, fonts    |    Platform:  MacOSX                   
      Cpu:  OSX/Intel       |  
----------------------------+-----------------------------------------------
Changes (by hamish):

  * keywords:  cairo => cairo, fonts


Comment:

 For me in grass7 on linux, by default GRASS_FONT (shell enviro variable)
 is not set by default, but text does display using what I guess would be
 cairo's fat/smoothed version of GRASS's romans.

 setting the font manually with `export GRASS_FONT="Times New Roman:Bold
 Italic"` on the command line successfully changes the font. (viewing with
 `qiv -eT map.png&`)

 If I set the font to something not on the `d.fontlist` list (e.g. "Times
 New Roman" instead of "Times_New_Roman", no text is drawn and I get this
 warning:

 {{{
 WARNING: Unable to open font map
          '/usr/local/src/grass/svn/trunk/dist.x86_64-unknown-linux-
 gnu/fonts/.hmp':
          No such file or directory. Try running 'g.mkfontcap -o'
 }}}

 (path to stroke fonts, but there is no (null).hmp file)

 ... I assume that's just the last test-for-font code it gets to, but the
 main point of this comment is that this warning message or the font tests
 could be improved.

 n.b. d.font erases the map.png, but I guess that's just because I haven't
 set GRASS_PNG_READ etc.


 Hamish

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/1338#comment:5>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list