Bug in text width computation

Bug #167258 reported by Shap on 2006-01-28
2
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Unassigned

Bug Description

Scenario: a text item with text-anchor:middle contains
two tspans. The first tspan has no style attributes.
The second has a font size change. The text item as a
whole renders with a correctly computed middle anchor
point.

Now add a y parameter to the second tspan. The second
tspan now renders at the correct y position, but the
width computation on the containing tspan is now
computed incorrectly, with the effect that the
text-anchor center computation fails to consider this
tspan element.

The attached file renders correctly in Adobe's SVG
plugin, but incorrectly in inkscape. Removing the Y
parameter from any of the tspans to see how the text
anchor computation changes. It is most obvious in the
PX box at the upper right.

Shap (shap) wrote :
Shap (shap) wrote :

Sorry. I should have mentioned that this was happening in
Inkscape 0.43 on Linux, but I suspect it's a generic bug.

Shap (shap) wrote :

Hmm. Text handling is worse than I thought. The file icw.svg
renders to postscript with correct text widths if asked to
render a monospace font. Now change all appearances of
'monospace' to 'sans-serif'. Text width computations are now
badly off.

So I think we need to generalize this bug to state that text
width computations are not being performed properly.

Rwst (rwst) wrote :

I confirm that the file testme.svg renders different in
Batik vs. inkscape

vonHalenbach (lustik) on 2007-12-10
Changed in inkscape:
status: New → Confirmed
Mercury (mercury13) wrote :

Cannot test, but sometimes Inkscape writes text size as "100", sometimes as "100px".

jazzynico (jazzynico) wrote :

Reproduced on Windows XP, Inkscape 0.48.2 and revision 10923.

Related Bug #168023 "text-anchor incorrectly inherited in tspan".

Changed in inkscape:
assignee: Richard Hughes (cyreve) → nobody
tags: added: text
Beluga (buovjaga) wrote :

What I see in Inkscape vs. Firefox or LibreOffice is that there is a (1) on the right side of PX, outside of the box.

Win 7 64-bit
Inkscape 0.92pre1_64bit r15016

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments