TFontManager.GetFontInfo

function GetFontInfo(logFont: TLogFont; AutoAdd: Boolean = true; InitAnsi: boolean = true): TFontInfo; overload;

Returns a TFontInfo object that matches the supplied LogFont record.

function GetFontInfo(font: hFont; AutoAdd: Boolean = true; InitAnsi: boolean = true): TFontInfo; overload;

Returns a TFontInfo object that matches the supplied font handle.

When AutoAdd is true and no match is found in the FontManager, then the FontManager will create a new TFontInfo object for the supplied logFont. When AutoAdd is false and no match is found, then the function will return nil.

Note, it's much more efficient to obtain character info. for multiple characters rather than for individual ones. Hence when InitAnsi is true, the FontManager will get character info for all characters in the ANSI character range (32 .. 126).