function GetBestMatchFont(const fontInfo: TFontInfo): TFontReader; overload;
function GetBestMatchFont(const styles: TMacStyles): TFontReader; overload;
var
frItalic: TFontReader;
frItal14Cache: TFontCache;
begin
// FontManager.LoadFontReaderFamily loads regular,
// italic, bold and bold-italic fonts (if available)
FontManager.LoadFontReaderFamily('Arial');
frItalic := FontManager.GetBestMatchFont([msItalic]);
// create a TFontCache object with frItalic
frItal14Cache := TFontCache.Create(frItalic, DPIAware(14));
try
// and draw some text with frItal14Cache
finally
frItal14Cache.Free;
end;
TFontReader, TFontInfo, TMacStyles
Copyright ©2010-2023 Angus Johnson - Image32 4.8 - Help file built on 16 Apr 2025