判断是否有TrueType字体

原文链接: http://www.cnblogs.com/yzryc/p/6374297.html

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;

转载于:https://www.cnblogs.com/yzryc/p/6374297.html

猜你喜欢

转载自blog.csdn.net/weixin_30768661/article/details/94794938