[wxPython-users] Virtual TrueType Font ???
Robin Dunn
robin at alldunn.com
Wed May 2 13:58:26 PDT 2007
Mariano Di Felice wrote:
> Hi!!
> For drawing text into images, I use the aggdraw module, with python 2.3
> and wxPython2.6.
> If we consider, for example, the Garamond TTF file on windows, we could
> find 3 files: normal, italic and general.
> And if I open wx.FontDialog from python shell, I can write text also in
> Garamond Bold Italic style.
>
> Now, the aggdraw module take the TrueType Font file path for load TTF
> Font file, and if this file doesn't exists, I have an IOException.
> How can wxFontDialog ( or Microsoft Word, or Adobe Photoshop, etc )
> write text in a style which doesn't exists on system??
It can't. What is probably happening is that the font file is not where
you are looking for it, but someplace else.
>
> Moreover, I do this test: from c:\windows\fonts I've uninstalled all
> Garamond TTF files, but Italic.
> If I open Microsoft Word, I will see that I can choose Garamond font,
> but it writes italic on default!!!
This is normal. The dialog is showing the base name of the font, and
since there is only one style available that is what font is used when
you select the font no matter what you choose. If there is no normal
typeface available for a font family then it certainly can't draw one
anyway if you don't have bold/italic selected in the application.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list