[ enum ] FontFamily
Description:
An enum for generic font family names to use instead of a font name that may not be installed on target operating systems.
Use with component.font(), Text() shape, font property of a List item, Tree item, ComboBox item, Table column, and everywhere else where font can be set.
Type: string
Properties:
| Name | Description |
|---|---|
|
Proportional font with small decorative strokes at the ends of letters (e.g., Times New Roman, Georgia, Garamond, Cambria.). |
|
Proportional font without decorative strokes; clean and modern (e.g., Arial, Helvetica, Verdana, Calibri, Open Sans). |
|
Fixed-width font where every character has the same width (e.g., Courier New, Consolas, Lucida Console, Menlo). |
|
Flowing, handwritten-style font (e.g., Brush Script, Comic Sans MS, Pacifico, Lobster). |
|
The system UI font provided by the operating system. (e.g., Segoe UI (Windows), San Francisco (macOS/iOS), Roboto (Android/Linux)). |
|
Decorative or themed font (e.g., Impact, Papyrus, Jokerman, Copperplate). |
Examples:
Setting component font:
textarea.font({name: FontFamily.SansSerif});
Setting Text shape font:
let text = new Text("Hello World", {name: FontFamily.Fantasy, size: 30});
