Skip to content

Commit 4889915

Browse files
authored
Use a 'default' instead of a 'decorative' font family (#1174)
On Unix systems, the wxWidgets / wxPython font family `wx.DECORATIVE` defaults to Impact [^1]. For a more suitable UI font, this is changed to `wx.DEFAULT`. On modern macOS and Windows systems, this is expected to have minimal impact (no pun intended), as `wx.DECORATIVE` already seems to be equivalent to `wx.DEFAULT` on both platforms [^2][^3]. Even with its original intent, the 'decorative' font family is not a good match for the UI, as it corresponds to the `fantasy` font family in CSS, that mostly includes gimmicky fonts like Papyrus or Jokerman [^4]. [^1]: https://github.com/wxWidgets/wxWidgets/blob/18da5b8269706472f6c0fa09dcbae605a477da19/src/unix/fontutil.cpp#L274-L277 [^2]: https://github.com/wxWidgets/wxWidgets/blob/18da5b8269706472f6c0fa09dcbae605a477da19/src/osx/carbon/font.cpp#L218-L220 [^3]: wxWidgets/wxWidgets#24178 [^4]: https://web.archive.org/web/20130126125901/http://www.codestyle.org/css/font-family/sampler-Fantasy.shtml
1 parent 679d423 commit 4889915

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

amulet_map_editor/api/framework/pages/main_menu.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ def __init__(self, parent: wx.Window):
3636
name_sizer.Add(icon, flag=wx.CENTER)
3737

3838
self._amulet_name = wx.StaticText(self)
39-
self._amulet_name.SetFont(wx.Font(40, wx.DECORATIVE, wx.NORMAL, wx.NORMAL))
39+
self._amulet_name.SetFont(wx.Font(40, wx.DEFAULT, wx.NORMAL, wx.NORMAL))
4040
name_sizer.Add(
4141
self._amulet_name, flag=wx.CENTER | wx.LEFT | wx.RIGHT, border=10
4242
)
4343
name_sizer.Add(icon2, flag=wx.CENTER)
44-
button_font = wx.Font(20, wx.DECORATIVE, wx.NORMAL, wx.NORMAL)
44+
button_font = wx.Font(20, wx.DEFAULT, wx.NORMAL, wx.NORMAL)
4545
self._open_world_button = wx.Button(self, size=(400, 70))
4646
self._open_world_button.SetFont(button_font)
4747
self._open_world_button.Bind(

amulet_map_editor/programs/edit/edit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(self, parent, world: "World"):
5858
self._temp_msg = wx.StaticText(
5959
self, label=lang.get("program_3d_edit.canvas.please_wait")
6060
)
61-
self._temp_msg.SetFont(wx.Font(40, wx.DECORATIVE, wx.NORMAL, wx.NORMAL))
61+
self._temp_msg.SetFont(wx.Font(40, wx.DEFAULT, wx.NORMAL, wx.NORMAL))
6262
self._sizer.Add(self._temp_msg, 0, flag=wx.ALIGN_CENTER_HORIZONTAL)
6363
self._temp_loading_bar = wx.Gauge(self, range=10000)
6464
self._sizer.Add(self._temp_loading_bar, 0, flag=wx.EXPAND)

0 commit comments

Comments
 (0)