Archicad 28 C++ API
Loading...
Searching...
No Matches
API_Font_Head Struct Reference

Contains common information related to API_FontType. More...

#include <APIdefs_Environment.h>

Public Attributes

Int32 index
 The index is the current index of the given font. References to any font are done through these indices. It goes from 1 to the maximum available font index.
 
short flags
 specifies whether this is a vectorial font.
 
char name [API_UniLongNameLen]
 The name of the font as UTF-8 encoded C string, which appears in the appropriate dialogs.
 
GS::UniString * uniStringNamePtr
 Optional parameter for accessing the name of the font in UniString (UTF-16 encoded) format.
 

Detailed Description

Contains common information related to API_FontType.

Remarks
This structure contains general information about a font. As a general rule, before calling any of the applicable functions, clear the whole structure, fill the necessary fields, then call the function. Clearing all fields in the structure is important for future compatibility; in the next API releases the fillers may have meanings. You can access long name in C string format (name) or in GS::UniString format (uniStringNamePtr). You can use UniString format for font operations to avoid loss of information due to character conversion. To achieve this set the pointer of a GS::UniString variable in the uniStringNamePtr field of the API_ModelViewOptions_Head structure. Otherwise always set this field to nullptr. You can identify fonts by name. If you want to refer to a font by name, set the index member to 0. If you set uniStringNamePtr to point to a valid GS::UniString object, the content of the name character buffer is ignored.