Links

Content Skeleton

This Page

Previous topic

PDF2SVG

Next topic

svgkit

dvisvgm : A DVI to SVG converter

Font embedding

The below FAQ entry from http://dvisvgm.sourceforge.net/FAQ implies embedding is supported.

I converted a simple math formula but get garbage when displaying the SVG. What’s wrong?

The generated SVG is valid but your SVG viewer/editor probably doesn’t support embedded fonts. Actually, only few SVG renderers, e.g. Batik evaluate embedded fonts properly. You can run dvisvgm with option –no-fonts to replace the fonts with path elements. Most viewers should render the resulting SVG file correctly. As a drawback, you get bigger files, and the information about the text (characters, baselines, ...) gets lost.

macports

simon:w blyth$ port info dvisvgm
dvisvgm @1.0.12 (graphics, textproc)
Variants:             universal

Description:          The command-line utility dvisvgm is a tool for TeX/LaTeX users. It converts DVI files to the XML-based scalable vector graphics format SVG.
Homepage:             http://dvisvgm.sourceforge.net/

Library Dependencies: freetype, zlib, potrace, texlive-bin, pkgconfig
Platforms:            darwin
License:              GPL-3+
Maintainers:          mww@macports.org, openmaintainer@macports.org


simon:future blyth$ port provides /opt/local/bin/pdflatex
/opt/local/bin/pdflatex is provided by: texlive-latex
simon:future blyth$
simon:~ blyth$ date ; sudo port install -v dvisvgm
Warning: port definitions are more than two weeks old, consider using selfupdate
--->  Computing dependencies for dvisvgm
--->  Dependencies to be installed: potrace
--->  Fetching archive for potrace
--->  Attempting to fetch potrace-1.10_0.darwin_9.ppc.tbz2 from http://packages.macports.org/potrace
--->  Attempting to fetch potrace-1.10_0.darwin_9.ppc.tbz2 from http://lil.fr.packages.macports.org/potrace
--->  Attempting to fetch potrace-1.10_0.darwin_9.ppc.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/potrace
--->  Fetching distfiles for potrace
--->  Attempting to fetch potrace-1.10.tar.gz from http://nchc.dl.sourceforge.net/potrace
--->  Verifying checksum(s) for potrace
--->  Extracting potrace
--->  Configuring potrace
--->  Building potrace
--->  Staging potrace into destroot
--->  Installing potrace @1.10_0
--->  Activating potrace @1.10_0
--->  Cleaning potrace
--->  Fetching archive for dvisvgm
--->  Attempting to fetch dvisvgm-1.0.12_0.darwin_9.ppc.tbz2 from http://packages.macports.org/dvisvgm
--->  Attempting to fetch dvisvgm-1.0.12_0.darwin_9.ppc.tbz2 from http://lil.fr.packages.macports.org/dvisvgm
--->  Attempting to fetch dvisvgm-1.0.12_0.darwin_9.ppc.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/dvisvgm
--->  Fetching distfiles for dvisvgm
--->  Attempting to fetch dvisvgm-1.0.12.tar.gz from http://nchc.dl.sourceforge.net/dvisvgm
--->  Verifying checksum(s) for dvisvgm
--->  Extracting dvisvgm
--->  Configuring dvisvgm
--->  Building dvisvgm
--->  Staging dvisvgm into destroot
--->  Installing dvisvgm @1.0.12_0
--->  Activating dvisvgm @1.0.12_0
--->  Cleaning dvisvgm
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.
simon:~ blyth$
simon:~ blyth$
simon:~ blyth$
simon:~ blyth$ date
Fri  5 Apr 2013 17:34:39 CST
simon:~ blyth$
simon:~ blyth$
simon:~ blyth$ which dvisvgm
/opt/local/bin/dvisvgm