sincerely Singaporean

If you have not done so, read this full tutorial on how to use SGEXTN to build an application.

SGWDefaultFonts

see header file

see source file

class SGWDefaultFonts;

part of SGEXTN module SG_Widgets

provides access to SGWidget ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ default fonts

detailed description

list of all including inherited members

implementation details

preprocessor file inclusion directive: #include ‹SGWDefaultFonts.h›

CMake target for BuildLah: SGEXTN::SG_Widgets

see this link for more information about BuildLah

parent class: (none)

children classes: (none)

static member variables

static SGXString iconsFont;

static SGXString textFont;

static member functions

static void addFont(const SGXString& fileName);

Detailed Description

SGWDefaultFonts allows you to get application default fonts and apply them to the user interface. This class also allows adding custom fonts.

Implementation Details

Returns "SingScript.sg" and "AppIcons.sg"

static SGXString iconsFont;

Returns the font name AppIcons.sg. This is a user supplied font for application icon ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾.

AppIcons.sg is only required if using SGWIconLabel and SGWIconButton.

The font must be imported in SGXCentral::importCustomFonts.

Setting this variable is undefined behaviour.

static SGXString textFont;

Returns the font name SingScript.sg. This is the default font for SGEXTN and displays mathematical and scientific symbols.

You are strongly recommended to use this font for all of the UI.

Setting this variable is undefined behaviour.

static void addFont(const SGXString& fileName);

Imports the ttf or otf formatted font found at fileName.

This should be used in SGXCentral::importCustomFonts if the font need to be used upon application startup.

Importing multiple fonts with the same family name is undefined behaviour. If your font is modular, merge everything first.

The matching file must exist in the resource system. To ensure that, place the font file in the assets folder. For more information about the resource system, see this tutorial.

©2025 05524F.sg (Singapore)

contact 05524F / report a bug / make a suggestion

about 05524F SINGAPORE values

list of 05524F projects