ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* A bug in latin modern fonts?
@ 2012-01-29 10:42 Janne Junnila
  2012-02-04  8:15 ` Janne Junnila
  0 siblings, 1 reply; 6+ messages in thread
From: Janne Junnila @ 2012-01-29 10:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi!

The following example seems to have some troubles with the latin modern fonts:

\starttext

The function $f \colon \reals \to \reals$ is given by $x \mapsto x - 3$.

\stoptext

The colon is printed fine, but the blackboard bold Rs don't look
correct. The \mapsto symbol is missing and there's a hyphen instead of
minus.

Are others having the same issue? I tried to do a fresh install, but
the problem persisted. There were some messages like

fonts           > otf loading > skipping cyclic reference U+00028 in
math variant U+00028

during compiling. I don't know if they are related to the problem.

Thanks,
Janne Junnila
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: A bug in latin modern fonts?
  2012-01-29 10:42 A bug in latin modern fonts? Janne Junnila
@ 2012-02-04  8:15 ` Janne Junnila
  2012-02-04 17:49   ` Aditya Mahajan
  0 siblings, 1 reply; 6+ messages in thread
From: Janne Junnila @ 2012-02-04  8:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I would like to my previous message that also Asana-Math seems to have problems.

\setupbodyfont[asana]
\starttext

The function $f \colon \reals \to \reals$ is given by $x \mapsto x -
3$. Its derivative is
$f'(x) = 1$.

\stoptext

In the above the ' in f'(x) looks wrong and there's hyphen instead of
minus at x - 3.
The problems arise in the current standalone, the latest stable one
worked OK at least
for the latin modern fonts.

Janne Junnila

On Sun, Jan 29, 2012 at 12:42 PM, Janne Junnila <janne.junnila@gmail.com> wrote:
> Hi!
>
> The following example seems to have some troubles with the latin modern fonts:
>
> \starttext
>
> The function $f \colon \reals \to \reals$ is given by $x \mapsto x - 3$.
>
> \stoptext
>
> The colon is printed fine, but the blackboard bold Rs don't look
> correct. The \mapsto symbol is missing and there's a hyphen instead of
> minus.
>
> Are others having the same issue? I tried to do a fresh install, but
> the problem persisted. There were some messages like
>
> fonts           > otf loading > skipping cyclic reference U+00028 in
> math variant U+00028
>
> during compiling. I don't know if they are related to the problem.
>
> Thanks,
> Janne Junnila
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: A bug in latin modern fonts?
  2012-02-04  8:15 ` Janne Junnila
@ 2012-02-04 17:49   ` Aditya Mahajan
  2012-02-04 18:18     ` Khaled Hosny
  2012-02-04 20:03     ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Aditya Mahajan @ 2012-02-04 17:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2598 bytes --]

On Sat, 4 Feb 2012, Janne Junnila wrote:

> On Sun, Jan 29, 2012 at 12:42 PM, Janne Junnila <janne.junnila@gmail.com> wrote:
>> Hi!
>>
>> The following example seems to have some troubles with the latin modern fonts:
>>
>> \starttext
>>
>> The function $f \colon \reals \to \reals$ is given by $x \mapsto x - 3$.
>>
>> \stoptext
>>
>> The colon is printed fine, but the blackboard bold Rs don't look
>> correct. The \mapsto symbol is missing and there's a hyphen instead of
>> minus.
>>
>> Are others having the same issue? I tried to do a fresh install, but
>> the problem persisted. There were some messages like
>>
>> fonts           > otf loading > skipping cyclic reference U+00028 in
>> math variant U+00028
>>
>> during compiling. I don't know if they are related to the problem.

> Hi,
>
> I would like to my previous message that also Asana-Math seems to have problems.
>
> \setupbodyfont[asana]
> \starttext
>
> The function $f \colon \reals \to \reals$ is given by $x \mapsto x -
> 3$. Its derivative is
> $f'(x) = 1$.
>
> \stoptext
>
> In the above the ' in f'(x) looks wrong and there's hyphen instead of
> minus at x - 3.
> The problems arise in the current standalone, the latest stable one
> worked OK at least
> for the latin modern fonts.

