question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rich text style SVG compatibility problem in Powerpoint

See original GitHub issue

Version

v5.1.1

Reproduction link

https://k06zm.csb.app/

Steps to reproduce

  1. use rich option for xAxis
   name: '{i|Hello} {sub|world}',
   nameLocation: "middle",
   nameTextStyle: {
     fontFamily: 'Times New Roman',
     fontSize: 19,
     padding: [6, 0],
     rich: {
       sub: {
         fontFamily: 'Times New Roman',
         fontStyle: 'italic',
         verticalAlign: "bottom",
         fontSize: 13
       },
       i: {
         fontFamily: 'Times New Roman',
         fontStyle: 'italic',
         fontSize: 19
       }
     }
   }
 },
  1. save as SVG file

  2. import into a Powerpoint (text rich style lost)

What is expected?

rich text styled as they’re defined

What is actually happening?

rich text styles lost in PPT


the SVG code <text style="font: italic 19px &quot;Times New Roman&quot;">Hello</text> not working in PPT, it works in Inkscape.

if being changed into <text font-style="italic" font-size="19" font-family="Times New Roman">Hello</text>, it works in both.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pissangcommented, Jul 15, 2021

@plainheart I believe it’s a typo and should be getFill

0reactions
sz-pcommented, Mar 9, 2022

font-size and font-family are still in the style, not attributes

image

@pissang

Read more comments on GitHub >

github_iconTop Results From Across the Web

PowerPoint issues with imported SVG image with custom fonts
I have an PowerPoint issues with imported SVG image with custom fonts. I'm using Microsoft Office 365 Business.
Read more >
Why text in exported SVG images may not display correctly
When you look at a diagram exported to an SVG image in IE or some SVG editors, the text may not display correctly....
Read more >
SVG exported images contain 'Viewer does not support full ...
I am not sure if this is the same issue or not. SVGs used to display a no support message in the place...
Read more >
Formatted Labels and Text not exported in SVG - Community
SVG labels text formatting Powerpoint ... Powerpoint doesn't support PDF. ... the problem, but wonder if there could be an issue with a...
Read more >
How would you insert a .svg file in PowerPoint? - Quora
PowerPoint does not support svg images, so you'll need to convert the image to a supported format. This is quite easy to do,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found