[Lazarus] TextFitInfo

Michael Van Canneyt michael at freepascal.org
Wed Aug 15 10:49:00 CEST 2018


Hi,

TCanvas has a TextFitInfo method:

{------------------------------------------------------------------------------
   Function: TCanvas.TextFitInfo
   Params:   Text: The text in consideration
             MaxWidth: The size, the major input
   Returns:  The number of characters which will fit into MaxWidth

   Returns how many characters will fit in a specified width
  ------------------------------------------------------------------------------}
function TCanvas.TextFitInfo(const Text: string; MaxWidth: Integer): Integer;


How must I understand 'Characters' ? As Code points or as bytes ?

Michael.


More information about the Lazarus mailing list