The reference implementatation for math handling is cambria. With cambria
$f'(x)$ and $\mapsto$ work fine. But $a-b$ gives text minus, and $a 
\colonequals b$ gives an error.

@Hans and Khaled: Any idea why this is happening?

\starttext
\setupbodyfont[cambria]
$a-b$ % text minus
$a \colonequals b$ % error
\stoptext

$f'(x)$ works fine with cambria and xits, but is placed low with asana. My 
guess is that this is the font's fault; with asana $f^{'}$ works fine. 
The same "bug" is also present with LMmath.

The symbol \mapsto appears to be missing from asana and lmmath. ConTeXt 
currently does not use fall backs for missing math glyphs.

Finally, $\reals$ works correctly with cambria, asana, lmmath, and xtis. 
It does not work with euler, but that is because euler is missing 
blackboard gylphs.

So, to summarize:

1. - (minus), is clearly a bug in ConTeXt.

2. \colonequals is a bug in ConTeXt's definition. We should be using the 
glyph from the font anyways and falling back only if the glyph is missing.

3. \mapsto glyph is missing from lmmath and asana. We need to fall back to 
composed glyphs.

4. \reals is working fine. The shape of the glyph in lmmath is unusual, 
but that should be a font issue rather than a context issue.

Aditya



[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: A bug in latin modern fonts?
  2012-02-04 17:49   ` Aditya Mahajan
@ 2012-02-04 18:18     ` Khaled Hosny
  2012-02-04 20:03     ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Khaled Hosny @ 2012-02-04 18:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, Feb 04, 2012 at 12:49:41PM -0500, Aditya Mahajan wrote:
> On Sat, 4 Feb 2012, Janne Junnila wrote:
> 
> >On Sun, Jan 29, 2012 at 12:42 PM, Janne Junnila <janne.junnila@gmail.com> wrote:
> >>Hi!
> >>
> >>The following example seems to have some troubles with the latin modern fonts:
> >>
> >>\starttext
> >>
> >>The function $f \colon \reals \to \reals$ is given by $x \mapsto x - 3$.
> >>
> >>\stoptext
> >>
> >>The colon is printed fine, but the blackboard bold Rs don't look
> >>correct. The \mapsto symbol is missing and there's a hyphen instead of
> >>minus.
> >>
> >>Are others having the same issue? I tried to do a fresh install, but
> >>the problem persisted. There were some messages like
> >>
> >>fonts           > otf loading > skipping cyclic reference U+00028 in
> >>math variant U+00028
> >>
> >>during compiling. I don't know if they are related to the problem.
> 
> >Hi,
> >
> >I would like to my previous message that also Asana-Math seems to have problems.
> >
> >\setupbodyfont[asana]
> >\starttext
> >
> >The function $f \colon \reals \to \reals$ is given by $x \mapsto x -
> >3$. Its derivative is
> >$f'(x) = 1$.
> >
> >\stoptext
> >
> >In the above the ' in f'(x) looks wrong and there's hyphen instead of
> >minus at x - 3.
> >The problems arise in the current standalone, the latest stable one
> >worked OK at least
> >for the latin modern fonts.
> 
> The reference implementatation for math handling is cambria. With cambria
> $f'(x)$ and $\mapsto$ work fine. But $a-b$ gives text minus, and $a
> \colonequals b$ gives an error.
> 
> @Hans and Khaled: Any idea why this is happening?
> 
> \starttext
> \setupbodyfont[cambria]
> $a-b$ % text minus
> $a \colonequals b$ % error
> \stoptext
> 
> $f'(x)$ works fine with cambria and xits, but is placed low with
> asana. My guess is that this is the font's fault; with asana $f^{'}$
> works fine. The same "bug" is also present with LMmath.

Looks like ‘ssty’ is not applied to script and scriptscript fonts,
Cambria and XITS can go away with it not applied since the default prime
glyphs is raised and small, but Asana (and I think Latin Modern Math)
primes won't look OK without this feature applied.

