On Wed, 2009-03-11 at 12:41 +0000, Tom Chance wrote:
> On Sun, 2009-03-08 at 17:57 +0000, Jon Burgess wrote:
> > That would be a typo: DevaVu vs DejaVu
> 
> I noticed that a little while after sending! The problem I've had is that 
> it's not obvious what to call the font, as the "proper" (I'd guess) name used 
> by Mapnik isn't the same as the name that OpenOffice and other apps show. 
> "DejaVu Serif" needs to be called "DejaVu Serif Condensed", for example.

It used to be really hard to work out the correct names but Mapnik now
makes this a little easier. First work out where Mapnik will load the
fonts from:

[jburg...@shark fonts]$ python
Python 2.5.2 (r252:60911, Sep 30 2008, 15:42:03) 
[GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2 
Type "help", "copyright", "credits" or "license" for more information.
>>> from mapnik import *                                              
>>> print fontscollectionpath
/usr/local/lib64/mapnik//fonts

Now, unpack the shrewsbury.zip into the directory printed above.
Then restart python and run:

[jburg...@shark fonts]$ python
Python 2.5.2 (r252:60911, Sep 30 2008, 15:42:03) 
[GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2 
Type "help", "copyright", "credits" or "license" for more information.
>>> from mapnik import *                                              
>>> for fname in FontEngine.face_names():                             
...     print fname                                                   
...                                                                   
DejaVu Sans Bold                                                      
DejaVu Sans Bold Oblique                                              
DejaVu Sans Book                                                      
DejaVu Sans Condensed                                                 
DejaVu Sans Condensed Bold                                            
DejaVu Sans Condensed Bold Oblique                                    
DejaVu Sans Condensed Oblique
DejaVu Sans ExtraLight
DejaVu Sans Mono Bold
DejaVu Sans Mono Bold Oblique
DejaVu Sans Mono Book
DejaVu Sans Mono Oblique
DejaVu Sans Oblique
DejaVu Serif Bold
DejaVu Serif Bold Italic
DejaVu Serif Book
DejaVu Serif Condensed
DejaVu Serif Condensed Bold
DejaVu Serif Condensed Bold Italic
DejaVu Serif Italic
Shrewsbury Bold
Shrewsbury Normal
Shrewsbury-Condensed Bold
Shrewsbury-Condensed Normal
Shrewsbury-Titling Bold
Shrewsbury-Titling Normal
>>> 

> 
> > Can you tell us where to get hold of this font so we can try it?
> 
> Here:
> http://www.1001freefonts.com/shrewsbury.php

> I don't know if the problem is with the font of the mapnik toolchain.

I've tried doing some Mapnik rendering with those files and all I get is
just the square boxes. Normally this indicates that the glyph is missing
from the font, but they work fine in KDE font viewer.

I tried both Agg and Cairo renderer and both failed.

        Jon


_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to