View Issue Details

IDProjectCategoryView StatusLast Update
0000507luatexluatex bugpublic2012-04-09 04:40
ReporterKhaled Hosny Assigned ToTaco  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Fixed in Version0.65.0 
Summary0000507: Misplaced math accents over all classes but 0 and 7
DescriptionWith OpenType math fonts, accents over any class except 0 and 7 are
misplaced, which does not happen with TFM fonts.
Additional InformationSee attached files.
Tagsmath

Activities

Khaled Hosny

2010-10-25 16:25

developer  

test.tex (594 bytes)

Khaled Hosny

2010-10-25 16:26

developer  

test.pdf (17,293 bytes)

Khaled Hosny

2010-10-31 20:56

developer   ~0000651

Some debugging:
In the misplaced cases, the `type(nucleus(q))` in mlist.w:2147 == 33 (`math_text_char_node` I think) also `char_top_accent()` will return 0 in that case, so OpenType top_accent pos is not used and will fallback to default math positioning mechanism. I'm not sure if this is a TeX feature or a bug.

Now the default positioning should have centred the accent and it would have passed unnoticed, but it turned to be broken as well; if the accent has top_accent but the base doesn't the accent will be misplaced, like in \hat{0}. Now, removing the half() from mlist.w:2231, so it becomes:

  shift_amount(y) = s + w - width(y);

Seems to give sane default accent positioning in that case (looks identical to xetex's in my eye) and so fare it does not seem to break anything, and it essentially masks the current issue.

Taco

2010-11-24 15:10

administrator   ~0000664

It looks like fixing/applying 0000520 should take care of this as well. In any case, the problem is related because of the problem with using '0' instead of an explicit 'not set' value.

Taco

2010-11-26 15:21

administrator   ~0000676

Well, it did not. Moreover, the solution Khaled proposed did break something in the case of $\hat{aaaa}$, so my current solution (revision 3984) is

        if (width(y)== 0) {
            shift_amount(y) = s + w;
        } else {
            shift_amount(y) = s + half(w - width(y));
        }

which is still an approximation, but better then nothing. The core problem is that we do not know the width of a MATH accent (width(y)==0) so perfect placement is not possible if there is no 'top_accent' marker

Taco

2010-12-13 14:10

administrator   ~0000711

let's mark this resolved for now

Issue History

Date Modified Username Field Change
2010-10-25 16:25 Khaled Hosny New Issue
2010-10-25 16:25 Khaled Hosny File Added: test.tex
2010-10-25 16:26 Khaled Hosny File Added: test.pdf
2010-10-25 16:34 Taco Status new => assigned
2010-10-25 16:34 Taco Assigned To => Taco
2010-10-31 20:56 Khaled Hosny Note Added: 0000651
2010-11-24 15:10 Taco Note Added: 0000664
2010-11-26 15:21 Taco Note Added: 0000676
2010-11-26 15:21 Taco Status assigned => feedback
2010-12-13 14:10 Taco Note Added: 0000711
2010-12-13 14:10 Taco Status feedback => resolved
2010-12-13 14:10 Taco Resolution open => fixed
2010-12-13 14:43 Taco Fixed in Version => 0.65.0
2010-12-13 14:43 Taco Status resolved => closed
2012-04-09 04:40 Khaled Hosny Tag Attached: math