anchor.diff:      property FontData[aIndex: TKMFont]: TKMFontData read GetFontData;
       class function GuessPalette(aFileName: string): TKMPal;
   
  +    function GetCharWidth(aChar: WideChar; aFont: TKMFont): Integer;
       function WordWrap(aText: UnicodeString; aFont: TKMFont; aMaxPxWidth: Integer; aForced: Boolean; aIndentAfterNL: Boolean): UnicodeString;
       function CharsThatFit(const aText: UnicodeString; aFont: TKMFont; aMaxPxWidth: integer): integer;
       function GetTextSize(const aText: UnicodeString; Fnt: TKMFont; aCountMarkup: Boolean = False): TKMPoint;
  
positive.code: 
    for I := 1 to Length(aText) do
    begin
      if aText[I] = #32 then Inc(AdvX, fFontData[aFont].WordSpacing)
                        else Inc(AdvX, fFontData[aFont].Letters[Ord(aText[I])].Width + CharSpacing);
  
      if (AdvX > aMaxPxWidth) then
      begin
  
negative.code: end;
  
  
  function TKMResourceFont.GetCharWidth(aChar: WideChar; aFont: TKMFont): Integer;
  begin
    if aChar = #124 then
      Result := 0
    else
      if aChar = #32 then
        Result := fFontData[aFont].WordSpacing
      else
        if fFontData[aFont].Used[Ord(aChar)] <> 0 then
          Result := fFontData[aFont].Letters[Ord(aChar)].Width + fFontData[aFont].CharSpacing
        else
          //Missing characters get rendered as ? so we should count their width as that too
          Result := fFontData[aFont].Letters[Ord('?')].Width + fFontData[aFont].CharSpacing;
  end;
  
  
  function TKMResourceFont.WordWrap(aText: UnicodeString; aFont: TKMFont; aMaxPxWidth: Integer; aForced: Boolean; aIndentAfterNL: Boolean): UnicodeString;
  const
    INDENT = '   ';
  var
    I: Integer;
    LastWrappable: Integer;
    LastWrappableIsSpace: Boolean;
    AdvX, PrevX: Integer;
    TmpColor: Integer;
  