9

Can somebody explain me why tex4ht searches tfm files? What does it do with that tfm file?

At first I thought that it needs a tfm name, that it could find the .enc file from psfonts.map. From .enc it could get all the glyph list. But if I create a foo.tfm (empty file) it sees its wrong tfm header. Can it read bounding boxes of tfm glyphs? For what?

I'm trying to solve a common problem: luatex + otf + tex4ht = html

6

At its heart tex4ht is a dvi driver. So it uses TeX, tfm's and all and then converts the dvi to html rather than postscript or pdf.

Depending on the configuration mathematics and other "hard" items can be fully typeset and turned into images, but even if producing html text the TeX phase can need the correct tfm so that measurement is correct.

  • David, I know what is tex4ht. I'm more interested in .tfm. I understand that it's needed by TeX. But does it mean that I can replace it (not existing TFM) with any standard tfm and just write a proper .htf? – Linuxss May 22 '13 at 19:15
  • @user31102 No the TeX phase needs TeX metrics so it can make the dvi file. The htf files help the dvi driver handle specific font characters in html. If you are never making an image for maths you might be able to get away with substituting tfms for similar fonts but never tried. – David Carlisle May 22 '13 at 19:27
  • With luatex I don't need tfm's, that and I need to replace otf font in DVI with "something". That something is any loaded font. And otf chars I can properly enter with \special commands (like html entities). But I still don't know about consequences. – Linuxss May 22 '13 at 19:40
  • @user31102 when tex4ht calls tex internally it will need 8bit tfms to make the dvi file, unless there has been a lot of unicode support added since I last looked (which was a long time ago) – David Carlisle May 22 '13 at 19:46
  • Thanks David, a bit clearer. I think it needs tfm, when it creates .idv file. – Linuxss May 22 '13 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.