Class TBGRAVectorizedFontRenderer

Unit

Declaration

type TBGRAVectorizedFontRenderer = class(TBGRACustomFontRenderer)

Description

Font renderer using vectorized fonts and with effects.

TBGRAVectorizedFontRenderer class works like other font renderers, i.e., it can be assigned to the FontRenderer property. You can use it in two different modes :

If provides effect like TBGRATextEffectFontRenderer (outline and shadow) but that difference is that the font is always vectorized whereas TBGRATextEffectFontRenderer will use bitmap rendering when possible.

Hierarchy

Overview

Fields

Protected FCanvas2D: TBGRACanvas2D;
Protected FDirectoryUTF8: string;
Protected FVectorizedFont: TBGRAVectorizedFont;
Protected FVectorizedFontArray: array of record FontName: string; FontStyle: TFontStyles; VectorizedFont: TBGRAVectorizedFont; end;
Public MaxFontResolution: integer;
Public MinFontResolution: integer;
Public OuterOutlineOnly: boolean;
Public OutlineColor: TBGRAPixel;
Public OutlineJoin: TPenJoinStyle;
Public OutlineTexture: IBGRAScanner;
Public OutlineVisible: boolean;
Public OutlineWidth: single;
Public QuadraticCurves: boolean;
Public ShadowColor: TBGRAPixel;
Public ShadowOffset: TPoint;
Public ShadowRadius: integer;
Public ShadowVisible: boolean;

Methods

Public constructor Create; overload;
Public constructor Create(ADirectoryUTF8: string); overload;
Public destructor Destroy; override;
Public function FontExists(AName: string): boolean; override;
Public function GetFontPixelMetric: TFontPixelMetric; override;
Public function GetFontPixelMetricF: TFontPixelMetricF; override;
Public function HandlesTextPath: boolean; override;
Public function TextFitInfo(sUTF8: string; AMaxWidth: integer): integer; override;
Public function TextFitInfoF(sUTF8: string; AMaxWidthF: single): integer; override;
Public function TextSize(sUTF8: string): TSize; overload; override;
Public function TextSize(sUTF8: string; AMaxWidth: integer; ARightToLeft: boolean): TSize; overload; override;
Public function TextSizeF(sUTF8: string): TPointF; overload; override;
Public function TextSizeF(sUTF8: string; AMaxWidthF: single; ARightToLeft: boolean): TPointF; overload; override;
Public function TextVisible(const AColor: TBGRAPixel): boolean; override;
Protected function GetCanvas2D(ASurface: TBGRACustomBitmap): TBGRACanvas2D;
Protected function OutlineActuallyVisible: boolean;
Public procedure CopyTextPathTo(ADest: IBGRAPath; x, y: single; s: string; align: TAlignment); override;
Public procedure CopyTextPathTo(ADest: IBGRAPath; x, y: single; s: string; align: TAlignment; ARightToLeft: boolean); override;
Public procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; c: TBGRAPixel; align: TAlignment; ARightToLeft: boolean); overload; override;
Public procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; c: TBGRAPixel; align: TAlignment); overload; override;
Public procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; texture: IBGRAScanner; align: TAlignment); overload; override;
Public procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; texture: IBGRAScanner; align: TAlignment; ARightToLeft: boolean); overload; override;
Public procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; texture: IBGRAScanner; align: TAlignment); overload; override;
Public procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; c: TBGRAPixel; align: TAlignment; ARightToLeft: boolean); overload; override;
Public procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; c: TBGRAPixel; align: TAlignment); overload; override;
Public procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; texture: IBGRAScanner; align: TAlignment; ARightToLeft: boolean); overload; override;
Public procedure TextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; s: string; style: TTextStyle; texture: IBGRAScanner); overload; override;
Public procedure TextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; s: string; style: TTextStyle; c: TBGRAPixel); overload; override;
Protected procedure Init;
Protected procedure InternalCopyTextPathTo(ADest: IBGRAPath; x, y: single; s: string; align: TAlignment; ABidiMode: TFontBidiMode);
Protected procedure InternalTextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; c: TBGRAPixel; texture: IBGRAScanner; align: TAlignment; ABidiMode: TFontBidiMode);
Protected procedure InternalTextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; sUTF8: string; style: TTextStyle; c: TBGRAPixel; texture: IBGRAScanner);
Protected procedure UpdateFont;

