Closed nschloe closed 2 years ago
dvisvgm already does this when converting DVI files and if option --no-fonts
is given. It's currently not possible with PS/PDF input files because Ghostscript does the font processing of these files and dvisvgm only receives the resulting paths with no information of their origin.
The processing of PS/PDF files is more or less a by-product of dvisvgm's PS/PDF \special
handlers. The main functionality is still the conversion of DVI files which provides the most flexibility.
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.13.4 -->
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='54.79pt' height='4.29pt' viewBox='-72 -72 54.79 4.29'>
<defs>
<path id='g0-97' d='M3.32-.76C3.36-.36 3.63 .06 4.09 .06C4.3 .06 4.91-.08 4.91-.89V-1.44H4.66V-.89C4.66-.31 4.41-.25 4.3-.25C3.98-.25 3.94-.7 3.94-.75V-2.74C3.94-3.16 3.94-3.55 3.58-3.92C3.19-4.3 2.69-4.46 2.21-4.46C1.39-4.46 .71-4 .71-3.34C.71-3.04 .91-2.87 1.17-2.87C1.44-2.87 1.62-3.07 1.62-3.33C1.62-3.45 1.57-3.78 1.12-3.79C1.38-4.13 1.87-4.24 2.19-4.24C2.68-4.24 3.25-3.86 3.25-2.97V-2.6C2.74-2.57 2.04-2.54 1.41-2.24C.67-1.9 .42-1.38 .42-.95C.42-.14 1.38 .11 2.01 .11C2.67 .11 3.13-.29 3.32-.76ZM3.25-2.39V-1.39C3.25-.45 2.53-.11 2.08-.11C1.59-.11 1.19-.46 1.19-.96C1.19-1.5 1.6-2.33 3.25-2.39Z'/>
</defs>
<g id='page1'>
<use x='-72' y='-67.71' xlink:href='#g0-97'/>
<use x='-63.7' y='-67.71' xlink:href='#g0-97'/>
<use x='-55.4' y='-67.71' xlink:href='#g0-97'/>
<use x='-47.09' y='-67.71' xlink:href='#g0-97'/>
<use x='-38.79' y='-67.71' xlink:href='#g0-97'/>
<use x='-30.49' y='-67.71' xlink:href='#g0-97'/>
<use x='-22.19' y='-67.71' xlink:href='#g0-97'/>
</g>
</svg>
That's great! Does this apply to "extended DVI" (XDV) as well?
Yes, it works with all DVI variants supported by dvisvgm.
When converting from XDV, I'm getting
WARNING: font file 'lmroman10-regular' not found
again, but I guess this is the same issue as https://github.com/mgieseki/dvisvgm/issues/187#issuecomment-1165742252.
Yes, that's the same issue. The latest changes in the Git repo fix it.
Alright, lets close this then.
From this LaTeX,
I'm getting the SVG
For reducing the file size, would it be possible to
<defs>
,<use>
to define letters, anduse
them with a given offset? Something likeMinifiers could perhaps also do the job, but I guess it's easier on a PDF level to identify individual characters. (Perhaps I'm wrong.)