The System Predefined Fonts

The System Predefined Fonts

Stock Font Objects

In Windows platforms, there are some stock font objects that can be used by application at any time, with the GetStockObject function. The Open32 NLS Extension supports the stock font objects listed below.

┌──────────────────────────────┬──────────────────────────────────────────────────┐
│Stock Font Object             │Meaning                                           │
├──────────────────────────────┼──────────────────────────────────────────────────┤
│ANSI_FIXED_FONT               │Fixed-pitch system font for Windows SBCS ANSI     │
│                              │character set. Courier 8 point is typically used. │
├──────────────────────────────┼──────────────────────────────────────────────────┤
│ANSI_VAR_FONT                 │Variable-pitch system font for Windows SBCS ANSI  │
│                              │character set. MS Sans Serif (Helv, in OS/2) 8    │
│                              │point is typically used.                          │
├──────────────────────────────┼──────────────────────────────────────────────────┤
│OEM_FIXED_FONT                │OEM dependent fixed-pitch font for OEM character  │
│                              │set. Typically used in console windows.           │
├──────────────────────────────┼──────────────────────────────────────────────────┤
│DEFAULT_GUI_FONT              │Variable-pitch font for system (process, in OS/2) │
│                              │default character set. Windows 95 GUI default font│
│                              │(can be overridden by user, per GUI element).     │
│                              │Swiss (SBCS), Modern (DBCS) family font is        │
│                              │typically used.                                   │
├──────────────────────────────┼──────────────────────────────────────────────────┤
│SYSTEM_FONT                   │Variable-pitch system font for system (process, in│
│                              │OS/2) default character set. Windows 3.1 GUI font,│
│                              │and Windows 3.1 & 95 display device default font. │
├──────────────────────────────┼──────────────────────────────────────────────────┤
│SYSTEM_FIXED_FONT             │Fixed-pitch system font for system (process, in   │
│                              │OS/2) default character set. Windows 3.0 GUI font,│
│                              │and Windows 3.0 display device default font.      │
├──────────────────────────────┼──────────────────────────────────────────────────┤
│DEVICE_DEFAULT_FONT           │Device-dependent font for system (process, in     │
│                              │OS/2) default character set. In Windows 95, this  │
│                              │is the SYSTEM_FONT compatible scaleable font.     │
└──────────────────────────────┴──────────────────────────────────────────────────┘
Fonts for Graphical User Interface Visual Elements

In the most recent Win32 platforms, the DEFAULT_GUI_FONT stock font object is defined and used for the system Graphical User Interface (GUI) visual elements as default. Also, the system provides the way for users to override the setting of each visual elements in detail with the Control Panel.

To keep the visual element design consistent throughout the system, the applications that have visual elements are guided to check the current setting. The logical fonts used by the visual elements shown below can be obtained with the SystemParametersInfo function.

┌────────────────────┬───────────────────────────────────────────────────────────────────┐
│ Visual Element     │ Meaning                                                           │
├────────────────────┴───────────────────────────────────────────────────────────────────┤
│ Option: SPI_GETICONTITLELOGFONT (returns LOGFONT)                                      │
├────────────────────┬───────────────────────────────────────────────────────────────────┤
│ Icon Title         │ Logical font being used by the Icon Title text.                   │
├────────────────────┴───────────────────────────────────────────────────────────────────┤
│ Option: SPI_GETNONCLIENTMETRICS (returns NONCLIENTMETRICS structure)                   │
├────────────────────┬───────────────────────────────────────────────────────────────────┤
│ lfCaptionFont      │ Logical font being used by the Title Bar (Caption) text.          │
├────────────────────┼───────────────────────────────────────────────────────────────────┤
│ lfSmCaptionFont    │ Logical font being used by the Tool Palette Title Bar text.       │
├────────────────────┼───────────────────────────────────────────────────────────────────┤
│ fStatusFont        │ Logical font being used by the Tooltip (Balloon help) text.       │
├────────────────────┼───────────────────────────────────────────────────────────────────┤
│ fMessageFont       │ Logical font being used by the Message and Dialog Box text.       │
├────────────────────┼───────────────────────────────────────────────────────────────────┤
│ fMenuFont          │ Logical font being used by the Menu Bar and Selection Item text.  │
└────────────────────┴───────────────────────────────────────────────────────────────────┘


[Back: Vertical Writing Support]
[Next: Remaining Issues in Application Programming]