Comment 6 for bug 1283194

Revision history for this message
David Mathog (mathog) wrote :

It looks like the bounding box is being specified based on Impact Bold or some other font, and not on Impact Bold + Italic. Select the text and the selection box drops down just to the right of the base of the last E, which is consistent with that. The OP indicates that this is "faux", which I guess means that there is not really a Bold + Italic variant. When that happens the font rendering system has to fall back to some other font, in this case it may be something a bit narrower, which could be why the box is wrong. Other systems may be using other font drawing methods, so they may fall back to a different font, resolving in the sort of difference you see here between Firefox and Inkscape.

Changing the font to Arial, which has a real Bold+Italic gives an appropriate bounding box. That supports the idea it is
a (hidden) font substitution issue.

My memory is a bit murky but I do recall there were some adjustments made somewhere along the line having to do with text decorations and leading and trailing spaces and bounding boxes which might be somewhat involved. The issue was that if text decoration display is to work there must be a bounding box on spaces on the ends of lines - otherwise something like this:

__this_is_underlined_too__

would render like

   this_is_underlined_too

That might be involved here but I'm not quite sure how, since the test case by the OP had no trailing spaces. What it definitely does is provide a way to work around this problem - add a space after the final "E".

It may be that there was some bit of code in older versions of Inkscape that padded out the bounding box specifically to work around this sort of "faux" font issue which was lost at that revision.