[GRASS-dev] Re: [GRASS GIS] #1441: Hard Copy Map Utility (wxPython
wrapper for ps.map) text overlay is broken
GRASS GIS
trac at osgeo.org
Thu Sep 8 04:56:31 EDT 2011
#1441: Hard Copy Map Utility (wxPython wrapper for ps.map) text overlay is broken
-------------------------------------------+--------------------------------
Reporter: cmbarton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: wxGUI | Version: svn-trunk
Keywords: hard copy map utility, ps.map | Platform: Unspecified
Cpu: Unspecified |
-------------------------------------------+--------------------------------
Comment(by glynn):
Replying to [comment:4 cmbarton]:
> OK. That means we need to use the font names in the manual or find a
Python command that will reveal the names of any installed PS fonts.
!PostScript fonts are installed on the printer, not the computer. There is
no guarantee that it's possible to read information from the printer
(there might not even /be/ a printer; you might just be generating a
file).
> The code that is breaking here is trying to use the PS font name as a
!TrueType font to estimate the size of the text box for placement in the
graphical page representation. This won't work.
The only way to do this is to have AFM/PFM (font metrics) files for the
fonts in question, and to use the data which they contain. This is made
more complex by the fact that !PostScript uses kerning by default, so you
can't just sum the widths of the individual characters.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1441#comment:10>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list