Class TBGRACustomTypeWriter

Unit

Declaration

type TBGRACustomTypeWriter = class(TObject)

Description

Abstract class for font rendering using cached glyphs

Hierarchy

Overview

Fields

Public DrawGlyphsSimultaneously: boolean;
Public LigatureWithF: boolean;
Public OutlineMode: TBGRATypeWriterOutlineMode;
Public SubstituteBidiBracket: boolean;
Protected TypeWriterMatrix: TAffineMatrix;

Methods

Public constructor Create;
Public destructor Destroy; override;
Public function GetGlyphBox(AIdentifier: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft): TAffineBox;
Public function GetTextBox(ATextUTF8: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft): TAffineBox;
Public function GetTextGlyphBoxes(ATextUTF8: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft): TGlyphBoxes;
Public function GetTextSizeBeforeTransform(ATextUTF8 :string): TPointF;
Protected function ComputeKerning(AIdLeft, AIdRight: string): single; virtual;
Protected function CustomHeaderSize: integer; virtual;
Protected function FindGlyph(AIdentifier: string): TAVLTreeNode;
Protected function FindKerning(AIdLeft, AIdRight: string): TAVLTreeNode;
Protected function GetDisplayInfo(ATextUTF8: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment): TBGRATextDisplayInfo;
Protected function GetGlyph(AIdentifier: string): TBGRAGlyph; virtual;
Protected function GetGlyphMatrix(AGlyph: TBGRAGlyph; X,Y: Single; AAlign: TBGRATypeWriterAlignment): TAffineMatrix;
Protected function GetKerningOffset(AIdBefore, AIdAfter: string; ARightToLeft: boolean): single; virtual;
Protected function GetTextMatrix(ATextUTF8: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment): TAffineMatrix;
Protected function HeaderName: string; virtual;
Protected function ReadCustomTypeWriterHeader(AStream: TStream): TBGRACustomTypeWriterHeader;
Public procedure CopyTextPathTo(ADest: IBGRAPath; ATextUTF8: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft); virtual;
Public procedure DrawGlyph(ADest: TBGRACanvas2D; AIdentifier: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft; AMirrored: boolean = false);
Public procedure DrawText(ADest: TBGRACanvas2D; ATextUTF8: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft); virtual;
Public procedure LoadGlyphsFromFile(AFilenameUTF8: string);
Public procedure LoadGlyphsFromStream(AStream: TStream);
Public procedure NeedGlyphAnsiRange;
Public procedure NeedGlyphRange(AUnicodeFrom, AUnicodeTo: LongWord);
Public procedure SaveGlyphsToFile(AFilenameUTF8: string);
Public procedure SaveGlyphsToStream(AStream: TStream);
Public procedure TextFitInfoBeforeTransform(ATextUTF8: string; AMaxWidth: single; out ACharCount, AByteCount: integer; out AUsedWidth: single);
Protected procedure AddGlyph(AGlyph: TBGRAGlyph);
Protected procedure BrowseAllGlyphs(ACallback: TBrowseGlyphCallback; AData: pointer);
Protected procedure BrowseGlyphs(ATextUTF8: string; ACallback: TBrowseGlyphCallback; AData: pointer; ADisplayOrder: boolean);
Protected procedure ClearGlyphs;
Protected procedure DrawLastPath(ADest: TBGRACanvas2D);
Protected procedure GlyphPath(ADest: TBGRACanvas2D; AIdentifier: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft; AMirrored: boolean = false);
Protected procedure ReadAdditionalHeader(AStream: TStream); virtual;
Protected procedure RemoveGlyph(AIdentifier: string);
Protected procedure SetGlyph(AIdentifier: string; AValue: TBGRAGlyph);
Protected procedure WriteCustomHeader(AStream: TStream); virtual;

Properties

Public property BidiMode: TFontBidiMode read FBidiMode write SetBidiMode;
Protected property Glyph[AIdentifier: string]: TBGRAGlyph read GetGlyph write SetGlyph;

Description

Fields

Public DrawGlyphsSimultaneously: boolean;

This item has no description.

Public LigatureWithF: boolean;

This item has no description.

Public OutlineMode: TBGRATypeWriterOutlineMode;

This item has no description.

Public SubstituteBidiBracket: boolean;

