You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/07/15 10:42:32 UTC

[GitHub] [echarts] mindon opened a new issue #15064: Rich text style SVG compatibility problem in Powerpoint

mindon opened a new issue #15064:
URL: https://github.com/apache/echarts/issues/15064


   ### Version
   v5.1.1
   
   ### Reproduction link
   [https://k06zm.csb.app/](https://k06zm.csb.app/)
   
   ### Steps to reproduce
   1.  use rich option for xAxis
    ```  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
           }
         }
       }
     },
   ```
   
   2. save as SVG file
   
   3. 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.
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart commented on issue #15064: Rich text style SVG compatibility problem in Powerpoint

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #15064:
URL: https://github.com/apache/echarts/issues/15064#issuecomment-880598935


   >  Perhaps for the SVG renderer, we can keep each part instead of composing it to a single font string?
   
   @pissang  Yeah, it would be easier if we can keep every part.
   
   
   And I notice a potential bug(?) that is not related to this issue. But it looks like a typo. Please see https://github.com/ecomfe/zrender/blob/master/src/graphic/Text.ts#L748-L752
   
   `getStroke` or `getFill`?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang edited a comment on issue #15064: Rich text style SVG compatibility problem in Powerpoint

Posted by GitBox <gi...@apache.org>.
pissang edited a comment on issue #15064:
URL: https://github.com/apache/echarts/issues/15064#issuecomment-880595496


   @plainheart font is composed in https://github.com/ecomfe/zrender/blob/master/src/graphic/Text.ts#L881 . Perhaps for the SVG renderer, we can keep each part instead of composing it to a single font string? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang closed issue #15064: Rich text style SVG compatibility problem in Powerpoint

Posted by GitBox <gi...@apache.org>.
pissang closed issue #15064:
URL: https://github.com/apache/echarts/issues/15064


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart commented on issue #15064: Rich text style SVG compatibility problem in Powerpoint

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #15064:
URL: https://github.com/apache/echarts/issues/15064#issuecomment-880592560


   @pissang The font issue still needs to discuss how to solve it simply and elegantly. Since we're using the format like `font: 12px Arial bold`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang commented on issue #15064: Rich text style SVG compatibility problem in Powerpoint

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #15064:
URL: https://github.com/apache/echarts/issues/15064#issuecomment-880626882


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] sz-p edited a comment on issue #15064: Rich text style SVG compatibility problem in Powerpoint

Posted by GitBox <gi...@apache.org>.
sz-p edited a comment on issue #15064:
URL: https://github.com/apache/echarts/issues/15064#issuecomment-1062521986


   font-size and font-family are still in the style, not attributes
   
   
   ![image](https://user-images.githubusercontent.com/14040327/157367846-35a1fd30-aa04-4e5d-bc4b-acdbda034792.png)
   
   @pissang 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] sz-p commented on issue #15064: Rich text style SVG compatibility problem in Powerpoint

Posted by GitBox <gi...@apache.org>.
sz-p commented on issue #15064:
URL: https://github.com/apache/echarts/issues/15064#issuecomment-1062521986


   Fonts and attributes are still in the style, not attributes
   
   
   ![image](https://user-images.githubusercontent.com/14040327/157367846-35a1fd30-aa04-4e5d-bc4b-acdbda034792.png)
   
   @pissang 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] echarts-bot[bot] commented on issue #15064: Rich text style SVG compatibility problem in Powerpoint

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #15064:
URL: https://github.com/apache/echarts/issues/15064#issuecomment-851967686


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that it contains **a minimum reproducible demo** and necessary **images** to illustrate. Otherwise, our committers will ask you to do so.
   
   *A minimum reproducible demo* should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.
   
   You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang closed issue #15064: Rich text style SVG compatibility problem in Powerpoint

Posted by GitBox <gi...@apache.org>.
pissang closed issue #15064:
URL: https://github.com/apache/echarts/issues/15064


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart edited a comment on issue #15064: Rich text style SVG compatibility problem in Powerpoint

Posted by GitBox <gi...@apache.org>.
plainheart edited a comment on issue #15064:
URL: https://github.com/apache/echarts/issues/15064#issuecomment-880592560


   @pissang The font issue still needs to discuss how to solve it simply and elegantly. Since we're using the format like `font: 12px Arial bold`. It seems to be not easy to extract single concrete property.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang commented on issue #15064: Rich text style SVG compatibility problem in Powerpoint

Posted by GitBox <gi...@apache.org>.
pissang commented on issue #15064:
URL: https://github.com/apache/echarts/issues/15064#issuecomment-880595496


   @plainheart font is composed in https://github.com/ecomfe/zrender/blob/master/src/graphic/Text.ts#L881 . Perhaps for the SVG renderer, we can keep each part instead of composing it to a single font string?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org