![](https://secure.gravatar.com/avatar/435ac0d0ecd67394ae88a2020214d815.jpg?s=120&d=mm&r=g)
Hi, Hans: in font-afm.lua, you use fontforge to open and to_table a pfb, but without closing it? btw, when MKIV is running for the first time (i.e., no cache file). it will use a lot of memory (parsing a 10M font will use 700-800 MB memory), are there some ways to reduce that? Another problem is, the memory usage seems incremental: I watch the memory usage in "top" carefully, it does not reduce when MKIV finish reading and caching an otf font. (well I read the font-otf.lua, and you are actually closing that font. so maybe that's because luatex is leaking memory?) btw, I load arial 300 times using the following file, %engine=luatex \directlua0{ function load_font (filename) local metrics = nil local font = fontforge.open(filename) if font then metrics = fontforge.to_table(font) fontforge.close(font) end return metrics end myfont = load_font('arial.ttf') % 300 myfont = load_font('arial.ttf') myfont = load_font('arial.ttf') myfont = load_font('arial.ttf') myfont = load_font('arial.ttf') myfont = load_font('arial.ttf') } and I can see the memory usage may ebb and flow, but actually it is leaking memory. Yue Wang