Download it now!
Bug 95276 - SVG-image text layout bug (pixels cut off from text)
Summary: SVG-image text layout bug (pixels cut off from text)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: SVG-Import Writer-Images
  Show dependency treegraph
Reported: 2015-10-23 10:47 UTC by devseppala
Modified: 2019-06-20 02:50 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

Some pixels in the text of the embedded SVG image is cut off on certain zoom levels (14.80 KB, application/vnd.oasis.opendocument.text)
2015-10-23 10:47 UTC, devseppala
Original svg image (3.51 KB, image/svg+xml)
2015-10-23 10:48 UTC, devseppala
Gif image showing the bug on different zoom levels. (21.14 KB, image/gif)
2015-10-23 10:50 UTC, devseppala
.odt document illustrating the bug on Linux (21.58 KB, application/vnd.oasis.opendocument.text)
2015-10-28 10:07 UTC, devseppala
Original svg image triggering the bug on linux (6.16 KB, image/svg+xml)
2015-10-28 10:09 UTC, devseppala

Note You need to log in before you can comment on or make changes to this bug.
Description devseppala 2015-10-23 10:47:40 UTC
Created attachment 119906 [details]
Some pixels in the text of the embedded SVG image is cut off on certain zoom levels

When inserting an SVG-image containing text to Writer, some pixels from the text is cut off from the display. Mainly few top pixel lines and pixels from the last character. 

This bug is dependent on the zoom-level. On some zoom levels less of the text is cut off than on others.

A certain combination of letters is also needed to trigger the bug. For example combination of letters "ks" seems to often trigger the bug.

This does not happen when viewing  the image on other programs as Firefox, IE and Inkscape.
Comment 1 devseppala 2015-10-23 10:48:50 UTC
Created attachment 119907 [details]
Original svg image

Original SVG image triggering the bug
Comment 2 devseppala 2015-10-23 10:50:08 UTC
Created attachment 119908 [details]
Gif image showing the bug on different zoom levels.
Comment 3 V Stuart Foote 2015-10-23 12:57:58 UTC

On Windows 10 Pro 64-bit en-US with
Version: (x64)
Build ID: fd8cfc22f7f58033351fcb8a83b92acbadb0749e
Locale: en-US (en_US)

and on a recent master

Version: (x64)
Build ID: 7323190456c2ed4ec9f092f8e69ba12ce41587cd
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-10-20_22:44:48
Locale: en-US (en_US)

Export to PDF is also affected by issue, same clipping of extents--in addition to differences in on screen rendering at the various zoom levels.
Comment 4 devseppala 2015-10-28 10:05:41 UTC
I just tested this bug on Linux (Ubuntu 14.04 LTS and LibreOffice and same bug is exists there also. It does not manifest it self exactly the same as on windows platform and is triggered by different combination of letters. I suspect it has something do with the fonts that are used. 

I will attach an .odt document and the original svg image that illustrates this bug on Linux.
Comment 5 devseppala 2015-10-28 10:07:13 UTC
Created attachment 120039 [details]
.odt document illustrating the bug on Linux
Comment 6 devseppala 2015-10-28 10:09:15 UTC
Created attachment 120040 [details]
Original svg image triggering the bug on linux
Comment 7 QA Administrators 2016-11-08 12:00:45 UTC Comment hidden (obsolete)
Comment 8 devseppala 2016-11-15 16:20:31 UTC
Confirming that the bug is still present on LO 5.2.3

SVG-import was introduced in LO 3.4, so the bug is not inherited from OOo.
Comment 9 devseppala 2017-01-03 15:46:25 UTC
After exploring the problem a little bit, I discovered that the bug can be circumvented to some extent by removing clipPath-elements from the SVG-file. 

<clipPath clipPathUnits="userSpaceOnUse" id="clipPath1">
    <path d="M0 0 L150 0 L150 195 L0 195 L0 0 Z"/>

Apparently each line of text in an svg file is accomplished by its own clipPath-element, which restricts the region to which paint can be applied. It seems that LO-does not scale the clipPath-element (or internal LO-object it is mapped to) correctly. Other alternative is that the text layout is not scaled correctly.

For many simple SVG-images, like UML diagrams, the clipPath-element is not really needed to paint the image correctly. If you are affected by this bug and really need to use SVG-images in your .odt-document, you can try removing these clipPath-elements in a text editor. For my purposes this proved to be an effective work around.

TIP: This regular expression can be used to remove these elements from the SVG source:
replace all matches with empty strings.
Comment 10 QA Administrators 2018-01-04 03:36:00 UTC Comment hidden (obsolete)
Comment 11 Roman Kuznetsov 2018-06-19 14:33:50 UTC
still repro in LibreOffice 6.1 beta 2
Comment 12 QA Administrators 2019-06-20 02:50:44 UTC
Dear devseppala,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat:

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team