Tk Source Code

View Ticket
Login
Ticket UUID: 2805061
Title: TkMenuFont not used on MS Windows
Type: Bug Version: obsolete: 8.5.7
Submitter: treectrl Created on: 2009-06-11 20:18:20
Subsystem: 13. Win Menus Assigned To: tmh
Priority: 9 Immediate Severity:
Status: Closed Last Modified: 2009-10-07 22:02:24
Resolution: Wont Fix Closed By: patthoyts
    Closed on: 2009-10-07 15:02:24
Description:
TIP 145 introduced named fonts including TkMenuFont.  However TkMenuFont use gets stomped
on MS Windows because of some old cruft in tkWinMenu.c:SetDefaults() i.e. menuFontDString.

Under WinXP and Tk 8.5.7:
% menu .m
% .m configure -font
-font font Font TkMenuFont {Tahoma 10}
User Comments: patthoyts added on 2009-10-07 22:02:24:

allow_comments - 1

patthoyts added on 2009-10-07 22:02:21:
This is not actually the intent of the system named fonts. The intention was to present the system fonts (from the Win32 API SystemParametersInfo) to Tk script such that we can use the correct fonts that have been configured through the standard desktop customization property sheet.
The correct way to change TkMenuFont is to modify the display properties via the Windows control panel.
As the menu is drawn by the native GUI menu code this is in fact the only way to change this font. What TkMenuFont does is to let you find out just what font has been selected by the user for this.