[tex4ht] Fontspec and tex4ht

Michal Hoftich michal.h21 at gmail.com
Tue May 14 17:34:17 CEST 2013


Hi all,

I am playing with fontspec and tex4ht. Because tex4ht binary doesn't
support opentype fonts (or fonts without tfm file), I tried to modify
fontspec package so it doesn't include opentype fonts when tex4ht is
running.

At first, I tried to collect changes to file fontspec.4ht, but I found
that these changes take place after \begin{document}, which is
problem, as font loading commands like \setmainfont are placed in the
preamble. Because of this, I created package fontspec-4ht.sty and
modified fontspec code to include this file when tex4ht is running.
But if there is some option to use commands from fontspec.4ht file in
the preamble, I would prefer it.

If anyone want to try the package, it is placed at github:
https://github.com/michal-h21/fontspec
There is also some example and more info:
http://michal-h21.github.io/fontspec/fontspec-4ht.html

At this moment, this is more proof of concept than ready to use
package, but I am curious what do you think about this approach.

Regards,
Michal


More information about the tex4ht mailing list