[luatex] reading font.fonts[] gives an error
Philipp Gesang
Philipp.Gesang at alumni.uni-heidelberg.de
Sat May 11 16:35:45 CEST 2013
···<date: 2013-05-11, Saturday>···<from: Hironori KITAGAWA>···
> Hello,
>
> LuaTeX in TeX Live 2013 pretest (x86_64-linux)
> with the following source
> ---
> %#!luatex
> \input luaotfload.sty
> \font\jx=file:KozMinPr6N-Regular.otf:+palt \jx
> \directlua{local t = font.fonts[font.current()]}%
with the fontloader, use either
\directlua{local t = font.getfont(font.current())}%
or
\directlua{local t = fonts.hashes.identifiers[font.current()]}%
> あ
> \end
The Luatex reference says:
Note that at the moment, each access to the font.fonts or call
to font.getfont creates a lua table for the whole font.
That interferes with the font loader, so font.getfont() has been
overloaded some time ago, for an explanation see:
http://www.ntg.nl/pipermail/ntg-context/2013/072166.html
Best
Philipp
> ---
> gives a strange error:
> > error: ...3/texmf-dist/tex/luatex/luaotfload/luaotfload-merged.lua:7493:
> > attempt to perform arithmetic on local 'factor' (a nil value)
> (The complete log is attached to this mail.)
>
> Of course, this error disappeared if the line 5 is commented out.
> I think that the line 5 does nothing harmful...
>
> Regards
> Hironori KITAGAWA <h_kitagawa2001 at yahoo.co.jp>
> This is LuaTeX, Version beta-0.76.0-2013050111 (rev 4627) (format=luatex 2013.5.8) 11 MAY 2013 23:25
> restricted \write18 enabled.
> **factor-nil
> (./factor-nil.tex
> (/opt/texlive/2013/texmf-dist/tex/luatex/luaotfload/luaotfload.sty
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase.sty
> Package: luatexbase 2013/05/04 v0.6 Module utilities for LuaTeX
> (/opt/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty
> Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
> Package ifluatex Info: LuaTeX detected.
> )
> (/opt/texlive/2013/texmf-dist/tex/generic/oberdiek/luatex.sty
> Package: luatex 2010/03/09 v0.4 LuaTeX basic definition package (HO)
>
> (/opt/texlive/2013/texmf-dist/tex/generic/oberdiek/infwarerr.sty
> Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
> )
> (/opt/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty
> Package ifluatex Info: The package is already loaded.
> )
> \@tempcnta=\count277
> \@tempcntb=\count278
> \LuT at AllocAttribute=\count279
> \LuT at AllocCatcodeTable=\count280
> \CatcodeTableStack=\count281
> \CatcodeTableIniTeX=\catcodetable1
> \CatcodeTableString=\catcodetable3
> \CatcodeTableOther=\catcodetable5
> \CatcodeTableLaTeX=\catcodetable7
>
> (/opt/texlive/2013/texmf-dist/tex/generic/oberdiek/luatex-loader.sty
> Package: luatex-loader 2010/03/09 v0.4 Lua module loader (HO)
>
> (/opt/texlive/2013/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua)))
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase-compat.sty
> Package: luatexbase-compat 2011/05/24 v0.4 Compatibility tools for LuaTeX
> (/opt/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty
> Package ifluatex Info: The package is already loaded.
> ))
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty
> Package: luatexbase-loader 2013/04/13 v0.5 Lua module loader for LuaTeX
> (/opt/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty
> Package ifluatex Info: The package is already loaded.
> )
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase-compat.sty)
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase.loader.lua))
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase-regs.sty
> Package: luatexbase-regs 2011/05/24 v0.4 Registers allocation for LuaTeX
> (/opt/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty
> Package ifluatex Info: The package is already loaded.
> ))
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty
> Package: luatexbase-attr 2011/05/24 v0.4 Attributes allocation for LuaTeX
> (/opt/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty
> Package ifluatex Info: The package is already loaded.
> )
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase-compat.sty)
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty)
> (/opt/texlive/2013/texmf-dist/tex/generic/oberdiek/luatex.sty
> Package luatex Info: The package is already loaded.
> )
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/attr.lua)
> \lltxb at attr@unsetvalue=\count282
> )
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase-cctb.sty
> Package: luatexbase-cctb 2011/05/24 v0.4 Catcodetable allocation for LuaTeX
> (/opt/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty
> Package ifluatex Info: The package is already loaded.
> )
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty)
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/cctb.lua)
> \lltxb at catcodetable@alloc=\count283
> \CatcodeTableStack=\count284
> \CatcodeTableIniTeX=\luatexcatcodetable1
> \CatcodeTableString=\luatexcatcodetable3
> \CatcodeTableOther=\luatexcatcodetable5
> \CatcodeTableLaTeX=\luatexcatcodetable7
> \CatcodeTableLaTeXAtLetter=\luatexcatcodetable9
> \CatcodeTableExpl=\luatexcatcodetable11
> )
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase-mcb.sty
> Package: luatexbase-mcb 2013/04/13 v0.5 Callback management for LuaTeX
> (/opt/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty
> Package ifluatex Info: The package is already loaded.
> )
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase-modutils.sty
> Package: luatexbase-modutils 2013/04/13 v0.5 Module utilities for LuaTeX
> (/opt/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty
> Package ifluatex Info: The package is already loaded.
> )
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty)
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/modutils.lua))
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/mcb.lua)
> Lua module: luatexbase-mcb 2013/04/13 0.5 register several functions in a callba
> ck
> )
> (/opt/texlive/2013/texmf-dist/tex/luatex/luatexbase/luatexbase-modutils.sty))
> (/opt/texlive/2013/texmf-dist/tex/luatex/luaotfload/luaotfload.lua)
> Lua module: luaotfload 2013/04/29 2.2 OpenType layout system.
>
> luaotfload: push namespace for font loader
> (/opt/texlive/2013/texmf-dist/tex/luatex/luaotfload/luaotfload-merged.lua)(using
> write cache: /home/h7k/.texlive2013/texmf-var/luatex-cache/generic)(using read
> cache: /opt/texlive/2013/texmf-var/luatex-cache/generic /home/h7k/.texlive2013/t
> exmf-var/luatex-cache/generic)
> (log) luatexbase.attributes["luaotfload at kernpair"] = 1
> (log) luatexbase.attributes["luaotfload at ligacomp"] = 2
> (log) luatexbase.attributes["luaotfload at markbase"] = 3
> (log) luatexbase.attributes["luaotfload at markmark"] = 4
> (log) luatexbase.attributes["luaotfload at markdone"] = 5
> (log) luatexbase.attributes["luaotfload at cursbase"] = 6
> (log) luatexbase.attributes["luaotfload at curscurs"] = 7
> (log) luatexbase.attributes["luaotfload at cursdone"] = 8
> (log) luatexbase.attributes["luaotfload at state"] = 9
> luaotfload: “I am using the merged version of 'luaotfload.lua' here. If
> luaotfload: you run into problems or experience unexpected behaviour,
> luaotfload: and if you have ConTeXt installed you can try to delete the
> luaotfload: file 'luaotfload-font-merged.lua' as I might then use the
> luaotfload: possibly updated libraries. The merged version is not
> luaotfload: supported as it is a frozen instance. Problems can be
> luaotfload: reported to the ConTeXt mailing list.”
> luaotfload: pop namespace from font loader -- non-destructive
> luaotfload: fontloader loaded in 0.014 seconds
> luatexbase-mcb: inserting 'luaotfload.node_processor'
> at position 1 in 'pre_line
> break_filter'
> luatexbase-mcb: inserting 'luaotfload.node_processor'
> at position 1 in 'hpack_fi
> lter'
> luatexbase-mcb: inserting 'luaotfload.find_vf_file'
> at position 1 in 'find_vf_fi
> le'
> (/opt/texlive/2013/texmf-dist/tex/luatex/luaotfload/luaotfload-lib-dir.lua)
> (/opt/texlive/2013/texmf-dist/tex/luatex/luaotfload/luaotfload-override.lua)
> (/opt/texlive/2013/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua)
> (/opt/texlive/2013/texmf-dist/tex/luatex/luaotfload/luaotfload-database.lua)
> (/opt/texlive/2013/texmf-dist/tex/luatex/luaotfload/luaotfload-colors.lua)
> luatexbase-mcb: creating 'luaotfload.patch_font' type 4
> luatexbase-mcb: resetting callback 'define_font'
> luatexbase-mcb: inserting 'luaotfload.define_font'
> at position 1 in 'define_font
> '
> (/opt/texlive/2013/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua)
> (/opt/texlive/2013/texmf-dist/tex/luatex/luaotfload/luaotfload-auxiliary.lua)
> luatexbase-mcb: inserting 'luaotfload.fontdata_fallbacks'
> at position 1 in 'luao
> tfload.patch_font'
> luatexbase-mcb: inserting 'luaotfload.aux.set_sscale_dimens'
> at position 2 in 'l
> uaotfload.patch_font'
> luatexbase-mcb: inserting 'luaotfload.aux.patch_cambria_domh'
> at position 3 in '
> luaotfload.patch_font'
> luatexbase-mcb: inserting 'luaotfload.aux.set_capheight'
> at position 4 in 'luaot
> fload.patch_font')
> luaotfload | load: auto-selecting default features for script: dflt(load lua: /h
> ome/h7k/.texlive2013/texmf-var/luatex-cache/generic/fonts/otf/kozminpr6n-regular
> .lua).
> <inserted text> \par
>
> <to be read again>
> \end
> l.6 \end
>
> ? x
> No pages of output.
>
> PDF statistics: 0 PDF objects out of 1000 (max. 8388607)
> 0 named destinations out of 1000 (max. 131072)
> 1 words of extra memory for PDF output out of 10000 (max. 10000000)
>
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://tug.org/pipermail/luatex/attachments/20130511/e99d88d9/attachment-0001.bin>
More information about the luatex
mailing list