Reference Codebot.Render.Fonts.pas
Part of the Codebot Render package
Each version implies all earlier versions
The Codebot.Render.Fonts unit defines TFont, which loads a TrueType font and renders its glyphs at a fixed pixel size into a texture atlas. The atlas holds the printable ASCII and Latin-1 characters. Ctx.Fonts holds fonts by name and loads them from the fonts folder of the assets.
The unit also defines TTextBlock, which draws text using a font and only rebuilds its vertices when the text changes.
Items 43 items
| Name | Kind | Line |
|---|---|---|
| PFontGlyph | pointer | 29 |
| TFont | class | 36 |
| AddText | procedure | 67 |
| Create | constructor | 51 |
| CreateFromStream | constructor | 53 |
| Destroy | destructor | 54 |
| FindGlyph | function | 57 |
| Kerning | function | 59 |
| Measure | function | 62 |
| Ascent | property | 72 |
| Descent | property | 74 |
| LineHeight | property | 76 |
| Size | property | 70 |
| Texture | property | 78 |
| TFontCollection | class | 85 |
| Create | constructor | 90 |
| DefaultFont | property | 94 |
| Font | property | 92 |
| TFontExtension | helper | 99 |
| Fonts | function | 102 |
| TFontGlyph | record | 21 |
| Advance | field | 24 |
| Codepoint | field | 22 |
| Index | field | 23 |
| S0 | field | 26 |
| S1 | field | 26 |
| T0 | field | 26 |
| T1 | field | 26 |
| X0 | field | 25 |
| X1 | field | 25 |
| Y0 | field | 25 |
| Y1 | field | 25 |
| TTextBlock | class | 110 |
| Create | constructor | 130 |
| Destroy | destructor | 131 |
| Draw | procedure | 135 |
| Measure | function | 133 |
| Color | property | 147 |
| Font | property | 137 |
| Scale | property | 145 |
| Text | property | 139 |
| X | property | 141 |
| Y | property | 143 |