Hello,
I would think you would have to create a "define_font"-callback to do the following:
1. Read the TFM file manually into a Lua table. 2. Re-map the glyphs according to the font's encoding (T1 ...) to Unicode. 3. Return the new table.
Actually, point 1 should read "TFM fileS", because in LaTeX a font is in fact two tfm's. For example, a text in Latin script uses T1 (letters) and TS1 (symbols).
Well, that depends on the text ;-) Generally speaking, since font encodings are a workaround for the 256 glyph limitation of tfm files, most likely you will indeed combine several tfm files with different encodings into a single font. Not just T1 and TS1, but also other encodings.
This is the way to go, it seems. But just for not reinventing the wheel, has someone worked on that?
Context has some tfm font loading code. I only use OpenType fonts. Maybe you can use code from the LuaTeX wiki as a start: http://luatex.bluwiki.com/
Javier
Jonathan