Object
A Font object does not just define the set of glyphs (character shapes) that will be used for drawing text - it also determines the size. Care must be taken with this, as text does not automatically resize to fit a given area!.
Creates a new font object that can be used when drawing String to the GUI.
The argument font should be a String containing the name of a font that is currently installed on the PC.
Care should be taken when choosing fonts, as text may not appear the same if an EXE, VST or FlowStone project is used on a machine that does not have the same fonts installed. Choosing a font that is installed as standard across Windows versions is the safest bet to get predictable output.
The size will be a Float value to set the character height, measured in FlowStone GUI 'grid' units. Note that it is only a nominal size, and will rarely be the exact line spacing drawn on screen - this depends very much on the chosen font. The measureText method of the View class should be used where the text size must be accurately determined.
The final argument style should be a String - this can contain any combination of the directives "normal", "bold", "italic" to set the character style; no separators are necessary. Note that these will only be honoured if the chosen font contains the selected alternative glyph style.
# File Test Classes.rb, line 32 def self.new #DUMMY end
Generated with the Darkfish Rdoc Generator 2.