FontFamily

Constructor

FontFamily <id> (string family)

Action

Specifies the family that will be applied to the next text.

Predefined children

  • TextProperty: family.


FontSize

Constructor

FontSize <id> (int unit, double value)
Unit:
  • 0 - no lenght unit
  • 1 - Em
  • 2 - Ex
  • 3 - Pc
  • 4 - Pt
  • 5 - Px
  • 6 - Cm
  • 7 - Mm
  • 8 - In
  • 9 - Percent

Action

Specifies the size that will be applied to the next text.

Predefined children

  • IntProperty: unit.
  • DoubleProperty: size.


FontStyle

Constructor

FontStyle <id> (int style) // style: 0 - normal, 1 - italic, 2 - oblique

Action

Specifies the style that will be applied to the next text.

Predefined children

  • IntProperty: style.


FontWeight

Constructor

FontWeight <id> (int weight) // weight: 25 - light, 50 - normal, 63 - demi bold, 75 - bold, 87 black

Action

Specifies the weight that will be applied to the next text.

Predefined children

  • IntProperty: weight.

Example


use core
use display
use gui

_main_
Component root {
  Frame f ("myFrame", 0, 0, 400, 400)
  FillColor black (0, 0, 0)
  FontFamily ff ("Arial")
  FontStyle fs (1)
  FontSize fz (0, 14)
  FontWeight fw (75)
  Text t1 (10, 15, "HelloWorld")
  FontSize fs2 (0, 16)
  FontStyle fz2 (0)
  FontWeight fw2 (25)
  FontFamily ff2 ("Bauhaus 93")
  Text t2 (10, 40, "HelloWorld")
}