Class TBGRAFreeTypeFontRenderer
Unit
Declaration
type TBGRAFreeTypeFontRenderer = class(TBGRACustomFontRenderer)
Description
FreeType font renderer with effects.
To use, assign to FontRenderer property of TBGRABitmap.
To set the effects, keep a variable containing the TBGRAFreeTypeFontRenderer
class and modify ShadowVisible and other effects parameters. The FontHinted property allows you to choose if the font is snapped to pixels to make it more readable.
Hierarchy
- TObject
- TBGRACustomFontRenderer
- TBGRAFreeTypeFontRenderer
Overview
Fields
FontHinted: boolean; |
|
FShader: TCustomPhongShading; |
|
FShaderOwner: boolean; |
|
FTypeWriter: TBGRACustomTypeWriter; |
|
OuterOutlineOnly: boolean; |
|
OutlineColor: TBGRAPixel; |
|
OutlineTexture: IBGRAScanner; |
|
OutlineVisible: boolean; |
|
ShaderActive: boolean; |
|
ShadowColor: TBGRAPixel; |
|
ShadowOffset: TPoint; |
|
ShadowQuality: TRadialBlurType; |
|
ShadowRadius: integer; |
|
ShadowVisible: boolean; |
Methods
constructor Create(AShader: TCustomPhongShading; AShaderOwner: boolean); overload; |
|
constructor Create; overload; |
|
destructor Destroy; override; |
|
function FontExists(AName: string): boolean; override; |
|
function GetFontPixelMetric: TFontPixelMetric; override; |
|
function GetFontPixelMetricF: TFontPixelMetricF; override; |
|
function TextFitInfo(sUTF8: string; AMaxWidth: integer): integer; override; |
|
function TextFitInfoF(sUTF8: string; AMaxWidthF: single): integer; override; |
|
function TextSize(sUTF8: string; AMaxWidth: integer; ARightToLeft: boolean): TSize; overload; override; |
|
function TextSize(sUTF8: string): TSize; overload; override; |
|
function TextSizeF(sUTF8: string): TPointF; overload; override; |
|
function TextSizeF(sUTF8: string; AMaxWidthF: single; ARightToLeft: boolean): TPointF; overload; override; |
|
function TextVisible(const AColor: TBGRAPixel): boolean; override; |
|
function GetTypeWriter: TBGRACustomTypeWriter; |
|
procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; c: TBGRAPixel; align: TAlignment); overload; override; |
|
procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; texture: IBGRAScanner; align: TAlignment); overload; override; |
|
procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; texture: IBGRAScanner; align: TAlignment); overload; override; |
|
procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; c: TBGRAPixel; align: TAlignment); overload; override; |
|
procedure TextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; s: string; style: TTextStyle; texture: IBGRAScanner); overload; override; |
|
procedure TextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; s: string; style: TTextStyle; c: TBGRAPixel); overload; override; |
|
procedure Init; |
|
procedure InternalTextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; c: TBGRAPixel; align: TAlignment); |
|
procedure TextOutAnglePatch(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; c: TBGRAPixel; tex: IBGRAScanner; align: TAlignment); |
|
procedure UpdateFont(ADisableClearType: boolean = false); |
Properties
property Collection: TCustomFreeTypeFontCollection read GetCollection; |
|
property ShaderLightPosition: TPoint read GetShaderLightPosition write SetShaderLightPosition; |
|
property ShaderLightPositionF: TPointF read GetShaderLightPositionF write SetShaderLightPositionF; |
|
property TypeWriter: TBGRACustomTypeWriter read GetTypeWriter; |
Description
Fields
FontHinted: boolean; |
|
This item has no description. |
FShader: TCustomPhongShading; |
|
This item has no description. |
FShaderOwner: boolean; |
|
This item has no description. |
FTypeWriter: TBGRACustomTypeWriter; |
|
This item has no description. |
OuterOutlineOnly: boolean; |
|
This item has no description. |
OutlineColor: TBGRAPixel; |
|
This item has no description. |
OutlineTexture: IBGRAScanner; |
|
This item has no description. |
OutlineVisible: boolean; |
|
This item has no description. |
ShaderActive: boolean; |
|
This item has no description. |
ShadowColor: TBGRAPixel; |
|
This item has no description. |
ShadowOffset: TPoint; |
|
This item has no description. |
ShadowQuality: TRadialBlurType; |
|
This item has no description. |
ShadowRadius: integer; |
|
This item has no description. |
ShadowVisible: boolean; |
|
This item has no description. |
Methods
constructor Create(AShader: TCustomPhongShading; AShaderOwner: boolean); overload; |
|
This item has no description. |
constructor Create; overload; |
|
This item has no description. |
destructor Destroy; override; |
|
This item has no description. |
function FontExists(AName: string): boolean; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.FontExists. Checks whether a font exists |
function GetFontPixelMetric: TFontPixelMetric; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.GetFontPixelMetric. Returns measurement for the current font in pixels |
function GetFontPixelMetricF: TFontPixelMetricF; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.GetFontPixelMetricF. Returns measurement for the current font in fractional pixels |
function TextFitInfo(sUTF8: string; AMaxWidth: integer): integer; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextFitInfo. Returns the number of Unicode characters that fit into the specified size |
function TextFitInfoF(sUTF8: string; AMaxWidthF: single): integer; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextFitInfoF. Returns the number of Unicode characters that fit into the specified floating-point size |
function TextSize(sUTF8: string; AMaxWidth: integer; ARightToLeft: boolean): TSize; overload; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextSize. Returns the total size of the string provided given a maximum width and RTL mode, using the current font. Orientation is not taken into account, so that the width is along the text |
function TextSize(sUTF8: string): TSize; overload; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextSize. Returns the total size of the string provided using the current font. Orientation is not taken into account, so that the width is horizontal |
function TextSizeF(sUTF8: string): TPointF; overload; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextSizeF. Returns the total floating point size of the string provided using the current font. Orientation is not taken into account, so that the width is horizontal |
function TextSizeF(sUTF8: string; AMaxWidthF: single; ARightToLeft: boolean): TPointF; overload; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextSizeF. Returns the total floating point size of the string provided given a maximum width and RTL mode, using the current font. Orientation is not taken into account, so that the width is along the text |
function TextVisible(const AColor: TBGRAPixel): boolean; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextVisible. Checks if any text would be visible using the specified color |
function GetTypeWriter: TBGRACustomTypeWriter; |
|
This item has no description. |
procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; c: TBGRAPixel; align: TAlignment); overload; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextOut. Draws the UTF8 encoded string, with color c. If align is taLeftJustify, (x, y) is the top-left corner. If align is taCenter, (x, y) is at the top and middle of the text. If align is taRightJustify, (x, y) is the top-right corner. The value of FontOrientation is taken into account, so that the text may be rotated |
procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; texture: IBGRAScanner; align: TAlignment); overload; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextOut. Same as above functions, except that the text is filled using texture. The value of FontOrientation is taken into account, so that the text may be rotated |
procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; texture: IBGRAScanner; align: TAlignment); overload; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextOutAngle. Same as above, except that the orientation is specified, overriding the value of the property FontOrientation |
procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; c: TBGRAPixel; align: TAlignment); overload; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextOutAngle. Same as above, except that the orientation is specified in tenth of degrees CCW, overriding the value of the property FontOrientation |
procedure TextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; s: string; style: TTextStyle; texture: IBGRAScanner); overload; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextRect. Same as above except a texture is used to fill the text |
procedure TextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; s: string; style: TTextStyle; c: TBGRAPixel); overload; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextRect. Draw the UTF8 encoded string at the coordinate (x, y), clipped inside the rectangle ARect. Additional style information is provided by the style parameter. The color c is used to fill the text. No rotation is applied. |
procedure Init; |
|
This item has no description. |
procedure InternalTextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; c: TBGRAPixel; align: TAlignment); |
|
This item has no description. |
procedure TextOutAnglePatch(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; c: TBGRAPixel; tex: IBGRAScanner; align: TAlignment); |
|
This item has no description. |
procedure UpdateFont(ADisableClearType: boolean = false); |
|
This item has no description. |
Properties
property Collection: TCustomFreeTypeFontCollection read GetCollection; |
|
This item has no description. |
property ShaderLightPosition: TPoint read GetShaderLightPosition write SetShaderLightPosition; |
|
This item has no description. |
property ShaderLightPositionF: TPointF read GetShaderLightPositionF write SetShaderLightPositionF; |
|
This item has no description. |
property TypeWriter: TBGRACustomTypeWriter read GetTypeWriter; |
|
This item has no description. |