function EnumFontsFixedPitchNoDups(var LogFont: TEnumLogFontEx; var Metric: TNewTextMetricEx; FontType: LongInt; Data: LParam): LongInt; stdcall;
var
S: String;
begin
S := LogFont.elfLogFont.lfFaceName;
if ((LogFont.elfLogFont.lfPitchAndFamily and FIXED_PITCH) = FIXED_PITCH) then
TStringList(PtrUInt(Data)).Add(S);
Result := 1;
end;
procedure PopulateFonts;
var
DC: HDC;
LogFont: TLogFont;
begin
LogFont.lfCharSet := DEFAULT_CHARSET;
LogFont.lfFaceName := '';
LogFont.lfPitchAndFamily := {$IFDEF LINUX}FIXED_PITCH{$ELSE}0{$ENDIF};
DC := GetDC(0);
try
EnumFontFamiliesEX(DC, @LogFont, @EnumFontsFixedPitchNoDups, PtrUInt(FFonts), 0);
finally
ReleaseDC(0, DC);
end;
end;