Overlay characters (negation symbols)

19 views
Skip to first unread message

Khaled Hosny

unread,
Jul 23, 2010, 3:49:46 AM7/23/10
to uni...@googlegroups.com
While testing negated symbols, I found that both unicode-math (either
engine) and ConTeXt give broken output, with any of the three OpenType
math fonts.

Unicode-math defines \not as a math accent, this gives good horizontal
position in XeTeX, but the vertical position still broken (shifted up),
with LuaTeX neither vertical nor horizontal positions are OK. Even
worse, if the \not glyph (U+0338) has vertical variants (as in XITS),
LuaTeX will use them, I'm not sure if it gets selected based on
height+depth or width (if the later, then it makes no sense).

ConTeXt seems to treat it as math rel, but this don't give any better
positioning. This however works for the virtual Latin Modern math font.

In Computer Modern, the negation slash is designed so that it overlays
the glyph after it (zero with, the glyph protrudes to the right of its
origin), but in the three OpenType math fonts it is done the other way
around (since in Unicode, combining marks follow the base not precede
it).

I think overlay characters (U+0338 and U+20D2), should be treated as a
special case math accents, there are only positioned horizontally (using
top_accent) but the vertical position is left untouched, and if it has
vertical variants, it gets selected base on height+depth.

I was going to suggest having a \Umathoverlay that creates a, say, Ovrl
atom that is treated in the described way, but a less intrusive approach
is to detect overlay accents in a similar way top and bottom accents are
differentiated (e.g. the bounding box descends slightly below base line
and is higher than x-height), and then special case it. I don't claim
deep understanding of how math mode works, so I'm not sure if any of
this makes sense.

What do you think?

Regards,
Khaled

--
Khaled Hosny
Arabic localiser and member of Arabeyes.org team
Free font developer

Taco Hoekwater

unread,
Jul 23, 2010, 6:39:44 AM7/23/10
to uni...@googlegroups.com
Khaled Hosny wrote:
>
> I think overlay characters (U+0338 and U+20D2), should be treated as a
> special case math accents, there are only positioned horizontally (using
> top_accent) but the vertical position is left untouched, and if it has
> vertical variants, it gets selected base on height+depth.
>
> I was going to suggest having a \Umathoverlay that creates a, say, Ovrl
> atom that is treated in the described way, but a less intrusive approach
> is to detect overlay accents in a similar way top and bottom accents are
> differentiated (e.g. the bounding box descends slightly below base line
> and is higher than x-height), and then special case it. I don't claim
> deep understanding of how math mode works, so I'm not sure if any of
> this makes sense.

This makes sense to me, at least. There is no need for an Ovrl atom,
as far as I can see, but there could be problems with horizontal
placement unless some form of placement marker is present in the
glyphs.


Best wishes,
Taco


Khaled Hosny

unread,
Jul 23, 2010, 7:16:06 AM7/23/10
to uni...@googlegroups.com

Both top accent can be used for that, Cambria and XITS have top accent
set for U+0338, XITS sets it for U+20D2, Asana does not set it for both,
but I think it can be easily fixed.

Reply all
Reply to author
Forward
0 new messages