Bug 106201 - Centered text in inserted SVG is not centered
Summary: Centered text in inserted SVG is not centered
Status: RESOLVED DUPLICATE of bug 103888
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:svg
Depends on:
Blocks: SVG-Import
  Show dependency treegraph
 
Reported: 2017-02-26 18:10 UTC by menturi
Modified: 2023-08-02 12:11 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Document with SVG inserted (16.42 KB, application/vnd.oasis.opendocument.text)
2017-02-26 18:12 UTC, menturi
Details
SVG document with text with center alignment (6.31 KB, image/svg+xml)
2017-02-26 18:12 UTC, menturi
Details
Screenshot of textcenter.svg inserted in a text document (36.79 KB, image/png)
2017-02-26 18:13 UTC, menturi
Details
Screenshot of SVG document as viewed in Inkscape (77.79 KB, image/png)
2017-02-26 18:14 UTC, menturi
Details
Text_Flow_Into_Shape (2.72 KB, image/svg+xml)
2021-03-12 09:16 UTC, Nithin
Details
Text_Centered_svg (6.72 KB, image/svg+xml)
2021-03-12 09:17 UTC, Nithin
Details
Screenshot of textcenter.svg inserted in a text document (25.56 KB, image/png)
2021-03-12 09:18 UTC, Nithin
Details
Screenshot of SVG document as viewed in Inkscape (20.27 KB, image/png)
2021-03-12 09:18 UTC, Nithin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description menturi 2017-02-26 18:10:58 UTC
Description:
When inserting an SVG with text that is center alignment, the result is text that does not appear to be properly center aligned.

This was tested using the attached files in LibreOffice 5.2.5.1 (x64) on a Windows 7 machine.

Steps to Reproduce:
1. Download textcenter.svg
2. Insert textcenter.svg into an ODT document using LO Writer
3. The text justification is not properly centered but should be

Actual Results:  
The text justification is not properly centered.

Expected Results:
The text should be properly centered.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Comment 1 menturi 2017-02-26 18:12:15 UTC
Created attachment 131483 [details]
Document with SVG inserted
Comment 2 menturi 2017-02-26 18:12:46 UTC
Created attachment 131484 [details]
SVG document with text with center alignment
Comment 3 menturi 2017-02-26 18:13:52 UTC
Created attachment 131485 [details]
Screenshot of textcenter.svg inserted in a text document

The center aligned text in the SVG file is not actually center aligned after inserted in a text document.
Comment 4 menturi 2017-02-26 18:14:57 UTC
Created attachment 131486 [details]
Screenshot of SVG document as viewed in Inkscape

It can be seen in this screenshot that the text is center aligned when viewed in Inkscape.
Comment 5 Xisco Faulí 2017-02-26 20:36:06 UTC
Confirmed in

- Version: 5.4.0.0.alpha0+
Build ID: 880033edde516fc30225005245253293a6a58ba4
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

- Version: 5.0.0.0.alpha1+
Build ID: 0db96caf0fcce09b87621c11b584a6d81cc7df86
Locale: ca-ES (ca_ES.UTF-8)

- Version: 4.1.0.0.alpha0+
Build ID: 2f205ee79ea929c6fce5686512bd468ab78a877
Comment 6 QA Administrators 2018-02-27 03:33:56 UTC Comment hidden (obsolete)
Comment 7 Roman Kuznetsov 2018-12-16 19:56:10 UTC
still repro in

Version: 6.3.0.0.alpha0+ (x64)
Build ID: a04e615e1f9371401946c7c89d7ec439ce92cfec
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-12-05_06:42:22
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded
Comment 8 QA Administrators 2020-12-16 03:57:10 UTC Comment hidden (obsolete)
Comment 9 Nithin 2021-03-12 09:16:41 UTC
Created attachment 170423 [details]
Text_Flow_Into_Shape
Comment 10 Nithin 2021-03-12 09:17:38 UTC
Created attachment 170424 [details]
Text_Centered_svg
Comment 11 Nithin 2021-03-12 09:18:04 UTC
Created attachment 170425 [details]
Screenshot of textcenter.svg inserted in a text document
Comment 12 Nithin 2021-03-12 09:18:38 UTC
Created attachment 170426 [details]
Screenshot of SVG document as viewed in Inkscape
Comment 13 Nithin 2021-03-12 09:21:19 UTC
I confirm this bug exists in

Version: 7.1.1.2 / LibreOffice Community
Build ID: fe0b08f4af1bacafe4c7ecc87ce55bb426164676
CPU threads: 16; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Flatpak
Calc: threaded

I am adding Additional information regarding the bug. The non-centering happens for all lines with an Enter (New line) at the end. 

Also if the Text has "Flow into Shape" then the position is just somewhere else.
Comment 14 QA Administrators 2023-03-13 03:19:45 UTC Comment hidden (obsolete)
Comment 15 Xisco Faulí 2023-08-02 12:03:48 UTC
Firefox and Chrome display attachment 170423 [details] the same way as LibreOffice. Inskape centers the text. Hard to know whether the current behaviour is good or not
Comment 16 Xisco Faulí 2023-08-02 12:11:31 UTC
Regarding the original report, the text is centered since a42f5faac7c6d4590e632cf40e3ba9eb618e6f56
Closing as duplicate of bug 103888

*** This bug has been marked as a duplicate of bug 103888 ***