[luatex] [tex-live] Ignored italic correction with lua(la)tex format

Philipp Stephani p.stephani2 at googlemail.com
Thu Oct 6 23:59:56 CEST 2011


2011/10/6 Khaled Hosny <khaledhosny at eglug.org>:
> On Thu, Oct 06, 2011 at 11:31:38PM +0200, Philipp Stephani wrote:
>> 2011/10/6 Khaled Hosny <khaledhosny at eglug.org>:
>> > Hi all,
>> >
>> > After a long night of debugging and hair pulling, I finally found why
>> > italic correction for OpenType math fonts is ignored in luatex and
>> > lualatex formats but not in context.
>> >
>> > For some reason not yet clear to me, the setting of catcode to 11 in
>> > luatex-unicode-letters.tex causes luatex to not apply italic correction
>> > (might be related to the fact that luatex applies IC selectively).
>> >
>> > This minimal example shows the issues:
>> >
>> > \input luaotfload.sty
>> > \font\xits={file:xits-math.otf} at 10pt
>> > \textfont0=\xits
>> > $$\Umathchar"7"0"1D443\Umathchar"4"0`($$
>> > \bye
>> >
>> > after commenting the \catcode part in line 18 of
>> > luatex-unicode-letters.tex and rebuilding the format, italic correction
>> > is applied.
>> >
>> > I'm not sure what is the proper fix here, though.
>>
>> LuaTeX explicitly removes italic correction after letters:
>>
>>             if (is_new_mathfont(cur_f) && get_char_cat_code(cur_c) == 11) {
>>                 *delta = 0;     /* no italic correction in mid-word of
>> text font */
>>           }
>>
>> This seems like a bug to me.
>
> This is on purpose, following to MS implementation/Cambria Math.

How can this be, given that Word has no catcodes? Anyway, with Cambria
Math it works as expected, maybe even a font bug?

> In
> either case it makes no sense IMO to give non-letter characters a letter
> catcode.

The italic P you used in your example is a letter, and the parenthesis
has catcode 12.



More information about the luatex mailing list