Skip to end of metadata
Go to start of metadata

Implemented By

Supported Methods

Description of Methods

Register(path as String) as Boolean

Register a font file (.ttf or .otf format).  Each font file defines one or more font families (usually one).

Path should be a valid path name (see File System).

Returns true if the font(s) in the file were successfully installed.

GetFamilies() as Object

Returns an roArray of strings that represent the names of the font families which have been registered via Register().  Each name can be passed as the first parameter to GetFont().

GetFont(family as String, size as Integer, bold as Boolean, italic as Boolean) as Object

Returns an roFont object representing a font from the specified family, selected from the fonts previously registered via Register().  size is the requested font size, in pixels, not points.  bold and italic specify font variants which may be (but are not always) supported by the font file.

GetDefaultFont(size as Integer, bold as Boolean, italic as Boolean) as Object

Returns an roFont object representing the system font.  The system font is always available, even if Register() has not been called.  Size, bold and italic are interpreted as in GetFont().

GetDefaultFont() as Object

Returns the system font at its default size.

  reg.GetDefaultFont()

is equivalent to

  reg.GetDefaultFont(reg.GetDefaultFontSize(), false, false)

GetDefaultFontSize() as Integer

Returns the default font size.

Get(family as String, size as Integer, bold as Boolean, italic as Boolean) as String

Returns a valid font string that can be used as the value of the Font content meta-data parameter recognized by the roImageCanvas.

family, size, bold, italic are interpreted as in GetFont().

 

  • No labels