- - * - WhiteUnicorn - * - -




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >


Frequently Asked Questions

Checking if TrueType fonts are available.

Question:

How can I tell if TrueType fonts are available on a given system?

Answer:

The following example should report if the TrueType engine is
available, enabled, and at least one TrueType font is installed:

function IsTrueTypeAvailable : bool;
var
 {$IFDEF WIN32}
  rs : TRasterizerStatus;
 {$ELSE}
  rs : TRasterizer_Status;
 {$ENDIF}
begin
  result := false;
  if not GetRasterizerCaps(rs, sizeof(rs)) then exit;
  if rs.WFlags and TT_AVAILABLE <> TT_AVAILABLE then exit;
  if rs.WFlags and TT_ENABLED <> TT_ENABLED then exit;
  result := true;
end;



* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >



- - * - Anastasija aka WhiteUnicorn - * - - LJLiveJournal
PFPhotoFile