anchor.diff:    TfpgWindowImpl = class;
     
   
  +  { TfpgFontResourceImpl }
  +
     TfpgFontResourceImpl = class(TfpgFontResourceBase)
     private
       FFontData: PXftFont;
  +    function    DoGetTextWidthClassic(const txt: string): integer;
  +    function    DoGetTextWidthWorkaround(const txt: string): integer;
     protected
       property    Handle: PXftFont read FFontData;
     public
  
positive.code:   gui_form,
    cursorfont,
    gfx_popupwindow,
    xatom,      // used for XA_WM_NAME
    gfx_utf8utils;
  
  var
    xapplication: TfpgApplication;
  
negative.code: end;
  
  function TfpgFontResourceImpl.GetTextWidth(const txt: string): integer;
  begin
    if length(txt) < 1 then
    begin
      Result := 0;
      Exit;
    end;
    // Xft uses smallint to return text extent information, so we have to
    // check if the text width is small enough to fit into smallint range
    if DoGetTextWidthClassic('W') * Length(txt) < High(smallint) then
      Result := DoGetTextWidthClassic(txt)
    else
      Result := DoGetTextWidthWorkaround(txt);
  end;
  
  { TfpgCanvasImpl }
  