This class is intended primarily for single instance use. The FontManager function accesses the single instance TFontManager object that's automatically constructed by the library.
var arialFont: TFontReader; sansBoldFont: TFontReader; fontInfo: TFontInfo; begin FontManager.LoadFromResource('my_ttf_font'; RT_RCDATA); arialFont := FontManager.Load('Arial'); FontManager.Load('Arial Bold'); FontManager.Load('Arial Italic'); FontManager.Load('Arial Bold Italic'); FontManager.Load('Times New Roman'); FontManager.Load('Times New Roman Bold'); FontManager.Load('Times New Roman Italic'); FontManager.Load('Times New Roman Bold Italic'); //now find the font that best matches - bold sans-serif FillChar(fontInfo, SizeOf(fontInfo), 0); fontInfo.fontFamily := ttfSansSerif; fontInfo.macStyles := [msBold]; sansBoldFont := FontManager.GetBestMatchFont(fontInfo);
Methods | Properties |
---|---|
Clear | MaxFonts |
Delete | |
GetBestMatchFont | |
LoadFontReader | |
LoadFontReaderFamily | |
LoadFromFile | |
LoadFromResource | |
LoadFromStream |
Copyright ©2010-2023 Angus Johnson - Image32 4.8 - Help file built on 18 Jan 2025