anchor.diff:      {Here we count floating images as 1 ThtChar but do not include their width,
         This is required for the call in FindCursor}
         if not (Align in [ALeft, ARight]) then
  -      begin
  -        Result := Result + Wid + HSpcL + HSpcR;
  -      end;
  +        Inc(Result, Wid + HSpcL + HSpcR);
         Dec(N); {image counts as one ThtChar}
         Inc(Start);
       end
       else if J1 = 0 then
       begin
  -      Result := Result + FormControls.GetWidthAt(Start - Buff, HSpcL, HSpcR);
  -      Result := Result + HSpcL + HSpcR;
  +      Inc(Result, FormControls.GetWidthAt(Start - Buff, HSpcL, HSpcR) + HSpcL + HSpcR);
         Dec(N); {control counts as one ThtChar}
         Inc(Start);
       end
       else
       begin
  -      Font := Fonts.GetFontAt(Start - Buff, OHang);
  -      Font.AssignToCanvas(Canvas);
  +      Fonts.GetFontAt(Start - Buff, OHang).AssignToCanvas(Canvas);
         I := Min(J, J1);
         I := Min(I, Min(Fonts.GetFontCountAt(Start - Buff, Len), N));
  +      Assert(I > 0, 'I less than or = 0 in FindTextWidthA');
         Inc(Result, GetXExtent(Canvas.Handle, Start, I) - OHang);
         if I = 0 then
           Break;
  
positive.code:   I, J, J1, OHang, Wid, HSpcL, HSpcR: Integer;
    Align: AlignmentType;
    FlObj: TFloatingObj;
    Font: TMyFont;
  begin
    Result := 0;
    while N > 0 do
  
negative.code:   const Widths: IntArray;
    StartIndex, EndIndex: Integer): Integer;
    {$ifdef UseInline} inline; {$endif}
  var
    I: Integer;
  begin
    Result := 0;
    for I := StartIndex to EndIndex do
      if ColumnSpecs[I] = WidthType then
        Inc(Result, Widths[I]);
  end;
  
  //-- BG ---------------------------------------------------------- 17.06.2012 --
  function SumOfNotType(
    WidthType: TWidthType;
    const ColumnSpecs: TWidthTypeArray;
    const Widths: IntArray;
    StartIndex, EndIndex: Integer): Integer;
    {$ifdef UseInline} inline; {$endif}
  var
    I: Integer;
  begin
    Result := 0;
    for I := StartIndex to EndIndex do
      if ColumnSpecs[I] <> WidthType then
        Inc(Result, Widths[I]);
  end;
  
  