Functions

Driver Font Interface
[Driver Interface]

Collaboration diagram for Driver Font Interface:

Functions

IUP_SDK_API void iupdrvFontGetCharSize (Ihandle *ih, int *charwidth, int *charheight)
IUP_SDK_API int iupdrvFontGetStringWidth (Ihandle *ih, const char *str)
IUP_SDK_API void iupdrvFontGetMultiLineStringSize (Ihandle *ih, const char *str, int *w, int *h)
IUP_SDK_API void iupdrvFontGetTextSize (const char *font, const char *str, int len, int *w, int *h)
IUP_SDK_API void iupdrvFontGetFontDim (const char *font, int *max_width, int *line_height, int *ascent, int *descent)
IUP_SDK_API char * iupdrvGetSystemFont (void)
IUP_SDK_API int iupdrvSetFontAttrib (Ihandle *ih, const char *value)
IUP_SDK_API char * iupGetFontValue (Ihandle *ih)
IUP_SDK_API int iupGetFontInfo (const char *font, char *typeface, int *size, int *is_bold, int *is_italic, int *is_underline, int *is_strikeout)
IUP_SDK_API int iupFontParsePango (const char *value, char *typeface, int *size, int *bold, int *italic, int *underline, int *strikeout)
IUP_SDK_API int iupFontParseWin (const char *value, char *typeface, int *size, int *bold, int *italic, int *underline, int *strikeout)
IUP_SDK_API int iupFontParseX (const char *value, char *typeface, int *size, int *bold, int *italic, int *underline, int *strikeout)

Detailed Description

Each driver must export the symbols defined here.
See iup_drvfont.h

Function Documentation

IUP_SDK_API void iupdrvFontGetCharSize ( Ihandle *  ih,
int *  charwidth,
int *  charheight 
)

Retrieve the character size for the selected font. Should be used only to calculate the SIZE attribute.

IUP_SDK_API int iupdrvFontGetStringWidth ( Ihandle *  ih,
const char *  str 
)

Retrieve the string width for the selected font.

IUP_SDK_API void iupdrvFontGetMultiLineStringSize ( Ihandle *  ih,
const char *  str,
int *  w,
int *  h 
)

Retrieve the multi-lined string size for the selected font.
Width is the maximum line width.
Height is charheight*number_of_lines (this will avoid line size variations).

IUP_SDK_API void iupdrvFontGetTextSize ( const char *  font,
const char *  str,
int  len,
int *  w,
int *  h 
)

Same as iupdrvFontGetMultiLineStringSize but not associated with a control. Used in IupDraw.

IUP_SDK_API void iupdrvFontGetFontDim ( const char *  font,
int *  max_width,
int *  line_height,
int *  ascent,
int *  descent 
)

Returns information about the font.

IUP_SDK_API char* iupdrvGetSystemFont ( void   ) 

Returns the System default font.

IUP_SDK_API int iupdrvSetFontAttrib ( Ihandle *  ih,
const char *  value 
)

FONT attribute set function.

IUP_SDK_API char* iupGetFontValue ( Ihandle *  ih  ) 

Compensates IupMatrix limitation in Get FONT.

IUP_SDK_API int iupGetFontInfo ( const char *  font,
char *  typeface,
int *  size,
int *  is_bold,
int *  is_italic,
int *  is_underline,
int *  is_strikeout 
)

Parse the font format description. Returns a non zero value if successful.

IUP_SDK_API int iupFontParsePango ( const char *  value,
char *  typeface,
int *  size,
int *  bold,
int *  italic,
int *  underline,
int *  strikeout 
)

Parse the Pango font format description. Returns a non zero value if successful.

IUP_SDK_API int iupFontParseWin ( const char *  value,
char *  typeface,
int *  size,
int *  bold,
int *  italic,
int *  underline,
int *  strikeout 
)

Parse the old IUP Windows font format description. Returns a non zero value if successful.

IUP_SDK_API int iupFontParseX ( const char *  value,
char *  typeface,
int *  size,
int *  bold,
int *  italic,
int *  underline,
int *  strikeout 
)

Parse the X-Windows font format description. Returns a non zero value if successful.