https://bugs.documentfoundation.org/show_bug.cgi?id=148180
Bug ID: 148180
Summary: Overline text decoration misses in exported SVG
Product: LibreOffice
Version: 7.2.5.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Draw
Assignee: [email protected]
Reporter: [email protected]
Description:
Although LibreOffice correctly exports two of the three text decorations
(underline and strike-through), overlines are missing. There are two places
(that I know of) where text decoration attributes may occur, dependent on
whether a whole paragraph line is decorated, or just part of a paragraph line.
Steps to Reproduce:
On a blank LibreOffice Draw page, insert a text box. In the text box, enter the
following sentences:
First full line, underlined
Second full line, struck through
Third full line, overlined
First partial line, underlined
Second partial line, struck through
Third partial line, overlined
Fully underline, strike through, and overline the first through third
sentences, respectively.
In the second set, underline, strike through, and overline the respective
"partial line" phrases. Manually export to SVG (File > Export… with Save as
type: SVG) to get an SVG 1.2 file. Open the file in (for example) Inkscape to
quickly see that underlining and strike-through are correct, but overlining is
missing.
Actual Results:
Overlines are missing
Expected Results:
Open the SVG file in a text editor, and verify that you exported <svg
version="1.2"...>. Skip the embedded definitions and any Master_Slide, or
search for the element <g class="Page">. That element contains the following
section, where details of x, y placement and font may be different:
<g class="TextShape">
<g id="id3">
<rect class="BoundingBox" stroke="none" fill="none" x="2500"
y="3200" width="10101" height="5901"/>
<text class="SVGTextShape">
<tspan class="TextParagraph" font-family="Noto Sans,
sans-serif" font-size="494px" font-weight="400" text-decoration="underline">
<tspan class="TextPosition" x="2750" y="3854">
<tspan fill="rgb(0,0,0)"
stroke="none">First full line, underlined</tspan>
</tspan>
</tspan>
<tspan class="TextParagraph" font-family="Noto Sans,
sans-serif" font-size="494px" font-weight="400" text-decoration="line-through">
<tspan class="TextPosition" x="2750" y="4527">
<tspan fill="rgb(0,0,0)"
stroke="none">Second full line, struck through</tspan>
</tspan>
</tspan>
<tspan class="TextParagraph" font-family="Noto Sans,
sans-serif" font-size="494px" font-weight="400">
<tspan class="TextPosition" x="2750" y="5200">
<tspan fill="rgb(0,0,0)"
stroke="none">Third full line, overlined</tspan>
</tspan>
</tspan>
<tspan class="TextParagraph" font-family="Noto Sans,
sans-serif" font-size="494px" font-weight="400">
<tspan class="TextPosition" x="2750" y="6546">
<tspan fill="rgb(0,0,0)"
stroke="none">First </tspan>
<tspan text-decoration="underline"
fill="rgb(0,0,0)" stroke="none">partial line</tspan>
<tspan fill="rgb(0,0,0)"
stroke="none">, underlined</tspan>
</tspan>
</tspan>
<tspan class="TextParagraph" font-family="Noto Sans,
sans-serif" font-size="494px" font-weight="400">
<tspan class="TextPosition" x="2750" y="7219">
<tspan fill="rgb(0,0,0)"
stroke="none">Second </tspan>
<tspan text-decoration="line-through"
fill="rgb(0,0,0)" stroke="none">partial line</tspan>
<tspan fill="rgb(0,0,0)"
stroke="none">, struck through</tspan>
</tspan>
</tspan>
<tspan class="TextParagraph" font-family="Noto Sans,
sans-serif" font-size="494px" font-weight="400">
<tspan class="TextPosition" x="2750" y="7892">
<tspan fill="rgb(0,0,0)"
stroke="none">Third </tspan>
<tspan fill="rgb(0,0,0)"
stroke="none">partial line</tspan>
<tspan fill="rgb(0,0,0)"
stroke="none">, overlined</tspan>
</tspan>
</tspan>
</text>
</g>
</g>
The third TextParagraph tspan should read:
<tspan class="TextParagraph" font-family="Noto Sans, sans-serif"
font-size="494px" font-weight="400" text-decoration="overline">
The middle tspan in the TextPosition element in the sixth TextParagraph should
read:
<tspan text-decoration="overline" fill="rgb(0,0,0)"
stroke="none">partial line</tspan>
Why it matters: In circuit diagrams of digital systems, inverted signals are
sometimes denoted by overlines. A missing overline makes a circuit or system
diagram faulty and meaningless.
Reproducible: Always
User Profile Reset: No
OpenGL enabled: Yes
Additional Info:
It seems that both the SVG standard and LibreOffice Draw internally handle
overlines similar to underlining and strike-through. Both systems call them
"text decorations". So it is remarkable that the overlines are missing from
exported SVGs.
Draw has quite a few options: single line, double line, bold, etc. But SVG has
only one option, so it would be correct to channel any option of overlining
into the same SVG result (same as is done for underlines and strikethrough).
--
You are receiving this mail because:
You are the assignee for the bug.