Reference Codebot.Render.Fonts.pas
Part of the Codebot Render package
The Codebot.Render.Fonts unit gives you TFont, which loads a TrueType font and draws its glyphs at a fixed pixel size into a texture atlas holding the printable ASCII and Latin-1 characters. Ctx.Fonts holds fonts by name and loads them from the fonts folder of your assets. TTextBlock draws text with a font and only rebuilds its vertices when the text changes.
For most text you will use the canvas of Codebot.Render.Graphics instead. These fonts are for drawing text directly with OpenGL.
Items 43 items
| Name | Kind | Line |
|---|---|---|
| PFontGlyph | pointer | 30 |
| TFont | class | 37 |
| AddText | procedure | 68 |
| Create | constructor | 52 |
| CreateFromStream | constructor | 54 |
| Destroy | destructor | 55 |
| FindGlyph | function | 58 |
| Kerning | function | 60 |
| Measure | function | 63 |
| Ascent | property | 73 |
| Descent | property | 75 |
| LineHeight | property | 77 |
| Size | property | 71 |
| Texture | property | 79 |
| TFontCollection | class | 86 |
| Create | constructor | 91 |
| DefaultFont | property | 95 |
| Font | property | 93 |
| TFontExtension | helper | 100 |
| Fonts | function | 103 |
| TFontGlyph | record | 22 |
| Advance | field | 25 |
| Codepoint | field | 23 |
| Index | field | 24 |
| S0 | field | 27 |
| S1 | field | 27 |
| T0 | field | 27 |
| T1 | field | 27 |
| X0 | field | 26 |
| X1 | field | 26 |
| Y0 | field | 26 |
| Y1 | field | 26 |
| TTextBlock | class | 111 |
| Create | constructor | 131 |
| Destroy | destructor | 132 |
| Draw | procedure | 136 |
| Measure | function | 134 |
| Color | property | 148 |
| Font | property | 138 |
| Scale | property | 146 |
| Text | property | 140 |
| X | property | 142 |
| Y | property | 144 |