[Dev-luatex] Font id from csname?

Taco Hoekwater taco at elvenkind.com
Sun Dec 13 13:33:06 CET 2009

Hans Hagen wrote:
> i remember that when a while ago taco and i discussed this that there 
> were some good reasons for not yet having access to all this specific 
> info i.e. i can imagine that tex.somefontcs returns the number but quite 
> some of those accessors have to wait till the whole global/local issue 
> of the code is resolved.
> also, we're not close to 0.50 so it's unlikely that new accessors will 

not -> now

> show up before that stable version is out

But actually, it is possible to get the id for a font:

   \directlua {local id = token.create("tenrm")[2]}

This does not (currently) work when you ask for the recent \font and
that font has never been selected yet as 'currently active' font
(token.create() will return zero in [2] in that case, for the 
\nullfont), but it works for all other fonts.

Best wishes,

More information about the dev-luatex mailing list