Skip to content
Victor Luchits edited this page Jan 8, 2018 · 3 revisions

RCSS implements a simpler version of the CSS2 font model when dealing with text rendering. This is for two reasons:

  • The document renderer is fully under the control of the author, so (for example) a specific font can be assumed to exist.
  • Improved performance.

Fonts are specified in a similar fashion.

Font specification properties

Font family: the 'font-family' property

font-family

Property Comment
Value: <string>
Initial: undefined
Applies to: all elements
Inherited: yes
Percentages: N/A

This property specifies the name of a family of fonts to be used to render sections of text descending from the element. Note that, unlike CSS, only a single font family can be specified with this property, not a comma-delimited font set.

Font styling: the 'font-style' and 'font-weight' properties

font-style

Property Comment
Value: normal | italic
Initial: normal
Applies to: all elements
Inherited: yes
Percentages: N/A

The 'font-style' property can be used to request normal or italicised versions of a font from within a font-family. Note that RCSS does not yet support oblique font styles.

font-weight

Property Comment
Value: normal | bold
Initial: normal
Applies to: all elements
Inherited: yes
Percentages: N/A

The 'font-weight' property can be used to request normal or bolded versions of a font from within a font-family. Note that RCSS only supports bold and non-bold fonts, and not different strengths of boldness.

Font size: the 'font-size' property

font-size

Property Comment
Value: <number> | <percentage> | <em> | <rem> <in> | <cm> | <mm> | <pt> | <pc> | <dp>
Initial: 12
Applies to: all elements
Inherited: yes
Percentages: N/A

Values have the following meanings:

number

The font size is generated at the point size requested.

percentage

The font size is generated at the point size of the element's parent's font, scaled by the percentage.

em

The font generated size is equal to the size of the font that applies to the parent of the element in question.

rem

The font generated size is equal to the size of the font that applies to the root element.

pt

The font size is generated in points. One point is equal to 1/72 of an inch.

dp

The font size is generated in device-dependent points. This is the same as 'px' but device's physical pixels-per-inch ratio is taken into account.

Clone this wiki locally