Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

luaotfload uses an internal database that gets updated with mkluatexfontdb. So it knows about a lot of fonts installed on my computer. How can I query this database? Something like

luatexfontdb --list-fonts-on-my-computer-that-are-in-your-database


share|improve this question
No, there aren't, it is on the, not written, todo list, but don't hold your breath. –  Khaled Hosny Mar 31 '11 at 16:25
add comment

2 Answers

up vote 19 down vote accepted

You could open the database in your editor. It is called otfl-names.lua and should be in one of your texmf-trees in \luatex-cache\generic\names.

It is also not very difficult to make lists based on otfl-names.lua. E.g.


for i,v in ipairs(myfonts.mappings) do
 tex.print(-2, v.familyname)
 tex.print(', ')
 tex.print(-2, v.fontname)



Edit in may 2013: With a newer luaotfload (as the one in TL2013 (pretest) one should exchange the myfonts line by this one as the name of the database as changed:

share|improve this answer
I think this is the best way to generate a font list at the moment, as there seems to be no tool like fc-list doing this job yet - see this newsgroup entry. –  diabonas Mar 24 '11 at 16:31
On my Windows box with MiKTex 2.9, this code triggered warnings about missing math mode delimiters, causing lualatex to insert four $ characters . Wrapping the string printed by tex.print within a verbatim block silenced that warning, although I don't spot which fonts triggered it. –  RBerteig Mar 24 '11 at 22:02
The obvious suspects are fonts with underscores in their name so setting its catcode to e.g. 12 should help. –  Ulrike Fischer Mar 25 '11 at 8:31
@RBerteig, @Ulrike: You can use something like tex.tprint({-2, v.familyname, ', ', v.fontname},{-1, '\\par'}) to get rid of the catcodes problem. –  topskip Mar 30 '11 at 13:22
@LarsH The name has changed. It is now called luaotfload-names.lua. And it is in texmf-var. (I didn't test if the code above still work. It is quite possible that the structure of the tables has changed too.) –  Ulrike Fischer Nov 4 '13 at 16:40
show 8 more comments

Based on Ulrike's answer:

Because I don't want to create a TeX document every time I need the font list, here is a simple script for that:

#!/usr/bin/env texlua


cachefile  = kpse.expand_var("$TEXMFVAR")  .. "/luatex-cache/generic/names/otfl-names.lua"
fontlist = dofile(cachefile)
assert(fontlist,"Could not load font name database")

local tmp = {}

for _,font in ipairs(fontlist.mappings) do
  tmp[#tmp + 1] = font.fontname

for _,fontname in ipairs(tmp) do

call it with

share|improve this answer
Can anyone tell how to do this with TeXLive 2013? There doesn't appear to be a generic directory under luatex-cache anymore... at least not in my installation. –  LarsH Sep 20 '13 at 18:58
OK, those folders may be specific to LuaLaTeX. See comment discussion with Ulrike. –  LarsH Nov 4 '13 at 18:59
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.