ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Incorrect rendering of * with UTF math fonts
Date: Wed, 22 Feb 2012 17:22:34 -0500 (EST)	[thread overview]
Message-ID: <alpine.LNX.2.02.1202221720450.732@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <20120222215312.GA16395@khaled-laptop>

On Wed, 22 Feb 2012, Khaled Hosny wrote:

> On Wed, Feb 22, 2012 at 02:52:22PM -0500, Aditya Mahajan wrote:
>> Hi,
>>
>> Using * in superscripts gives wrong glyph size and spacing.
>>
>> For example, with LM math everyhing looks fine:
>>
>> \starttext
>> $x^*$ vs $x^{\ast}$
>> \stoptext
>
> For me this is typeset using LM Type1 fonts, not the OpenType LM math
> font which explains why both are correct, after adding
> \setupbodyfont[modern] the first * is raised than the other but still
> readable.
>
>> With Cambria, the result is OK (but you can still see the
>> differences in the spacing of * in x^*)
>>
>> \usemodule[simplefonts]
>> \setmathfont[Cambria]
>> \starttext
>> $x^*$ vs $x^{\ast}$
>> \stoptext
>>
>> With Neo Euler, $x^*$ look really bad.
>>
>> \usemodule[simplefonts]
>> \setmathfont[Cambria]
>> \starttext
>> $x^*$ vs $x^{\ast}$
>> \stoptext
>>
>> I cannot figure out why this is happening. It definitely looks like
>> a bug at the context end rather than a bug with the fonts.
>
> It seems that * in math mode should map to U+2217 (which is what \ast
> maps to) and not the ASCII asterisk.

Indeed. Making this change gives the correct result.

@Hans, can you make the following change in char-def.lua

--- char-def.old	2012-02-22 17:18:05.000000000 -0500
+++ char-def.lua	2012-02-22 17:19:06.000000000 -0500
@@ -382,8 +382,7 @@
    description="ASTERISK",
    direction="on",
    linebreak="al",
-  mathclass="binary",
-  mathname="ast",
+  mathsymbol=0x2217,
    unicodeslot=0x002A,
   },
   {

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


      reply	other threads:[~2012-02-22 22:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-22 19:52 Aditya Mahajan
2012-02-22 20:31 ` Otared Kavian
2012-02-22 20:47   ` Wolfgang Schuster
2012-02-22 21:28     ` Otared Kavian
2012-02-22 21:35       ` Wolfgang Schuster
2012-02-22 21:53 ` Khaled Hosny
2012-02-22 22:22   ` Aditya Mahajan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.02.1202221720450.732@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).