Personal tools
From wiki.swiftlytilting.com
Jump to: navigation, search

WinBinder Manual/wb create font

Creates a new font.

Contents

Syntax

int wb_create_font(string name, int height [, int color [, int flags]])
  • name is the font name
  • height is its height in points (not pixels),
  • color is a RGB color value. ('Note: color parameter not currently implemented.)
  • flags can be a combination of the following values:
    • FTA_NORMAL
    • FTA_REGULAR
    • FTA_BOLD
    • FTA_ITALIC
    • FTA_UNDERLINE
    • FTA_STRIKEOUT
FTA_NORMAL and FTA_REGULAR are both defined as zero.

Returns

The function returns an integer value that is the font identifier.

After use, the font must be destroyed by a call to wb_destroy_font() to prevent resource leaks.

Example

Creates a font, and uses it to change the look of a Label control

$font = wb_create_font("Arial", 14, BLACK, FTA_BOLD);

wb_set_font($label, $font);

See also

Winbinder Projects