You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hiya! I was excited to find that Cloudflare Images does support SVGs (neat!) but found some trouble with embedded fonts in my SVG's from Excalidraw exports. Excalidraw exports in both PNG and SVG, so, just for context, here's the PNG of a diagram I drafted:
PNG file of what my diagram looks like:
Nothing flashy, really. When I export as an SVG, it renders fine in macOS preview / quicklook, and I can see in the source that the fonts are embedded
SVG export of same diagram, click to see source:
But interesting stuff happens elsewhere. In fact, even the image shown right there ^ has the fonts and embedded images in this inline preview, but if you actually click that image and it opens in a new tab as a raw SVG, the fonts and embedded images have been stripped out.
That's essentially the same stripping I'm seeing after the SVG has been uploaded to CF Images. (Is GitHub using svg-hush..?)
The SVG I get back from CF Images now looks like this.
SVG downloaded from CF Images after uploading original:
Though, when it loads in the browser, I tend to get a bevy of error messages:
So... I'm not entirely sure what to make of all of this. I'd love to use SVGs for my diagrams and continue to have my CF Images workflow for them, but I don't want to sacrifice my fonts and images in said diagrams.
For reference and repeatability, clicking on the image labeled "SVG export of same diagram, click to see source" above should render the pure, original SVG content in the browser. It should then be savable and processable through CFI by any reading / wanting to try debugging.
Thanks!
The text was updated successfully, but these errors were encountered:
Hiya! I was excited to find that Cloudflare Images does support SVGs (neat!) but found some trouble with embedded fonts in my SVG's from Excalidraw exports. Excalidraw exports in both PNG and SVG, so, just for context, here's the PNG of a diagram I drafted:
PNG file of what my diagram looks like:
Nothing flashy, really. When I export as an SVG, it renders fine in macOS preview / quicklook, and I can see in the source that the fonts are embedded
SVG export of same diagram, click to see source:
But interesting stuff happens elsewhere. In fact, even the image shown right there ^ has the fonts and embedded images in this inline preview, but if you actually click that image and it opens in a new tab as a raw SVG, the fonts and embedded images have been stripped out.
That's essentially the same stripping I'm seeing after the SVG has been uploaded to CF Images. (Is GitHub using
svg-hush
..?)The SVG I get back from CF Images now looks like this.
SVG downloaded from CF Images after uploading original:
Though, when it loads in the browser, I tend to get a bevy of error messages:
So... I'm not entirely sure what to make of all of this. I'd love to use SVGs for my diagrams and continue to have my CF Images workflow for them, but I don't want to sacrifice my fonts and images in said diagrams.
For reference and repeatability, clicking on the image labeled "SVG export of same diagram, click to see source" above should render the pure, original SVG content in the browser. It should then be savable and processable through CFI by any reading / wanting to try debugging.
Thanks!
The text was updated successfully, but these errors were encountered: