Class TBGRASystemFontRenderer

Unit

Declaration

type TBGRASystemFontRenderer = class(TBGRACustomFontRenderer)

Description

Font renderer using system rendering (LCL, mseGUI).

Hierarchy

Overview

Fields

Protected FFont: TFont;
Protected FOwnUnderline: boolean;
Protected FWordBreakHandler: TWordBreakHandler;
Public OverrideUnderlineDecoration: boolean;

Methods

Public constructor Create;
Public destructor Destroy; override;
Public function FontExists(AName: string): boolean; override;
Public function GetFontPixelMetric: TFontPixelMetric; override;
Public class function PatchSystemFontName(AName: string): string;
Public function TextFitInfo(sUTF8: string; AMaxWidth: integer): integer; override;
Public function TextSize(sUTF8: string): TSize; overload; override;
Public function TextSize(sUTF8: string; AMaxWidth: integer; ARightToLeft: boolean): TSize; overload; override;
Public function TextSizeAngle(sUTF8: string; orientationTenthDegCCW: integer): TSize; override;
Protected function InternalGetFontPixelMetric: TFontPixelMetric;
Protected function InternalTextSize(sUTF8: string; AShowPrefix: boolean): TSize;
Protected function InternalTextSizeAngle(sUTF8: string; AShowPrefix: boolean; AOrientation: integer): TSize; virtual;
Public procedure SplitText(var ATextUTF8: string; AMaxWidth: integer; out ARemainsUTF8: string);
Public procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; sUTF8: string; texture: IBGRAScanner; align: TAlignment); overload; override;
Public procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; sUTF8: string; c: TBGRAPixel; align: TAlignment; ARightToLeft: boolean); overload; override;
Public procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; sUTF8: string; texture: IBGRAScanner; align: TAlignment; ARightToLeft: boolean); overload; override;
Public procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; sUTF8: string; c: TBGRAPixel; align: TAlignment); overload; override;
Public procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientationTenthDegCCW: integer; sUTF8: string; texture: IBGRAScanner; align: TAlignment; ARightToLeft: boolean); overload; override;
Public procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientationTenthDegCCW: integer; sUTF8: string; texture: IBGRAScanner; align: TAlignment); overload; override;
Public procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientationTenthDegCCW: integer; sUTF8: string; c: TBGRAPixel; align: TAlignment); overload; override;
Public procedure TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientationTenthDegCCW: integer; sUTF8: string; c: TBGRAPixel; align: TAlignment; ARightToLeft: boolean); overload; override;
Public procedure TextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; sUTF8: string; style: TTextStyle; texture: IBGRAScanner); overload; override;
Public procedure TextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; sUTF8: string; style: TTextStyle; c: TBGRAPixel); overload; override;
Public procedure TextWordBreak(ADest: TBGRACustomBitmap; AText: string; x, y, AMaxWidth: integer; ATexture: IBGRAScanner; AHorizAlign: TAlignment; AVertAlign: TTextLayout; ARightToLeft: boolean = false); overload;
Public procedure TextWordBreak(ADest: TBGRACustomBitmap; AText: string; x, y, AMaxWidth: integer; AColor: TBGRAPixel; AHorizAlign: TAlignment; AVertAlign: TTextLayout; ARightToLeft: boolean = false); overload;
Protected procedure DefaultWorkBreakHandler(var ABeforeUTF8, AAfterUTF8: string);
Protected procedure InternalSplitText(var ATextUTF8: string; AMaxWidth: integer; out ARemainsUTF8: string; AWordBreak: TWordBreakHandler); overload;
Protected procedure InternalSplitText(var ATextUTF8: string; AMaxWidth: integer; out ARemainsUTF8: string; out ALineEndingBreak: boolean; AWordBreak: TWordBreakHandler); overload;
Protected procedure InternalTextOut(ADest: TBGRACustomBitmap; x, y: single; sUTF8: string; c: TBGRAPixel; texture: IBGRAScanner; align: TAlignment; AShowPrefix: boolean = false; ARightToLeft: boolean = false);
Protected procedure InternalTextOutAngle(ADest: TBGRACustomBitmap; x, y: single; AOrientation: integer; sUTF8: string; c: TBGRAPixel; texture: IBGRAScanner; align: TAlignment; AShowPrefix: boolean = false; ARightToLeft: boolean = false); virtual;
Protected procedure InternalTextOutEllipse(ADest: TBGRACustomBitmap; x, y, availableWidth: single; sUTF8: string; c: TBGRAPixel; texture: IBGRAScanner; align: TAlignment; AShowPrefix: boolean = false; ARightToLeft: boolean = false);
Protected procedure InternalTextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; sUTF8: string; style: TTextStyle; c: TBGRAPixel; ATexture: IBGRAScanner);
Protected procedure InternalTextWordBreak(ADest: TBGRACustomBitmap; ATextUTF8: string; x, y, AMaxWidth: integer; AColor: TBGRAPixel; ATexture: IBGRAScanner; AHorizAlign: TAlignment; AVertAlign: TTextLayout; ARightToLeft: boolean);
Protected procedure UpdateFont; virtual;