This item has no description.

Protected TypeWriterMatrix: TAffineMatrix;

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 GetGlyphBox(AIdentifier: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft): TAffineBox;

This item has no description.

Public function GetTextBox(ATextUTF8: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft): TAffineBox;

This item has no description.

Public function GetTextGlyphBoxes(ATextUTF8: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft): TGlyphBoxes;

This item has no description.

Public function GetTextSizeBeforeTransform(ATextUTF8 :string): TPointF;

This item has no description.

Protected function ComputeKerning(AIdLeft, AIdRight: string): single; virtual;

This item has no description.

Protected function CustomHeaderSize: integer; virtual;

This item has no description.

Protected function FindGlyph(AIdentifier: string): TAVLTreeNode;

This item has no description.

Protected function FindKerning(AIdLeft, AIdRight: string): TAVLTreeNode;

This item has no description.

Protected function GetDisplayInfo(ATextUTF8: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment): TBGRATextDisplayInfo;

This item has no description.

Protected function GetGlyph(AIdentifier: string): TBGRAGlyph; virtual;

This item has no description.

Protected function GetGlyphMatrix(AGlyph: TBGRAGlyph; X,Y: Single; AAlign: TBGRATypeWriterAlignment): TAffineMatrix;

This item has no description.

Protected function GetKerningOffset(AIdBefore, AIdAfter: string; ARightToLeft: boolean): single; virtual;

This item has no description.

Protected function GetTextMatrix(ATextUTF8: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment): TAffineMatrix;

This item has no description.

Protected function HeaderName: string; virtual;

This item has no description.

Protected function ReadCustomTypeWriterHeader(AStream: TStream): TBGRACustomTypeWriterHeader;

This item has no description.

Public procedure CopyTextPathTo(ADest: IBGRAPath; ATextUTF8: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft); virtual;

This item has no description.

Public procedure DrawGlyph(ADest: TBGRACanvas2D; AIdentifier: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft; AMirrored: boolean = false);

This item has no description.

Public procedure DrawText(ADest: TBGRACanvas2D; ATextUTF8: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft); virtual;

This item has no description.

Public procedure LoadGlyphsFromFile(AFilenameUTF8: string);

This item has no description.

Public procedure LoadGlyphsFromStream(AStream: TStream);

This item has no description.

Public procedure NeedGlyphAnsiRange;

This item has no description.

Public procedure NeedGlyphRange(AUnicodeFrom, AUnicodeTo: LongWord);

This item has no description.

Public procedure SaveGlyphsToFile(AFilenameUTF8: string);

This item has no description.

Public procedure SaveGlyphsToStream(AStream: TStream);

This item has no description.

Public procedure TextFitInfoBeforeTransform(ATextUTF8: string; AMaxWidth: single; out ACharCount, AByteCount: integer; out AUsedWidth: single);

This item has no description.

Protected procedure AddGlyph(AGlyph: TBGRAGlyph);

This item has no description.

Protected procedure BrowseAllGlyphs(ACallback: TBrowseGlyphCallback; AData: pointer);

This item has no description.

Protected procedure BrowseGlyphs(ATextUTF8: string; ACallback: TBrowseGlyphCallback; AData: pointer; ADisplayOrder: boolean);

This item has no description.

Protected procedure ClearGlyphs;

This item has no description.

Protected procedure DrawLastPath(ADest: TBGRACanvas2D);

This item has no description.

Protected procedure GlyphPath(ADest: TBGRACanvas2D; AIdentifier: string; X,Y: Single; AAlign: TBGRATypeWriterAlignment = twaTopLeft; AMirrored: boolean = false);

This item has no description.

Protected procedure ReadAdditionalHeader(AStream: TStream); virtual;

This item has no description.

Protected procedure RemoveGlyph(AIdentifier: string);

This item has no description.

Protected procedure SetGlyph(AIdentifier: string; AValue: TBGRAGlyph);

This item has no description.

Protected procedure WriteCustomHeader(AStream: TStream); virtual;

This item has no description.

Properties

Public property BidiMode: TFontBidiMode read FBidiMode write SetBidiMode;

This item has no description.

Protected property Glyph[AIdentifier: string]: TBGRAGlyph read GetGlyph write SetGlyph;

This item has no description.