Author Topic: Note: wxPython used by QubeGUI requires default Times font on OSX  (Read 4817 times)

Scot Brew

  • Hero Member
  • *****
  • Posts: 272
    • PipelineFX
This is usually not an issue as the "Times" font is by default installed on OSX. However it has come up in recent posts that wxPython will error if the "Times" font has been removed from the OSX operating system.

One can see the following thread on the details:
    http://lists.wxwidgets.org/pipermail/wx-users/2007-January/096688.html

Quote
Robin Dunn wrote:
> Stefan Csomor wrote:
>> Hi Robin
>>
>>> apparently comes from the fact that "Times" and a few other
>>> names
>>> are explicitly used in wxFontRefData::MacFindFont.  Stefan, is it
>>> supposed to be guaranteed that these fonts are installed, or is there
>>> some API way to find what should be used for the default facename for
>>> the various font families?
>>
>> They are installed by default IIRC, but the user can uninstall them.
>> There is no concept of font families in the wx sense on OSX. But I could
>> preflight the name chosen and switch to the system font, in case the
>> better fit is not available. What level can I use for indication about
>> such an error, without wxPython throwing an exception.
>
> The Python exception is coming from a wxASSERT (or wxFAIL, wxCHECK,
> etc.) failing.  So as long as that can be avoided then wxPython will be
> happy.

Some more info:
It's the assert at the end of wxFontRefData::MacFindFont, and it is
being called from wxPython via it calling
wxStockGDI::instance().GetFont(wxStockGDI::FONT_ITALIC)

Scot Brew

  • Hero Member
  • *****
  • Posts: 272
    • PipelineFX
Re: Note: wxPython used by QubeGUI requires default Times font on OSX
« Reply #1 on: May 23, 2008, 04:18:52 AM »
More precisely, it appears to require the Times.dfont installed.