On 2007-04-25, Ben Hutchings <[EMAIL PROTECTED]> wrote:
> I identified the font for most characters
> as being fixed 6x13, but the vertical bar appears to be 14 pixels tall;
> perhaps it comes from another font in a fontset?  I have spent some time
> investigating this (explanations attached to the report) but have not
> been able to work out where the mismatch is.  In particular I have not
> been able to construct a fontset that includes fixed 6x13.

This would indeed seem like an error in the font metrics: it is 
using the metrics for 6x13, but for some reason, some character is
taller and that. The statusbar code draws the text with the 'needfill'
attribute set for the drawing engine, which causes the X(mb)DrawImageString
routine to be used instead of X(mb)DrawString. This should fill the 
text background with the background colour, and cause any previous 
text to be erased. It seems this isn't happening, because some of 
the characters are bigger than the rectangle where the text should 
be contained. 

So, all Ion does, is draw text over itself at the same position as
before, with a function that should clear the background. This isn't 
happenning. Hence, not my problem.

---

XExtentsOfFontSet (and XmbTextExtents) returns two rectangles: logical 
extent and ink extent. Intuitively logical extent should be bigger 
than ink extent. But maybe this is not so, in case of this font at
least: it does not seem to be mentioned in the man pages. Ion uses
the logical extents for its own calculations (that should not matter
here!), and so does X use for the filled background rectangle of the
text. If the ink extent is actually bigger than the logical extent, 
this obviously won't work. You could try checking if there's such
a problem.

-- 
Tuomo

Reply via email to