Skip to main content

DefaultGUIFont

DefaultGUIFont [/W=winName /Mac/Win] group= {fNameStr, fSize, fStyle } [, ...]

The DefaultGUIFont operation changes the default font for user-defined controls and other Graphical User Interface elements.

Parameters

fNameStr is the name of a font, fSize is the size and fStyle is a bitwise parameter with each bit controlling one aspect of the font style. See Button for details about these parameters.

group may be one of the following:

allAll controls
buttonButton and default CustomControl
checkboxCheckBox controls
tabcontrolTabControl controls
popupAffects the font for text used in the icon (not the title) of a PopupMenu control. The text in the popped state is set by the system and cannot be changed. The title of a PopupMenu is affected by the all group but the icon text is not.
panelSets the default font for draw text in a panel.
graphSets the default font for overlay graphs. Size is used only if ModifyGraph gfSize= -1; style is not used.
tableSets the default font for overlay tables.

Flags

/MacChanges control fonts only on Macintosh computers running Igor 9 or earlier.
/W=winNameAffects the named window or subwindow. When omitted, sets an experiment-wide default.
When identifying a subwindow with winName, see Subwindow Syntax for details on forming the window hierarchy.
/WinChanges control fonts only only on Windows, and it affects the experiment whenever it is used on Windows.

Details

Although designed to be used before controls are created, calling DefaultGUIFont will update all affected windows with controls. This makes it easy to experiment with fonts. Keep in mind that fonts can cause compatibility problems when moving between machines or platforms.

The /Win flag indicates the platform on which the fonts are to be used. If the current platform is not the one specified, then the settings are not used but are remembered for use in window recreation macros or experiment recreation. This allows a user to create an experiment that will use different fonts depending on the current platform.

If the /W flag is used then the font settings apply only to the specified window (Graph or Panel.) If the /W flag is not used, then the settings are global to the experiment.

note

Use /W=# to refer to the current active subwindow.

fNameStr may be an empty string ("") to clear a group. Setting the font name to "_IgorSmall","_IgorMedium" or "_IgorLarge" will use Igor's own defaults.

Default Fonts and Sizes

Igor's standard defaults for controls is the equivalent to setting all to "_IgorSmall", tabcontrol to "_IgorMedium" and button to "_IgorLarge". Use a fSize of zero to also get the standard default for size. The three default fonts and sizes are all the same.

ControlFontFont Size
ButtonMS Shell Dlg+12
CheckboxMS Shell Dlg12
GroupBoxMS Shell Dlg12
ListBoxMS Shell Dlg12
PopupMenu*MS Shell Dlg12
SetVariableMS Shell Dlg12
SliderMS Shell Dlg12
TabControlMS Shell Dlg12
TitleBoxMS Shell Dlg12
ValDisplayMS Shell Dlg12

* For the PopupMenu font or the popup menu itself, both fonts are MS Shell Dlg 12.

+ MS Shell Dlg is a "virtual font name" which maps to Tahoma on Windows XP, to MS Sans Serif on Windows 7, and to Segoe UI on Windows 8 and Windows 10.

Example

DefaultGUIFont/Mac all={"Zapf Chancery",12,0},panel={"geneva",12,3}
DefaultGUIFont/Win all={"Century Gothic",12,0},panel={"arial",12,3}
NewPanel
Button b0
DrawText 40,43,"Some text"

See Also

DefaultGUIControls

Controls and Control Panels for details about control panels and controls.

Window Position Coordinates and Points Versus Pixels for explanations of how font sizes in panels are interpreted for various screen resolutions.

Demos

Open All Controls Demo