4

Possible Duplicate:
How do I get a list of all available fonts for luaotfload?

I wonder if there is a possibility to display all available fonts in the normalised form (see below). The LuaTeX manual states in section 4.3.3

the whole table of TEX fonts is accessible from LUA using a virtual array.

Trying to read this table like this:

\starttext
\startluacode

    for i,v in font.each() do
        context(font.fonts[i].fontname)
        context(' ')
    end

\stopluacode
\stoptext

yields to a list of the Latin Modern fonts:

result

Apparently the font table doesn't contain all fonts, it rather contains the already loaded fonts. I'd like to get a list like the first column of the output of mtxrun --script fonts --list --all --pattern=*:

Example (shortened):

wncyss10           wncyss10          wncyss10.afm
xits               xits              xits-regular.otf
xitsbold           xitsbold          xits-bold.otf
xitsbolditalic     xitsbolditalic    xits-bolditalic.otf
xitsitalic         xitsitalic        xits-italic.otf
xitsmath           xitsmath          xits-math.otf
xitsmathnormal     xitsmath          xits-math.otf
xitsmathregular    xitsmath          xits-math.otf
xitsnormal         xitsitalic        xits-italic.otf
xitsregular        xits              xits-regular.otf

How can this information be accessed from within LuaTeX? The solution should work in ConTeXt.

Marco
  • 26,055

0 Answers0