[SVG Import] for text

• Oct 26, 2019 - 18:56

SVGs usually import fine into MS, but when the SVG contains text that is justified, it ends up showing nothing in the image frame. I wonder if this is a flaw in the SVG library, whatever it is, that MS utilizes? For instance, attached is an .SVG file containing output from TeX converted to SVG. Why would you want to do such a thing? Mainly for justified texts in a header of a Musescore's file: a sub-title area for instance.

The attached file loads fine into Inkscape or in any SVG viewer tested, but it shows nothing in MS. The whole point here is to not utilize a bitmap format (png) so that there can be retained a sharpness no matter what zoom-level is used. For what it's worth, if a non-justified text is utilized, it works just fine (for instance, if you have a paragraph in free Office software->export to pdf->then load this into Inkscape and export to SVG, MS will import this just fine as left-aligned text). Is this something that can be fixed at all on MS's side, or would it be some flaw/lack of implementation in a library utilized by MS?

Attachment Size
lorem.svg 155.63 KB

Comments

I can confirm this. Guess it is time to report this in the issue tracker. It might turn out to be a Qt bug though, IIRC we're using that for SVGs

For posterity, I figured out how to get something to work a while back, but forgot to post about it:

Inkscape:
1) Import via external cairo (got better results than internal after producing a 1-page text of TeX output as pdf):
1.png

2) Clean up (tex often times has page numbers or something):
2.png

3) Select all and perform Resize to page:
ctrl_shift_r_resizePageToSelection.png

4) Perform "union" via Path option.
4-PathUnion.png

5) Save
6) Import

The result will be imported into Musescore properly, but may be taxing depending on resulting filesize:

xx.png

Do you still have an unanswered question? Please log in first to post your question.