jgraph / drawio

draw.io is a JavaScript, client-side editor for general diagramming.
https://www.drawio.com
Other
41.05k stars 7.62k forks source link

Setting to always embed fonts when saving to svg, (*.drawio.svg) #2886

Open mawid6 opened 2 years ago

mawid6 commented 2 years ago

Is your feature request related to a problem? Please describe. I like to save and work with diagrams in png or svg format with the diagram embedded, e g foobar.drawio.svg. When using open fonts like Fira Sans, Roboto, etc, the fonts are not embedded in the created svg. Contrast with svg export which has the option to embed fonts (implemented "in" #1702).

Describe the solution you'd like Ability to set that fonts are always embedded when saving to svg format. A flag/checkbox, in the save dialogue, that perhaps persists with the diagram to make it flexible... Could be an application setting also, but that would be less flexible.

Describe alternatives you've considered Workaround right now is to stop using custom/ open fonts (when using svg embedded files as storage) or not use svg, but go for .drawio.png files instead.

Additional context Also related: #404 (which in turn is maybe actually a dupe of #1702).

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

mawid6 commented 1 year ago

Hi! It seems to me this is potentially an easy fix: This is already works for export to svg.

If you do export to svg, the fonts are embedded.

Why not reuse that code / functionality in the save as svg? Just a note that this could be an easy fix.

This is a showstopper for using anything but helvetica and times new roman, etc.

-> ...when saving embedded, i e as .drawio.svg.

So drawio svg:s in any git repo will not display correctly if they use any but the most common cross platform fonts.

davidjgraph commented 7 months ago

Please check 24.0.6 to see if that completes this issue.