1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| public
constructor Create;
destructor Destroy; override;
procedure BuildFontCache;
function Add(const AObject: TFPFontCacheItem): integer;
procedure AssignFontList(const AStrings: TStrings);
procedure Clear;
procedure LoadFromFile(const AFilename: string);
procedure ReadStandardFonts;
property Count: integer read GetCount;
function IndexOf(const AObject: TFPFontCacheItem): integer;
// Find postscript font name based on fontname and attributes
function FindPostScriptFontName(const AFontName: string; ABold: boolean; AItalic: boolean): String;
// Same as Find, but raise exception when not found.
function GetPostScriptFontName(const AFontName: string; ABold: boolean; AItalic: boolean): String;
function Find(const AFontCacheItem: TFPFontCacheItem): integer; overload;
function Find(const AFamilyName: string; ABold: boolean; AItalic: boolean): TFPFontCacheItem; overload;
function Find(const APostScriptName: string): TFPFontCacheItem; overload;
function FindHumanFriendly(const AName: string ): TFPFontCacheItem; overload;
function FindFamily(const AFamilyName: string ): TFPFontCacheItemArray; overload;
function FindFont(const AName: string): TFPFontCacheItem; overload;
{ not used: utility function doing a conversion for us. }
function PointSizeInPixels(const APointSize: single): single;
property Items[AIndex: Integer]: TFPFontCacheItem read GetItem write SetItem; default;
property SearchPath: TStringList read FSearchPath;
property DPI: integer read FDPI write SetDPI;
Property BuildFontCacheIgnoresErrors : Boolean Read FBuildFontCacheIgnoresErrors Write FBuildFontCacheIgnoresErrors;
end; |
Partager