[tex4ht] Huge update of tex4ht-fonts-noncjk.tex

Michal Hoftich michal.h21 at gmail.com
Tue Jun 2 15:50:42 CEST 2015

Hi all,

because a lot of popular modern fonts aren't supported by tex4ht (I
read at least three issues by different persons just in last week),
for example Linux Libertine, DeJavu, Droid, etc.

Recently I learned that for fonts which follows standard font
encoding, it suffices when the .htf file only points to another .htf
file with full character table (such as lm-ec.htf for T1 font
encoding), and that such light .htf file can also provide information
which is then inserted to the css file.

I've created small Lua script which parse information from font tfm
names (like LibreCaslonText-Italic-osf-t1) and creates light .htf
files with css information (such as font.weight, font-style,
font-variant and font-name), resp. it creates file in format of

The usage of the script is following:

first make file with list of .tfm files:

    find path/to/texmf-dir/fonts/tfm -name *-t1.tfm > tfmlist.txt

with this command we find only files in suitable file name format.

then run

    texlua maket1fonts.lua < tfmlist.txt > output.tex

file output.tex can then be inserted at the suitable place in the

It should be easy to modify the script to support also other font
encodings, we only need to find suitable .htf file with font table for
these encodings.

The generated files needs some testing, in general font styles should
be recognized, and also text might be displayed in correct font, if it
is available for your browser. In every case, characters should be
converted correctly.

Lua file, sample TeX file and patch for tex4ht-fonts-noncjk.tex are attached.

Best regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: maket1fonts.lua
Type: text/x-lua
Size: 1744 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20150602/81cc09b8/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.tex
Type: application/x-tex
Size: 297 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20150602/81cc09b8/attachment-0001.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t1-fonts.patch
Type: text/x-patch
Size: 348085 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20150602/81cc09b8/attachment-0003.bin>

More information about the tex4ht mailing list