[Dev-luatex] Allow skippig the font cache in font.getfont

Hans Hagen j.hagen at xs4all.nl
Thu Dec 12 14:17:05 CET 2019

On 12/12/2019 2:06 PM, Marcel Fabian Krüger wrote:
> 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.
For such a feature I prefer "font.getcopy(id)". I'll add it to my todo 


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl

More information about the dev-luatex mailing list