Phoenix
Phoenix copied to clipboard
`wx.Font` font weights are ignored on OS X 10.10 and 10.11
Operating system: OS X 10.11, OS X 10.10 wxPython version & source: 4.2.1 (PyPi) Python version & source: 3.10.11 Official
Description of the problem: On OS X 10.10 and 10.11, all fonts are rendered with the regular font weight no matter what they are set to. However, calling .GetNumericWeight() returns the correct value. This does not affect 10.12 and newer.
Code Example (click to expand)
import wx
class Frame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent, size=(400, 200))
panel = wx.Panel(self)
title = wx.StaticText(panel, label="Title", pos=(50, 50))
title.SetFont(wx.Font(40, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))
subtitle = wx.StaticText(panel, label="Subtitle", pos=(50, 90))
subtitle.SetFont(wx.Font(40, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
self.Show()
if __name__ == '__main__':
app = wx.App()
frame = Frame(None)
app.MainLoop()
10.10 Yosemite :
10.11 El Capitan:
10.12 Sierra:
13 Ventura:
Hi, this is probably not something that's wxPython specific (unless it is somehow compile option related). If it is important to you, you may want to try reproducing it in wxWidgets (C++) and filing an issue upstream.