Skip to content

Interface: LayoutFont ​

Global font. Every text element inherits unset font fields from here.

Properties ​

PropertyTypeDefault valueDescription
color?string"#444"Base text color.
family?string"\"Open Sans\", verdana, arial, sans-serif"CSS font-family list used by every text element unless overridden.
lineposition?| "under" | "over" | "through" | "under+over" | "under+through" | "over+under" | "over+through" | "through+under" | "through+over" | "under+over+through" | "under+through+over" | "over+under+through" | "over+through+under" | "through+under+over" | "through+over+under" | "none""none"Text decoration: under, over and/or through joined with + (e.g. under+over), or none.
shadow?string"none"CSS text-shadow behind the text (2px 2px 3px black; only the first shadow is drawn), none, or auto for a thin halo in the contrast color of the text.
size?number12Base font size in CSS pixels. Minimum: 1
style?"normal" | "italic""normal"Base font style.
textcase?"normal" | "word caps" | "upper" | "lower""normal"Letter case transform: upper, lower, word caps (first letter of each word), or normal.
variant?| "normal" | "small-caps" | "all-small-caps" | "all-petite-caps" | "petite-caps" | "unicase""normal"Capitals variant (CSS font-variant-caps). The SDF text renderer approximates small and petite caps with uppercase letters at a reduced size.
weight?number | "normal" | "bold""normal"Base font weight. Range: 1 – 1000

Released under the MIT License.