Regards,
 Khaled
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: A bug in latin modern fonts?
  2012-02-04 17:49   ` Aditya Mahajan
  2012-02-04 18:18     ` Khaled Hosny
@ 2012-02-04 20:03     ` Hans Hagen
  2012-02-04 21:20       ` Aditya Mahajan
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2012-02-04 20:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 4-2-2012 18:49, Aditya Mahajan wrote:

> 2. \colonequals is a bug in ConTeXt's definition. We should be using the
> glyph from the font anyways and falling back only if the glyph is missing.

Ah, i messed that one up ... I'll fix it.

But anyway, it looks like I have to start on making a a nice library of 
composed glyphs

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: A bug in latin modern fonts?
  2012-02-04 20:03     ` Hans Hagen
@ 2012-02-04 21:20       ` Aditya Mahajan
  0 siblings, 0 replies; 6+ messages in thread
From: Aditya Mahajan @ 2012-02-04 21:20 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 825 bytes --]

On Sat, 4 Feb 2012, Hans Hagen wrote:

> On 4-2-2012 18:49, Aditya Mahajan wrote:
>
>> 2. \colonequals is a bug in ConTeXt's definition. We should be using the
>> glyph from the font anyways and falling back only if the glyph is missing.
>
> Ah, i messed that one up ... I'll fix it.
>
> But anyway, it looks like I have to start on making a a nice library of 
> composed glyphs

The following mapping in char-def.lua should take care of remapping - 
(0x002D) to \minus (0x2212), but it is not working.

  {
   adobename="hyphen",
   category="pd",
   cjkwd="na",
   description="HYPHEN-MINUS",
   direction="es",
   linebreak="hy",
   mathsymbol=0x2212,
   unicodeslot=0x002D,
  },

The attached patch to math-map.lua can force the remapping, but it will be 
nicer if the mathsymbol in char-def.lua worked correctly.

Aditya

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1119 bytes --]

--- /home/adityam/Software/context-pkgbuild/src/tex/texmf-context/tex/context/base/math-map.lua	2011-09-14 06:34:53.000000000 -0400
+++ /opt/context-minimals/texmf-context/tex/context/base/math-map.lua	2012-02-04 16:13:16.000000000 -0500
@@ -128,7 +128,7 @@
         [0x03F4]=0x03F4, [0x03F5]=0x03F5,
     },
     symbols   = {
-        [0x2202]=0x2202, [0x2207]=0x2207,
+        [0x002d]=0x2212, [0x2202]=0x2202, [0x2207]=0x2207, 
     },
 }
 
@@ -160,7 +160,7 @@
         [0x03F4]=0x1D6F3, [0x03F5]=0x1D716,
     },
     symbols   = {
-        [0x2202]=0x1D715, [0x2207]=0x1D6FB,
+        [0x002d]=0x2212, [0x2202]=0x1D715, [0x2207]=0x1D6FB,
     },
 }
 
@@ -185,7 +185,7 @@
         [0x03F4]=0x1D6B9, [0x03F5]=0x1D6DC,
     },
     symbols   = {
-        [0x2202]=0x1D6DB, [0x2207]=0x1D6C1,
+        [0x002d]=0x2212, [0x2202]=0x1D6DB, [0x2207]=0x1D6C1,
     },
 }
 
@@ -210,7 +210,7 @@
         [0x03F4]=0x1D72D, [0x03F5]=0x1D750,
     },
     symbols   = {
-        [0x2202]=0x1D74F, [0x2207]=0x1D735,
+        [0x002d]=0x2212, [0x2202]=0x1D74F, [0x2207]=0x1D735,
     },
 }
 

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-04 21:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-29 10:42 A bug in latin modern fonts? Janne Junnila
2012-02-04  8:15 ` Janne Junnila
2012-02-04 17:49   ` Aditya Mahajan
2012-02-04 18:18     ` Khaled Hosny
2012-02-04 20:03     ` Hans Hagen
2012-02-04 21:20       ` Aditya Mahajan

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).