2.1.25.40 get_system_font_name


Description

Get system font name

Syntax

string get_system_font_name( int nType = ANSI_VAR_FONT, int * lpnCharSet = NULL )

Parameters

nType
[input] OEM_FIXED_FONT, SYSTEM_FONT etc const, can also pass in GSFI_TYPE_DEFAULT, GSFI_TYPE_FIXED_WIDTH, GSFI_TYPE_SCALABLE for Origin fonts
lpnCharSet

Return

name of the specified font type, or an empty string if specified type is not valid

Examples

EX1

void get_system_font_name_ex1()
{
    vector<string> vsNames = {
        "SYSTEM_FONT", "DEVICE_DEFAULT_FONT", "DEFAULT_GUI_FONT", "ANSI_VAR_FONT", "OEM_FIXED_FONT",
        "ANSI_FIXED_FONT", "SYSTEM_FIXED_FONT"};
    vector<int> vnIDs = {
        SYSTEM_FONT, DEVICE_DEFAULT_FONT, DEFAULT_GUI_FONT, ANSI_VAR_FONT, OEM_FIXED_FONT, 
        ANSI_FIXED_FONT, SYSTEM_FIXED_FONT};
        
    printf("%20s\t%s\n", "Font", "Font Face");
    printf("-------------------------------------");
    for(int ii = 0; ii < vsNames.GetSize(); ii++)
        printf("%20s\t%s\n", vsNames[ii], get_system_font_name(vnIDs[ii]));
}

Remark

See Also

get_system_font_info

Header to Include

origin.h

Reference