Note that there are some explanatory texts on larger screens.

plurals
  1. POwxpython - converting PIL.ImageFont to wx.Font or wx.Bitmap
    primarykey
    data
    text
    <p>Background: I am writing a module to create custom splash screens with multiple progress bars (0-5). The splash screen can display in multiple modes (full screen frame-less, % of screen w/wo frames, or fixed size w/wo frames), and can accommodate 0-5 linked progress meters. The progress meters, can have general titles, as well as function specific information displayed either inline with, above, or below the meter itself.</p> <p>EX: Loading Configuration: User Configuration File ("Loading Configuration" would be a general title, and "User Configuration File" would be task specific.)</p> <p>The splash screen itself can also have textual components.</p> <p>The splash screen is primarily a frame with an image background using a buffered draw to display an image associated with the program in question.</p> <p>The Question:</p> <p>I want to be able to use custom fonts (TTF and OTF) for the textual parts being displayed. It seems that the Python Imaging Library can load a custom font file as a <code>PIL.ImageFont</code> object, but that there is no similar ability in <code>wx</code>. So my question is three parts.</p> <p>1) Does <code>wx.Python</code> have the ability to load a custom font file (<code>ttf</code> <strong><em>AND</em></strong> <code>otf</code>) when the font is supplied with the program but not installed as a system font;</p> <p>and if not,</p> <p>2) Is it possible to convert a <code>PIL.ImageFont</code> to a <code>wx.Font</code>, or <code>wx.Bitmap</code> (<code>wx.Font</code> preferred);</p> <p>and if so,</p> <p>3) How?</p> <p><code>Clarification:</code></p> <p>I do not want to use PIL at all. The goal here is to use PIL just long enough to get the custom font into play, and then use wx.Python for all further handling.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload