On Sun, 2009-03-08 at 17:02 +0000, Tom Chance wrote:
> 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'
That would be a typo: DevaVu vs DejaVu
>
> Specifying "Shrewsbury" does at least render, but the font comes up as
> squares rather than letters.
>
> Can anyone point me in the right direction?
Can you tell us where to get hold of this font so we can try it?
Jon
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users