Download Now

    Reference IFont

    Declared in Codebot.Render.Graphics.pas on line 167

    IFont instances can be created by using Canvas.LoadFont methods.
      IFont = interface
      public
        function GetName: string;
        function GetColor: TColorF;
        procedure SetColor(const Value: TColorF);
        function GetSize: Float;
        procedure SetSize(Value: Float);
        function GetHeight: Float;
        procedure SetHeight(Value: Float);
        function GetAlign: TFontAlign;
        procedure SetAlign(const Value: TFontAlign);
        function GetLayout: TFontLayout;
        procedure SetLayout(const Value: TFontLayout);
        function GetBlur: Float;
        procedure SetBlur(Value: Float);
        function GetLetterSpacing: Float;
        procedure SetLetterSpacing(Value: Float);
        function GetLineSpacing: Float;
        procedure SetLineSpacing(Value: Float);
        { Name of the font }
        property Name: string read GetName;
        { Only solid color fonts are supported }
        property Color: TColorF read GetColor write SetColor;
        { Font size in pixels }
        property Size: Float read GetSize write SetSize;
        { Font height in points }
        property Height: Float read GetHeight write SetHeight;
        { Horizontal alignment of text rendered with this font }
        property Align: TFontAlign read GetAlign write SetAlign;
        { Vertical layout of text rendered with this font }
        property Layout: TFontLayout read GetLayout write SetLayout;
        { Font can be blurred which might be useful for soft font shadows }
        property Blur: Float read GetBlur write SetBlur;
        { Additive value used to modify letter spacing }
        property LetterSpacing: Float read GetLetterSpacing write SetLetterSpacing;
        { Multiplicative factor used to modify line spacing }
        property LineSpacing: Float read GetLineSpacing write SetLineSpacing;
      end;

    See also

    Float in Codebot.System.pas
    TColorF in Codebot.Graphics.Types.pas