Hello,
could font.getfont get an option to always return a new font table
instead of returning the current one? While for many fonts a cached
table makes sense, sometimes it would be useful to also have access to
the ooriginal table, e.g. to see which characters are `used`, inspect
the result of `font.addcharacters` or inspect other changes which might
be applied to the underlying font from TeX.
I attached a patch implementing this by adding a `nocache` parameter to
`font.getfont`, such that `font.getfont(true, font_id)` always generates
a new table. IMO `font.getfont(font_id, true)` would look nicer, but
that wouldn't be compatible to older LuaTeX versions which always expect
the font is as last parameter.
Best regards,
Marcel