Description

Fields

Protected FCanvas2D: TBGRACanvas2D;

This item has no description.

Protected FDirectoryUTF8: string;

This item has no description.

Protected FVectorizedFont: TBGRAVectorizedFont;

This item has no description.

Protected FVectorizedFontArray: array of record FontName: string; FontStyle: TFontStyles; VectorizedFont: TBGRAVectorizedFont; end;

This item has no description.

Public MaxFontResolution: integer;

This item has no description.

Public MinFontResolution: integer;

This item has no description.

Public OuterOutlineOnly: boolean;

This item has no description.

Public OutlineColor: TBGRAPixel;

This item has no description.

Public OutlineJoin: TPenJoinStyle;

This item has no description.

Public OutlineTexture: IBGRAScanner;

This item has no description.

Public OutlineVisible: boolean;

This item has no description.

Public OutlineWidth: single;

This item has no description.

Public QuadraticCurves: boolean;

This item has no description.

Public ShadowColor: TBGRAPixel;

This item has no description.

Public ShadowOffset: TPoint;

This item has no description.

Public ShadowRadius: integer;

This item has no description.

Public ShadowVisible: boolean;

This item has no description.

Methods

Public constructor Create; overload;

This item has no description.

Public constructor Create(ADirectoryUTF8: string); overload;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function FontExists(AName: string): boolean; override;

This item has no description. Showing description inherited from TBGRACustomFontRenderer.FontExists.

Checks whether a font exists

Public function GetFontPixelMetric: TFontPixelMetric; override;

This item has no description. Showing description inherited from TBGRACustomFontRenderer.GetFontPixelMetric.

Returns measurement for the current font in pixels

Public function GetFontPixelMetricF: TFontPixelMetricF; override;

This item has no description. Showing description inherited from TBGRACustomFontRenderer.GetFontPixelMetricF.

Returns measurement for the current font in fractional pixels

Public function HandlesTextPath: boolean; override;

This item has no description. Showing description inherited from TBGRACustomFontRenderer.HandlesTextPath.

Check whether the renderer can produce text path

Public 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

Public 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

Public 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

Public 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

Public 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

Public 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

Public 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

Protected function GetCanvas2D(ASurface: TBGRACustomBitmap): TBGRACanvas2D;

This item has no description.

Protected function OutlineActuallyVisible: boolean;

This item has no description.

Public procedure CopyTextPathTo(ADest: IBGRAPath; x, y: single; s: string; align: TAlignment); override;

This item has no description. Showing description inherited from TBGRACustomFontRenderer.CopyTextPathTo.

Copy the path for the UTF8 encoded string into ADest. 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.

Public procedure CopyTextPathTo(ADest: IBGRAPath; x, y: single; s: string; align: TAlignment; ARightToLeft: boolean); override;

This item has no description. Showing description inherited from TBGRACustomFontRenderer.CopyTextPathTo.

Same as above but with given RTL mode

Public procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; c: TBGRAPixel; align: TAlignment; ARightToLeft: boolean); overload; override;

This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextOut.

Same as above but with given RTL mode

Public 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

Public 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

Public procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; texture: IBGRAScanner; align: TAlignment; ARightToLeft: boolean); overload; override;

This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextOut.

Same as above but with given RTL mode

Public 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

Public procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; c: TBGRAPixel; align: TAlignment; ARightToLeft: boolean); overload; override;

This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextOutAngle.

Same as above but with given RTL mode

Public 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

Public procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; texture: IBGRAScanner; align: TAlignment; ARightToLeft: boolean); overload; override;

This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextOutAngle.

Same as above but with given RTL mode

Public 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

Public 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.

Protected procedure Init;

This item has no description.

Protected procedure InternalCopyTextPathTo(ADest: IBGRAPath; x, y: single; s: string; align: TAlignment; ABidiMode: TFontBidiMode);

This item has no description.

Protected procedure InternalTextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; c: TBGRAPixel; texture: IBGRAScanner; align: TAlignment; ABidiMode: TFontBidiMode);

This item has no description.

Protected procedure InternalTextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; sUTF8: string; style: TTextStyle; c: TBGRAPixel; texture: IBGRAScanner);

This item has no description.

Protected procedure UpdateFont;

This item has no description.