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: end;
  
  function TfpgFontResourceImpl.GetTextWidth(const txt: string): integer;
  var
    extents: TXGlyphInfo;
  begin
    if length(txt) < 1 then
    begin
      Result := 0;
      Exit;
    end;
    XftTextExtentsUTF8(xapplication.display, FFontData, PChar(txt), Length(txt), extents);
    Result := extents.xOff;
  end;
  
  { TfpgCanvasImpl }
  
negative.code:   gui_form,
    cursorfont,
    gfx_popupwindow,
    xatom,          // used for XA_WM_NAME
    gfx_utf8utils;  // used for GetTextWidth
  
  var
    xapplication: TfpgApplication;
  