anchor.diff:         (sync-sheet medium)
          (cairo_identity_matrix cr)
          (sync-text-style medium text-style t)
  -       (cffi:with-foreign-object (res 'cairo_text_extents)
  -	 (cairo_text_extents cr "m" res)
  -	 (slot res 'cairo_text_extents 'width))))))
  +       ;; This didn't work well for Climacs. --DFL
  +;;;       (cffi:with-foreign-object (res 'cairo_text_extents)
  +;;;         (cairo_text_extents cr "m" res)
  +;;;         (slot res 'cairo_text_extents 'width))
  +       (cffi:with-foreign-object (res 'cairo_font_extents)
  +	 (cairo_font_extents cr res)
  +	 (slot res 'cairo_font_extents 'max_x_advance))))))
   
   
   ;;; TEXT-STYLE-FIXED-WIDTH-P
  
positive.code: 			    (subseq string start (or end (length string)))
  			    res)
  	(cffi:with-foreign-slots
  	    ((width height x_advance y_advance) res cairo_text_extents)
  	  (values (ceiling width)
  		  (ceiling height)
  		  (ceiling x_advance)
  		  (ceiling y_advance)
  		  ;; baseline?
  		  (ceiling (text-style-ascent text-style medium))))))))
  
  (defmethod climi::text-bounding-rectangle*
      ((medium gtkairo-medium) string &key text-style (start 0) end)
    (text-size medium string :text-style text-style :start start :end end))
  
  ;;;; ------------------------------------------------------------------------
  ;;;;  General Designs
  
negative.code: 	       :start start
  	       :end (or end (length string)))))
  
  (defmethod climi::text-bounding-rectangle*
      ((medium gtkairo-medium) string &key text-style (start 0) end)
    (with-gtk ()
      (when (characterp string) (setf string (string string)))
      (setf text-style (or text-style (medium-text-style medium)))
      (setf text-style
  	  (merge-text-styles text-style (medium-default-text-style medium)))
      (climi::text-bounding-rectangle* (metrik-medium (port medium))
  				     string
  				     :text-style text-style
  				     :start start
  				     :end (or end (length string)))))
  
  ;; FIXME: TEXT-SIZE [and presumably TEXT-BOUNDING-RECTANGLE*, too] are
  ;; supposed to take newlines into account.  The CLX backend code was
  ;; written to support that but does not -- T-B-R errors out and T-S
  ;; doesn't return what WRITE-STRING on the sheet actually does.  So
  ;; let's not steal code from CLIM-CLX when it's broken.  Doesn't
  ;; actually look like anyone has been depending on this after all.
  ;; -- DFL
  
  (defmethod text-size
      ((medium metrik-medium) string &key text-style (start 0) end)
    (with-cairo-medium (medium)
  