get_system_font_info

 

Description

Get system fonts details

Syntax

BOOL get_system_font_info( int nType, int * lpnFontSize, byte * lpnCharSet, LPSTR lpszFontName, int nNameSize )

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
lpnFontSize
[output] pointer to int to receive font size
lpnCharSet
[output] pointer to a byte to receive Character Set type
lpszFontName
[output] buffer to receive font face name
nNameSize
[input] size of lpszFontName

Return

True of success, esle false

Examples

EX1

void get_system_font_info_ex1()
{
    int nFontSize;
    byte nCharSet = ANSI_CHARSET;

    string str;
    char    szTemp[LF_FACESIZE + 1];
    int nType = 3;
    if(get_system_font_info(nType, &nFontSize, &nCharSet, szTemp, LF_FACESIZE))
    str = szTemp;
}

Remark

See Also

get_system_font_name

header to Include

origin.h

Reference