Opened 16 years ago

Closed 12 years ago

#1981 closed defect (duplicate)

wxWidgets MSW does not respect user font size

Reported by: awrobel Owned by:
Priority: normal Milestone:
Component: wxMSW Version:
Keywords: Cc: awrobel, hockkn
Blocked By: Blocking:
Patch: no


If you are using large fonts (on Win2000, start the
Display Properties,
go to the Appearance tab and change "Scheme" from
"Windows Standard"
to e.g. "Windows Standard (extra large)"), most
controls are still
displayed with the small font.

I also noticed, that GetFont does not return the user
font size. The following line


makes a window appear in the small font (tested with
I don't think this is correct, and it seems to be the
why some controls in the samples directory come with
large and
small fonts mixed. Those controls did e.g. set an
italic font,
and now
have small italic items and large "normal-font" items.

Below follows a short summary about font sizes in the
if you selected a large default font.

  • The about dialogs in the samples seem to always use

the user

preferred font (in future, I'll call it "large

font"), just

like Message-Dialogs seem to do.

  • The menus and menuitems seem to always use the large


  • The statusbar seems to always use the large font.

Beside those expections above, I didn't find any large font
in e.g. the "controls" sample. (In future notes, I will
no longer
mentions that the expections listed above are always in

In the dialogs sample, the message box uses the large font.
Most other dialogs use the small font. The Open file dialog
uses the large font for the listview and small fonts
else. The generic file dialog uses small fonts only.
"Choose directory" uses small font only, however the
with the "New Folder" button uses the large font for
the tree,
while the generic version uses the small font only.
"Tip of the day" uses the large font for the message
and small
fonts for the buttons. The wxLogXXX dialog uses small fonts
when multiple messages are displayed, and the large font if
only one message is displayed.

The grid demo uses the small font only.

Listctrl is really ugly. All lines in the listview are in
the large font, except for line number 4, which uses the
small font.

After selecting "Recreate" in the statbar sample, the
bar uses two different fonts.

The treectrl sample uses a small italic font for the
root, and
the large font for the items.

The widgets sample uses the small font in all widgets.

I could list more, but I think that should do it so far. Is
there anything an application programmer should do if
he wants
wxWidgets to use the user perferred fonts?

Change History (4)

comment:1 Changed 16 years ago by hockkn

What version of wx is this? 2.4.2? 2.5.something? If 2.4.2,
try 2.5.3 as there was quite a few changes after 2.4.2
regarding default fonts for controls to better match UI

comment:2 Changed 16 years ago by awrobel


sorry, I forgot to mention that this has been discussed on
the mailing list before, see

I also forgot to mention in this bug report that I tried it
with both, 2.4.2 and 2.5.3 with similar results.


Angela Wrobel

comment:3 Changed 12 years ago by cmbruns

I'm pretty sure this problem still exists in wx 2.8.10 on Windows XP. I have written up an investigation of this behavior with respect to wx, Tk, and Java here. Please take a look at my report. This issue might be the same as issue 11008.

comment:4 Changed 12 years ago by vadz

  • Resolution set to duplicate
  • Status changed from new to closed

This is indeed the same issue as #11008 so closing this one as a duplicate (even though it's an older one, the other one contains more information and so it's more useful to keep it opened).

Note: See TracTickets for help on using tickets.