Download Now

    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

    NameKindLine
    PFontGlyphpointer29
    TFontclass36
    AddTextprocedure67
    Createconstructor51
    CreateFromStreamconstructor53
    Destroydestructor54
    FindGlyphfunction57
    Kerningfunction59
    Measurefunction62
    Ascentproperty72
    Descentproperty74
    LineHeightproperty76
    Sizeproperty70
    Textureproperty78
    TFontCollectionclass85
    Createconstructor90
    DefaultFontproperty94
    Fontproperty92
    TFontExtensionhelper99
    Fontsfunction102
    TFontGlyphrecord21
    Advancefield24
    Codepointfield22
    Indexfield23
    S0field26
    S1field26
    T0field26
    T1field26
    X0field25
    X1field25
    Y0field25
    Y1field25
    TTextBlockclass110
    Createconstructor130
    Destroydestructor131
    Drawprocedure135
    Measurefunction133
    Colorproperty147
    Fontproperty137
    Scaleproperty145
    Textproperty139
    Xproperty141
    Yproperty143