Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing fonts #237

Closed
drdv opened this issue Apr 2, 2023 · 1 comment
Closed

missing fonts #237

drdv opened this issue Apr 2, 2023 · 1 comment
Assignees
Labels

Comments

@drdv
Copy link

drdv commented Apr 2, 2023

I have installed dvisvgm using sudo dnf install dvisvgm (version 3.0.4).

Let math.tex contains (it is based on the sphinx.ext.imgmath template preview.tex_t)

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{anyfontsize}
\usepackage{bm}
\pagestyle{empty}

\usepackage{bbm}
\usepackage{xcolor}
\usepackage{mathtools}

\AtBeginDvi{\special{color rgb 0.08984375 0.3125 0.91796875}}

\newcommand\cc[1]{\texttt{#1}}

\usepackage[active,tightpage,dvips]{preview}

\begin{document}
\begin{preview}
\fontsize{14}{17}\selectfont $\beta = \frac{\cc{leads}_h}{\cc{leads}}$
\end{preview}
\end{document}

When I use

tectonic --outfmt xdv math.tex
dvisvgm --no-fonts math.xdv

the stdout of dvisvgm is

pre-processing DVI file (format version 7)
WARNING: font file 'lmmono10-regular' not found
processing page 1
  computing extents based on data set by preview package (version 13.1)
  width=60.523759pt, height=12.68417pt, depth=4.827759pt
  graphic size: 60.523759pt x 17.511929pt (21.271668mm x 6.154739mm)
  running Metafont for cmmi7
  WARNING: failed to create cmmi7.gf
  WARNING: can't embed font 'lmmono10-regular'
  running Metafont for cmr12
  WARNING: failed to create cmr12.gf
  running Metafont for cmmi12
  WARNING: failed to create cmmi12.gf
  output written to math.svg
1 of 1 page converted in 0.0860379 seconds

and math.svg is "broken". If I then dnf install texlive-fontspec, all is as expected:

pre-processing DVI file (format version 7)
processing page 1
  computing extents based on data set by preview package (version 13.1)
  width=59.061234pt, height=11.81332pt, depth=4.886559pt
  graphic size: 59.061234pt x 16.699879pt (20.75765mm x 5.869336mm)
  output written to math.svg
1 of 1 page converted in 0.06586 seconds

I presume that tectonic has already downloaded the required fonts but dvisvgm is looking for texlive -installed fonts. Is it possible for dvisvgm to use tectonic fonts (maybe it is just a matter of providing the right path)?

@mgieseki
Copy link
Owner

mgieseki commented Apr 2, 2023

On Linux, dvisvgm uses the linked kpathsea library which belongs to the corresponding TeX Live system to lookup font files. If tectonic comes with its own TeX environment and settings and you use a dvisvgm binary that was built for TeX Live, you probably need to adapt some TeX environment variables in order to tell dvisvgm where the tectonic texmf directories are located.
I don't know the details of tectonic so I can't help here, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants