[Lazarus] FontCanUTF8(Font: HFont)

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Sat Nov 26 04:25:36 CET 2011


You have to read the implementations to see what the routines do, and
in this case it looks pretty clear that it is a legacy introduced
because LCL-gtk1 needed it.

It probably can be deprecated.

function TGTKWidgetSet.FontCanUTF8(Font: HFont): boolean;
begin
  Result:=IsValidGDIObject(Font)
    {$IFDEF Gtk1}
    and FontIsDoubleByteCharsFont(PGdiObject(Font)^.GDIFontObject)
    {$ENDIF}
    ;
end;

function TWin32WidgetSet.FontCanUTF8(Font: HFont): boolean;
begin
  {$ifdef WindowsUnicodeSupport}
    Result := True;
  {$else}
    Result := False;
  {$endif}
end;

-- 
Felipe Monteiro de Carvalho




More information about the Lazarus mailing list