Registriert seit: 18. Feb 2006
Ort: Stolberg
2.227 Beiträge
Delphi 2010 Professional
|
Re: Erkennen des Schrifttyps
12. Jun 2007, 17:10
Hallo Matthias,
versuche es mit dieser Funktion:
Delphi-Quellcode:
function IsTrueTypeFont (aFont: TFont): Boolean;
var
DC : HDC;
TM : TTextMetric;
begin
DC := CreateDC(' DISPLAY', nil, nil, nil);
try
SelectObject( DC, aFont.Handle);
GetTextMetrics( DC, TM);
Result := ((TM.tmPitchAndFamily and TMPF_TRUETYPE) <> 0);
finally
DeleteDC( DC);
end;
end;
Gruß Hawkeye
|