View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000548 | luatex | luatex bug | public | 2010-12-31 01:05 | 2011-04-12 11:06 |
Reporter | phi | Assigned To | Taco | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
OS | Mac OS X | OS Version | 10.6.5 | ||
Product Version | 0.65.0 | ||||
Fixed in Version | 0.66.0 | ||||
Summary | 0000548: Possible fencepost error in math parameter counting | ||||
Description | I conjecture that there is a off-by-one error in the C-to-Lua translation of the math parameter table which prevents the last parameter (FractionDelimiterDisplayStyleSize) from being transferred to the Lua table. The attached patch seems to fix this, but I haven't checked whether it could introduce other errors. | ||||
Steps To Reproduce | If you compile the following example with LuaTeX, you see that the FractionDelimiterDisplayStyleSize parameter is correctly transferred to C/TeX, but is invisible to Lua: \input luaotfload.sty \font\cambria={name:XITS Math:script=MATH}\relax \textfont0=\cambria \immediate\write16{\number\Umathfractiondelsize\textstyle\space\number\Umathfractiondelsize\displaystyle} \directlua{% local i = font.id("cambria") local f = font.getfont(i) local m = f.MathConstants print(m.FractionDelimiterSize, m.FractionDelimiterDisplayStyleSize) } \bye Result with current TLcontrib binary: This is LuaTeX, Version beta-0.65.0-2010121316 661913 1566310 661913 nil Result with patch applied: This is LuaTeX, Version beta-0.65.0-2010123100 (rev 4047) 661913 1566310 661913 1566310 | ||||
Tags | No tags attached. | ||||
|
param-count.patch (541 bytes)
Index: source/texk/web2c/luatexdir/font/luafont.w =================================================================== --- source/texk/web2c/luatexdir/font/luafont.w (revision 4047) +++ source/texk/web2c/luatexdir/font/luafont.w (working copy) @@ -368,7 +368,7 @@ { int k; lua_newtable(L); - for (k = 1; k < font_math_params(f); k++) { + for (k = 1; k <= font_math_params(f); k++) { lua_pushnumber(L, font_math_param(f, k)); if (k <= MATH_param_max) { lua_setfield(L, -2, MATH_param_names[k]); |
|
BTW, this parameter is erroneously called FractionDelimiterDisplaySize (without "Style") in the manual |
|
patch + manual correction applied in revision 4086 |
|
all fixed in 0.66.0 |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-12-31 01:05 | phi | New Issue | |
2010-12-31 01:05 | phi | File Added: param-count.patch | |
2010-12-31 01:33 | phi | Note Added: 0000714 | |
2011-02-10 10:31 | Taco | Status | new => assigned |
2011-02-10 10:31 | Taco | Assigned To | => Taco |
2011-02-10 10:34 | Taco | Note Added: 0000746 | |
2011-02-10 10:34 | Taco | Status | assigned => resolved |
2011-02-10 10:34 | Taco | Resolution | open => fixed |
2011-04-12 11:02 | Taco | Fixed in Version | => 0.66.0 |
2011-04-12 11:06 | Taco | Note Added: 0000811 | |
2011-04-12 11:06 | Taco | Status | resolved => closed |