https://bugs.documentfoundation.org/show_bug.cgi?id=160702

            Bug ID: 160702
           Summary: Wrong and unstable positioning of text parts in SVG
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: filters and storage
          Assignee: [email protected]
          Reporter: [email protected]
            Blocks: 88278

Created attachment 193717
  --> https://bugs.documentfoundation.org/attachment.cgi?id=193717&action=edit
A sample with colon after a tspan

The attached SVG has this markup:

 <text x="2" y="1em" style="font-family:Liberation
Sans;font-size:0.77em;font-weight:bold"><tspan>Tititititititititit</tspan>:</text>

Note that the colon is outside of the tspan containing the most of the text,
not separated by anu spaces. It is expected that the colon is drawn as a
natural continuation of the text, as if there weren't a tspan element around
the preceding "Tititititititititit".

Opening it in different versions of LibreOffice gives different, but
consistently poor, result. In versions prior to 7.5 (e.g., in 7.0), the colon
is "merged" to the preceding "t" in most of zoom levels (e.g., 200%, 250%); but
sometimes, it is separated by a large space (in 180% and 280%); and sometimes,
it "jumps" somewhere between i and t (160%).

In fact, this is not the colon that jumps; zooming between 250, 280, and 310
percent zoom using the mouse wheel allows to see that it's the size of
"Tititititititititit" that changes inconsistently, becoming relatively larger
or smaller compared to the whole page size in different zoom levels.

Starting with version 7.5 (and in current master), the size of the
"Tititititititititit" and the position of the ":" is different, but still
wrong; the picture similar to older versions' 250-280-310% jumping is now
visible in 140-160-180% zoom. Two commits resulted in this change:
1fa731d03ba0f22cb9392a578124ea977eaab2e9 and
a42f5faac7c6d4590e632cf40e3ba9eb618e6f56. Note how this seems to answer the "I
don't know in which context such blank is needed" in bug 103888 - the blank
between different pieces was likely added as a hack to increase chances that
the pieces won't overlap (at the cost of adding unexpected gaps).

Note that the effect depends on display DPI; all the abovementioned zoom levels
were tested using 100% display scale on Windows; and when using 150% scaling,
the 140-160-180% looks different, but 90% zoom shows the jump. The essence of
the problem is generally inconsistent scaling of the text, which makes the
absolutely positioned pieces of text to look bad. That same issue may result in
a bad absolute positioning of the colon here, when its position is calculated
using some screen font size, with unclear correctness of the calculation.


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=88278
[Bug 88278] [META] SVG import image filter (all modules)
-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to