Properties

Public property OnWordBreak: TWordBreakHandler read FWordBreakHandler write FWordBreakHandler;

Description

Fields

Protected FFont: TFont;

This item has no description.

Protected FOwnUnderline: boolean;

This item has no description.

Protected FWordBreakHandler: TWordBreakHandler;

font parameters

Public OverrideUnderlineDecoration: boolean;

This item has no description.

Methods

Public constructor Create;

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 class function PatchSystemFontName(AName: string): string;

This item has no description.

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 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 TextSizeAngle(sUTF8: string; orientationTenthDegCCW: integer): TSize; override;

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

Returns the total size of the string provided using the current font, with the given orientation in tenth of degrees CCW, along the text

Protected function InternalGetFontPixelMetric: TFontPixelMetric;

This item has no description.

Protected function InternalTextSize(sUTF8: string; AShowPrefix: boolean): TSize;

This item has no description.

Protected function InternalTextSizeAngle(sUTF8: string; AShowPrefix: boolean; AOrientation: integer): TSize; virtual;

This item has no description.

Public procedure SplitText(var ATextUTF8: string; AMaxWidth: integer; out ARemainsUTF8: string);

draw unerline according to computed font pixel metric instead of using system rendering of underline

Public procedure TextOut(ADest: TBGRACustomBitmap; x, y: single; sUTF8: 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; sUTF8: 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; sUTF8: 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 TextOut(ADest: TBGRACustomBitmap; x, y: single; sUTF8: 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 TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientationTenthDegCCW: integer; sUTF8: 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 TextOutAngle(ADest: TBGRACustomBitmap; x, y: single; orientationTenthDegCCW: integer; sUTF8: 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; orientationTenthDegCCW: integer; sUTF8: 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; orientationTenthDegCCW: integer; sUTF8: 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 TextRect(ADest: TBGRACustomBitmap; ARect: TRect; x, y: integer; sUTF8: 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; sUTF8: 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.

Public procedure TextWordBreak(ADest: TBGRACustomBitmap; AText: string; x, y, AMaxWidth: integer; ATexture: IBGRAScanner; AHorizAlign: TAlignment; AVertAlign: TTextLayout; ARightToLeft: boolean = false); overload;

This item has no description.

Public procedure TextWordBreak(ADest: TBGRACustomBitmap; AText: string; x, y, AMaxWidth: integer; AColor: TBGRAPixel; AHorizAlign: TAlignment; AVertAlign: TTextLayout; ARightToLeft: boolean = false); overload;

This item has no description.

Protected procedure DefaultWorkBreakHandler(var ABeforeUTF8, AAfterUTF8: string);

This item has no description.

Protected procedure InternalSplitText(var ATextUTF8: string; AMaxWidth: integer; out ARemainsUTF8: string; AWordBreak: TWordBreakHandler); overload;

This item has no description.

Protected procedure InternalSplitText(var ATextUTF8: string; AMaxWidth: integer; out ARemainsUTF8: string; out ALineEndingBreak: boolean; AWordBreak: TWordBreakHandler); overload;

This item has no description.

Protected procedure InternalTextOut(ADest: TBGRACustomBitmap; x, y: single; sUTF8: string; c: TBGRAPixel; texture: IBGRAScanner; align: TAlignment; AShowPrefix: boolean = false; ARightToLeft: boolean = false);

This item has no description.

Protected procedure InternalTextOutAngle(ADest: TBGRACustomBitmap; x, y: single; AOrientation: integer; sUTF8: string; c: TBGRAPixel; texture: IBGRAScanner; align: TAlignment; AShowPrefix: boolean = false; ARightToLeft: boolean = false); virtual;

This item has no description.

Protected procedure InternalTextOutEllipse(ADest: TBGRACustomBitmap; x, y, availableWidth: single; sUTF8: string; c: TBGRAPixel; texture: IBGRAScanner; align: TAlignment; AShowPrefix: boolean = false; ARightToLeft: boolean = false);

This item has no description.

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

This item has no description.

Protected procedure InternalTextWordBreak(ADest: TBGRACustomBitmap; ATextUTF8: string; x, y, AMaxWidth: integer; AColor: TBGRAPixel; ATexture: IBGRAScanner; AHorizAlign: TAlignment; AVertAlign: TTextLayout; ARightToLeft: boolean);

This item has no description.

Protected procedure UpdateFont; virtual;

This item has no description.

Properties

Public property OnWordBreak: TWordBreakHandler read FWordBreakHandler write FWordBreakHandler;

This item has no description.