You should enumerate all fonts in the system:
procedure TPDFFontMapper.EnumFonts;
var
LF: TLogFont;
begin
System.FillChar(LF, sizeof(LF), 0);
LF.lfCharSet := DEFAULT_CHARSET;
FDC := CreateCompatibleDC(0);
try
Windows.EnumFontFamiliesEx(FDC, LF, @EnumFFProc, Integer(Self), 0);
finally
Windows.DeleteDC(FDC);
end;
end;
You should have a function that is called for each font and test if it is a vector font (both TrueType and OpenType fonts are considered truetype fonts):
function EnumFFProc(const LogFont: TEnumLogFontEx; const TextMetric: TNewTextMetric; FontType: DWORD; LParam: DWORD): Integer; stdcall;
begin
if FontType and TRUETYPE_FONTTYPE = TRUETYPE_FONTTYPE then
// do sometghing useful with the logfont...
Result := 1;
end;