Render FontFromLocation

Is it possible to use a Font from a location that is not installed on the users machine.

for example I made a custom font I am going to distribute with my app in a app directory.
since it will be a portable app I dont want to have to install/uninstall font every time the app is run.
I would like to be able to use the font by calling it from its location

something like this, but in pure python/wx
Ex: font = wx.FontFromLocation(‘MyTrueTypeFont.ttf’)

Is it possible to use a Font from a location that is not installed on the
users machine.

Years ago I asked about this on the main wx list -- at the time the
answer was : that would be a nice feature, but someone needs to write
the code -- I have no idea if anyone did get around to writing that
code -- I now I didn't.

If you need to render your text in a DC or custom control (rather than
a built-in widget), a kludge would be to use something else (PIL, for
instance) to render it to a bitmap, and draw that to the DC or
whatever.

Painful, I know.

-Chris

···

On Wed, Jun 12, 2013 at 5:15 PM, Metallicow <metaliobovinus@gmail.com> wrote:

for example I made a custom font I am going to distribute with my app in a
app directory.
since it will be a portable app I dont want to have to install/uninstall
font every time the app is run.
I would like to be able to use the font by calling it from its location

something like this, but in pure python/wx
Ex: font = wx.FontFromLocation('MyTrueTypeFont.ttf')

--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov