cohtml::UserFontDescription
Struct representing user font data. Baseline is 0.
#include <System.h>
Public Classes
Section titled “Public Classes”| Name | |
|---|---|
| struct | CharInfo Struct representing data for individual char. |
| struct | KerningPairInfo Struct representing kerning info between chars. |
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| UserFontDescription() |
Public Attributes
Section titled “Public Attributes”| Name | |
|---|---|
| Fonts::UserFontType | FontType The font type that’s going to be used for loading and rendering. |
| const char * | FontFamily The font family. |
| float | Size The font size in which the glyph are generated. In pixels. |
| float | Spread The font spread size with which the glyphs are generated. It shows us how many pixels does it take to cover the [0-0.5] distance field range. In pixels. |
| Fonts::FontWeight | Weight The font weight. |
| bool | IsBold Whether this is a bold font. |
| bool | IsItalic Whether this is an italic font. |
| float | LineHeight The line height of the font according to the Size of the font. In pixels. |
| float | Ascent The ascent of the font (the distance from the baseline to the tops of the tallest glyphs). Positive number. In pixels. |
| float | Descent The descent of the font (the distance from the baseline to the bottoms of the lowest glyphs). Negative number. In pixels. |
| CharInfo * | Chars Pointer to the char info data. |
| unsigned | NumChars Number of chars in this font. |
| KerningPairInfo * | KerningPairs Pointer to kerning info. |
| unsigned | NumKerningPairs Number of kerning pairs. |
Public Functions Documentation
Section titled “Public Functions Documentation”function UserFontDescription
Section titled “function UserFontDescription”inline UserFontDescription()Public Attributes Documentation
Section titled “Public Attributes Documentation”variable FontType
Section titled “variable FontType”Fonts::UserFontType FontType;The font type that’s going to be used for loading and rendering.
variable FontFamily
Section titled “variable FontFamily”const char * FontFamily;The font family.
variable Size
Section titled “variable Size”float Size;The font size in which the glyph are generated. In pixels.
variable Spread
Section titled “variable Spread”float Spread;The font spread size with which the glyphs are generated. It shows us how many pixels does it take to cover the [0-0.5] distance field range. In pixels.
Note: Spread specifies how many pixels does the distance field spread from the border(between inside and outside of a letter) to the outside. Therefore it maps to the [0-0.5] range. Some tools consider spread to be double the above distance - from end to end and is mapped to the [0-1] range. If that’s the case then that spread should be halved when used here.
variable Weight
Section titled “variable Weight”Fonts::FontWeight Weight;The font weight.
variable IsBold
Section titled “variable IsBold”bool IsBold;Whether this is a bold font.
Note: Ignored when Weight is specified (not Auto)
variable IsItalic
Section titled “variable IsItalic”bool IsItalic;Whether this is an italic font.
variable LineHeight
Section titled “variable LineHeight”float LineHeight;The line height of the font according to the Size of the font. In pixels.
variable Ascent
Section titled “variable Ascent”float Ascent;The ascent of the font (the distance from the baseline to the tops of the tallest glyphs). Positive number. In pixels.
variable Descent
Section titled “variable Descent”float Descent;The descent of the font (the distance from the baseline to the bottoms of the lowest glyphs). Negative number. In pixels.
variable Chars
Section titled “variable Chars”CharInfo * Chars;Pointer to the char info data.
variable NumChars
Section titled “variable NumChars”unsigned NumChars;Number of chars in this font.
variable KerningPairs
Section titled “variable KerningPairs”KerningPairInfo * KerningPairs;Pointer to kerning info.
Note: Kerning info is optional. If no info is present for given pair an implicit 0 amount of kerning is used. Kerning info is needed only for pairs with amount different from 0.
variable NumKerningPairs
Section titled “variable NumKerningPairs”unsigned NumKerningPairs;Number of kerning pairs.
© 2026 Coherent Labs. All rights reserved.