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 you supply a directory, it will look for *.glyphs files in it to load fonts
if you don't supply a directory, fonts will be vectorized from the system
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
- TObject
- TBGRACustomFontRenderer
- TBGRAVectorizedFontRenderer
Overview
Fields
FCanvas2D: TBGRACanvas2D; |
|
FDirectoryUTF8: string; |
|
FVectorizedFont: TBGRAVectorizedFont; |
|
FVectorizedFontArray: array of record
FontName: string;
FontStyle: TFontStyles;
VectorizedFont: TBGRAVectorizedFont;
end; |
|
MaxFontResolution: integer; |
|
MinFontResolution: integer; |
|
OuterOutlineOnly: boolean; |
|
OutlineColor: TBGRAPixel; |
|
OutlineJoin: TPenJoinStyle; |
|
OutlineTexture: IBGRAScanner; |
|
OutlineVisible: boolean; |
|
OutlineWidth: single; |
|
QuadraticCurves: boolean; |
|
ShadowColor: TBGRAPixel; |
|
ShadowOffset: TPoint; |
|
ShadowRadius: integer; |
|
ShadowVisible: boolean; |
Methods
constructor Create; overload; |
|
constructor Create(ADirectoryUTF8: string); overload; |
|
destructor Destroy; override; |
|
function FontExists(AName: string): boolean; override; |
|
function GetFontPixelMetric: TFontPixelMetric; override; |
|
function GetFontPixelMetricF: TFontPixelMetricF; override; |
|
function HandlesTextPath: boolean; override; |
|
function TextFitInfo(sUTF8: string; AMaxWidth: integer): integer; override; |
|
function TextFitInfoF(sUTF8: string; AMaxWidthF: single): integer; override; |
|
function TextSize(sUTF8: string): TSize; overload; override; |
|
function TextSize(sUTF8: string; AMaxWidth: integer; ARightToLeft: boolean): 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 GetCanvas2D(ASurface: TBGRACustomBitmap): TBGRACanvas2D; |
|
function OutlineActuallyVisible: boolean; |
|
procedure CopyTextPathTo(ADest: IBGRAPath; x, y: single; s: string; align: TAlignment); override; |
|
procedure CopyTextPathTo(ADest: IBGRAPath; x, y: single; s: string; align: TAlignment; ARightToLeft: boolean); override; |
|
procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; c: TBGRAPixel; align: TAlignment; ARightToLeft: boolean); overload; override; |
|
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 TextOut(ADest: TBGRACustomBitmap; x, y: single; s: string; texture: IBGRAScanner; align: TAlignment; ARightToLeft: boolean); 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; ARightToLeft: boolean); overload; override; |
|
procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; c: TBGRAPixel; align: TAlignment); overload; override; |
|
procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; texture: IBGRAScanner; align: TAlignment; ARightToLeft: boolean); 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 InternalCopyTextPathTo(ADest: IBGRAPath; x, y: single; s: string; align: TAlignment; ABidiMode: TFontBidiMode); |
|
procedure InternalTextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; c: TBGRAPixel; texture: IBGRAScanner; align: TAlignment; ABidiMode: TFontBidiMode); |
|
procedure InternalTextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; sUTF8: string; style: TTextStyle; c: TBGRAPixel; texture: IBGRAScanner); |
|
procedure UpdateFont; |
Description
Fields
FCanvas2D: TBGRACanvas2D; |
|
This item has no description. |
FDirectoryUTF8: string; |
|
This item has no description. |
FVectorizedFont: TBGRAVectorizedFont; |
|
This item has no description. |
FVectorizedFontArray: array of record
FontName: string;
FontStyle: TFontStyles;
VectorizedFont: TBGRAVectorizedFont;
end; |
|
This item has no description. |
MaxFontResolution: integer; |
|
This item has no description. |
MinFontResolution: integer; |
|
This item has no description. |
OuterOutlineOnly: boolean; |
|
This item has no description. |
OutlineColor: TBGRAPixel; |
|
This item has no description. |
OutlineJoin: TPenJoinStyle; |
|
This item has no description. |
OutlineTexture: IBGRAScanner; |
|
This item has no description. |
OutlineVisible: boolean; |
|
This item has no description. |
OutlineWidth: single; |
|
This item has no description. |
QuadraticCurves: boolean; |
|
This item has no description. |
ShadowColor: TBGRAPixel; |
|
This item has no description. |
ShadowOffset: TPoint; |
|
This item has no description. |
ShadowRadius: integer; |
|
This item has no description. |
ShadowVisible: boolean; |
|
This item has no description. |
Methods
constructor Create; overload; |
|
This item has no description. |
constructor Create(ADirectoryUTF8: string); 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 HandlesTextPath: boolean; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.HandlesTextPath. Check whether the renderer can produce text path |
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): 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 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 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 GetCanvas2D(ASurface: TBGRACustomBitmap): TBGRACanvas2D; |
|
This item has no description. |
function OutlineActuallyVisible: boolean; |
|
This item has no description. |
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. |
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 |
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 |
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 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 |
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; ARightToLeft: boolean); overload; override; |
|
This item has no description. Showing description inherited from TBGRACustomFontRenderer.TextOutAngle. Same as above but with given RTL mode |
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 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 |
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 InternalCopyTextPathTo(ADest: IBGRAPath; x, y: single; s: string; align: TAlignment; ABidiMode: TFontBidiMode); |
|
This item has no description. |
procedure InternalTextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientation: integer; s: string; c: TBGRAPixel; texture: IBGRAScanner; align: TAlignment; ABidiMode: TFontBidiMode); |
|
This item has no description. |
procedure InternalTextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; sUTF8: string; style: TTextStyle; c: TBGRAPixel; texture: IBGRAScanner); |
|
This item has no description. |
procedure UpdateFont; |
|
This item has no description. |