Closed zmanji closed 6 months ago
The reason for this is the following font definition present in the DVI file of the second example:
fntdef: [OpenSans-Regular.ttf]:mode=harf;shaper=ot;script=latn;language=dflt;+tlig; at 10pt
This is a LuaTeX-specific fntdef
format that dvisvgm doesn't support. LuaTeX needed to resolve the character encodings and write the glyph indices to the DVI file, as done for the first example. Otherwise, dvisvgm can't process the file correctly.
I have sent the following message:
I have run into a bug when using HarfBuzz and dvilualatex.
When the following document is compiled with dvilualatex
\documentclass{minimal}
\usepackage{fontspec}
\setmainfont[Renderer = OpenType]{OpenSans-Regular.ttf
}
\begin{document}
Hello
\end{document}
The produced DVI file cannot be handled by dvipdfmx. Running dvipdfmx produces
the following error:
dvipdfmx:fatal: Unable to find TFM file
"[OpenSans-Regular.ttf]:mode=harf;shaper=ot;script=latn;language=dflt;+tlig;".
Removing '[Render = OpenType]' and running dvipdfmx on the resulting
dvi file works fine.
to the dev-luatex@ntg.nl mailing list. Hopefully once this message is approved someone will respond to this issue.
Here is an example document
On a latest tex live 2022 with dvisvgm 3.0.1 Running the following:
Produces a correct looking svg.
However changing the document to use HarfBuzz:
Produces an svg that uses the wrong glyphs