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
First, I should say that dvisvgm is a wonderful tool, and even its source code appears to be very high-quality and understandable. Thank you!
This request is possibly the same as #55 but asking separately just in case my use-case is different (using WOFF fonts) or things are different now: I have a multi-page DVI document on which I use dvisvgm to extract each page as a separate SVG file (for displaying on a HTML webpage), with the following command:
and these fonts are then used in the remainder of the SVG file, like
text.f14 {font-family:cmr10;font-size:9.96264px}
which is a CSS declaration. When all these SVGs are included on a single web-page, the result is that the browser has to download a lot of data, and also process each font separately (so it takes a while to load each SVG).
Would it be possible to add an option to share the (full) fonts across all pages, so that they would only have to be downloaded and processed once? I'm thinking of a single common.svg or whatever file containing all the fonts and CSS declarations, after which each later SVG would only need to contain the text elements that reference these CSS declarations.
The text was updated successfully, but these errors were encountered:
Thank you for your feedback and the detailed feature request. Actually, separating the font data from the page SVGs is on my to-do list for a long time. Since the implementation requires a fair amount of work including a redesign of the current font handling, I've put it aside so far. If I find enough free time, I'll take it up again. But when I look at my planner, I'm afraid that won't be the case in the next few months.
A variant of this request; I have a LuaLaTeX file that loads in a ttf font, which I want to generate an SVG from. My website will already be serving the ttf font, so there's no need to embed it in the SVG.
For now I can hack around this by manually stripping and renaming the embedded font (inconsolata) with:
sed -i -E 's/@font-face\{.*?\}//g;s/font-family:nf0/font-family:inconsolata/g' ${1%.tex}.svg
First, I should say that dvisvgm is a wonderful tool, and even its source code appears to be very high-quality and understandable. Thank you!
This request is possibly the same as #55 but asking separately just in case my use-case is different (using WOFF fonts) or things are different now: I have a multi-page DVI document on which I use dvisvgm to extract each page as a separate SVG file (for displaying on a HTML webpage), with the following command:
where
$dvi
is the name of the DVI (or XDV) file. In each of the resulting SVG files, I see a bunch of fonts defined like:and these fonts are then used in the remainder of the SVG file, like
which is a CSS declaration. When all these SVGs are included on a single web-page, the result is that the browser has to download a lot of data, and also process each font separately (so it takes a while to load each SVG).
Example: see https://shreevatsa.github.io/tex/program/tangle/tangle-15 or (warning: very slow and downloads a lot of data) https://shreevatsa.github.io/tex/program/
Would it be possible to add an option to share the (full) fonts across all pages, so that they would only have to be downloaded and processed once? I'm thinking of a single
common.svg
or whatever file containing all the fonts and CSS declarations, after which each later SVG would only need to contain the text elements that reference these CSS declarations.The text was updated successfully, but these errors were encountered: