[luatex] Font not appearing in font.fonts table

Khaled Hosny khaledhosny at eglug.org
Wed Sep 28 15:02:34 CEST 2011


On Wed, Sep 28, 2011 at 12:12:44PM +0200, Yannis Haralambous wrote:
> Hello everybody,
> I'm trying to find out how font loading works, so that I can implement the zebrackets package into luatex.
> The following code:
> 
> \documentclass{article}
> \usepackage{fontspec}
> \defaultfontfeatures{Ligatures=TeX}
> \setmainfont{Latin Modern Roman}
> \begin{document}
> 
> \fontsize{7}{7}\selectfont\emph{blabla}
> \directlua{for i=1,1000,1 do
> if font.fonts[i] == nil then
> %texio.write_nl("XXX ERROR")
> else
> if (font.fonts[i].name == nil) then
> texio.write_nl(tostring(i) .. ": " .. tostring(font.fonts[i]))
> else 
> texio.write_nl(tostring(i) .. ": " .. font.fonts[i].name)
> end
> end
> end
> }
> \end{document}
> 
> produces a list of all elements of table font.fonts. Here is what I get:
> 
> 1: cmex10
> 2: line10
> 3: linew10
> 4: lcircle10
> 5: lcirclew10
> 6: cmr5
> 7: cmr7
> 8: cmr10
> 9: cmmi5
> 10: cmmi7
> 11: cmmi10
> 12: cmsy5
> 13: cmsy7
> 14: cmsy10
> 15: cmr10
> 16: file:lmroman10-regular:script=latn;+trep;+tlig;
> 17: file:lmromanslant10-regular:script=latn;+trep;+tlig;
> 18: file:lmroman10-italic:script=latn;+trep;+tlig;
> 19: file:lmroman10-bold:script=latn;+trep;+tlig;
> 20: file:lmsans10-regular:script=latn;+trep;+tlig;
> 21: name:LatinModernRoman
> 22: name:LatinModernRoman/B
> 23: name:LatinModernRoman/I
> 24: name:LatinModernRoman/BI
> 25: name:LatinModernRoman:mode=node;script=latn;language=DFLT;+tlig;+trep;
> 26: name:LatinModernRoman:mode=node;script=latn;language=DFLT;+tlig;+trep;
> 27: name:LatinModernRoman/I:mode=node;script=latn;language=DFLT;+tlig;+trep;
> [1{/hom/yannis/texmf/config/pdftex.map}] (./luatex-test2.aux) )
>  285 words of node memory still in use:
>    3 hlist, 1 vlist, 1 rule, 2 glue, 3 attribute, 40 glue_spec, 3 attribute_lis
> t, 1 write nodes
>    avail lists: 2:40,3:2,4:27,5:1,6:14,7:1,9:8
> </usr/local/texlive/2011/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.
> otf></usr/local/texlive/2011/texmf-dist/fonts/opentype/public/lm/lmroman7-itali
> c.otf>
> 
> 
> Fonts 1-15 are the preloaded ones (by lualatex), fonts 16-20 are the files and 21-27 the names of fonts loaded by the
> fontspec package for the font family Latin Modern Roman.

Not exactly, file:lm* are loaded by EU2 font encoding (so they are used
by default if not explicit font is requested), name:LatinModern* are the
fonts loaded by \setmainfont.

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
 Arab


More information about the luatex mailing list