[Lazarus] FontCanUTF8(Font: HFont)
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Sat Nov 26 10:27:02 CET 2011
Felipe Monteiro de Carvalho schrieb:
> 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.
Reading the implementation doesn't help much, as can be seen with your
example:
> function TGTKWidgetSet.FontCanUTF8(Font: HFont): boolean;
> begin
> Result:=IsValidGDIObject(Font)
> {$IFDEF Gtk1}
> and FontIsDoubleByteCharsFont(PGdiObject(Font)^.GDIFontObject)
> {$ENDIF}
> ;
> end;
What does *FontIsDoubleByteCharsFont* mean? This *might* mean UTF-16,
but then the name *FontCanUTF8* already is wrong.
IMO a usable software should *not* require the user to guess, what
various implementations *might* do. Instead the *implementors*, who
*know* what to implement, should leave at least a small note on the
purpose of every procedure or method. That's little work for the Lazarus
team, which saves many months to the documentation writers :-]
Not to forget possibly or definitely wrong descriptions, as found in
many places in the documentation :-(
DoDi
More information about the Lazarus
mailing list