Hi there,

I'm sure this should be easy, but I'm finding it really impossible to get 
Mapnik to use a font other than "DejaVu Sans Book".

I have all the DejaVu fonts and a few from the Shrewsbury family sitting there:

bio...@bio:/var/mapnik$ ls /usr/local/lib/mapnik/fonts/
DejaVuSans-BoldOblique.ttf           DejaVuSansCondensed-Oblique.ttf  
DejaVuSansMono-Bold.ttf     DejaVuSans.ttf                        
DejaVuSerifCondensed-Bold.ttf     DejaVuSerif.ttf                
Shrewsbury-Titling Bold.ttf
DejaVuSans-Bold.ttf                  DejaVuSansCondensed.ttf          
DejaVuSansMono-Oblique.ttf  DejaVuSerif-BoldOblique.ttf           
DejaVuSerifCondensed-Oblique.ttf  Shrewsbury Bold.ttf            
Shrewsbury-Titling.ttf
DejaVuSansCondensed-BoldOblique.ttf  DejaVuSans-ExtraLight.ttf        
DejaVuSansMono.ttf          DejaVuSerif-Bold.ttf                  
DejaVuSerifCondensed.ttf          Shrewsbury-Condensed Bold.ttf  Shrewsbury.ttf
DejaVuSansCondensed-Bold.ttf         DejaVuSansMono-BoldOblique.ttf   
DejaVuSans-Oblique.ttf      DejaVuSerifCondensed-BoldOblique.ttf  
DejaVuSerif-Oblique.ttf           Shrewsbury-Condensed.ttf


I can't work out how on earth to refer to other fonts. The first of these 
works, but I've not worked out how to refer to a serif font:

    <Rule>
      <Filter>[place] = 'city'</Filter>
      <TextSymbolizer name="name" face_name="DejaVu Sans Book" size="35" 
fill="#FFC378" halo_fill="#2F200C" halo_radius="2" wrap_width="0"/>
    </Rule>
    <Rule>
      <Filter>[place] = 'town'</Filter>
      <TextSymbolizer name="name" face_name="DevaVu Serif Bold" size="28" 
fill="#FFC378" halo_fill="#2F200C" halo_radius="2" wrap_width="20"/>
    </Rule>


I get this error:

bio...@bio:/var/mapnik$ ./generate_image.py
Traceback (most recent call last):
  File "./generate_image.py", line 69, in ?
    render(m, im)
UserWarning: Unable to find specified font face 'DevaVu Serif Bold'



Specifying "Shrewsbury" does at least render, but the font comes up as squares 
rather than letters.

Can anyone point me in the right direction?

Kind regards,

Tom Chance
Researcher to the Director
BioRegional

a. BedZED Centre, 24 Helios Road, Wallington, London, SM6 7BZ
t 020 8404 4884
w. www.bioregional.com
Registered charity number 1041486. A company limited by guarantee. Registered 
in England and Wales no. 2973226.

“BioRegional are pioneers in reinventing our economy” – Achim Steiner, United 
Nations Environment Programme
Watch Achim Steiner's speech on: http://uk.youtube.com/watch?v=m3g8AHoQb5k
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to