* math: ± and ∓ are shifted
@ 2013-04-04 21:36 Xenia
2013-04-04 21:44 ` Aditya Mahajan
0 siblings, 1 reply; 8+ messages in thread
From: Xenia @ 2013-04-04 21:36 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 323 bytes --]
Hi context list,
I noticed that the ∓ sign is a little higher than the ± sign, so that
the + signs are at the same height. But this looks strange and should be
changed.
$ context --version
mtx-context | ConTeXt Process Management 0.60
mtx-context | current version: 2013.03.24 15:11
Thanks,
Xenia
[-- Attachment #2: plus_minus.log --]
[-- Type: text/x-log, Size: 7872 bytes --]
(/home/maja/context/tex/texmf-context/tex/context/base/cont-yes.mkiv
ConTeXt ver: 2013.03.24 15:11 MKIV fmt: 2013.3.24 int: english/english
system > 'cont-new.mkiv' loaded
(/home/maja/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system > beware: some patches loaded from cont-new.mkiv
)
system > files > jobname 'plus_minus', input 'plus_minus', result 'plus_minus'
fonts > latin modern fonts are not preloaded
languages > language 'en' is active
(plus_minus.tex{/home/maja/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts > preloading latin modern fonts (second stage)
fonts > typescripts > unknown library 'loc'
{/home/maja/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/maja/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts > 'fallback modern rm 12pt' is loaded
backend > xmp > using file '/home/maja/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages > flushing realpage 1, userpage 1
) )</home/maja/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf></home/maja/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf>
system > files > start used files
used files > 1: filename=cont-yes.mkiv filetype=tex foundname=/home/maja/context/tex/texmf-context/tex/context/base/cont-yes.mkiv usedmethod=database
used files > 2: filename=cont-new.mkiv filetype=tex foundname=/home/maja/context/tex/texmf-context/tex/context/base/cont-new.mkiv usedmethod=database
used files > 3: filename=lang-us.lua filetype=lua foundname=/home/maja/context/tex/texmf-context/tex/context/patterns/lang-us.lua usedmethod=database
used files > 4: filename=plus_minus.tex foundname=plus_minus.tex usedmethod=direct
used files > 5: filename=mkiv-base.map filetype=map format=map foundname=/home/maja/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map usedmethod=database
used files > 6: filename=lm.lfg filetype=tex foundname=/home/maja/context/tex/texmf-context/tex/context/fonts/lm.lfg usedmethod=database
used files > 7: filename=lm-math.lfg filetype=tex foundname=/home/maja/context/tex/texmf-context/tex/context/fonts/lm-math.lfg usedmethod=database
used files > 8: filename=lm-math.map filetype=map format=map foundname=/home/maja/context/tex/texmf/fonts/map/dvips/lm/lm-math.map usedmethod=database
used files > 9: filename=lm-rm.map filetype=map format=map foundname=/home/maja/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map usedmethod=database
used files > 10: filename=lmroman12-regular filetype=otf format=otf foundname=/home/maja/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf usedmethod=database
used files > 11: filename=latinmodern-math.otf filetype=opentypefonts foundname=/home/maja/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
used files > 12: filename=latinmodern-math.otf filetype=otf format=otf foundname=/home/maja/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
used files > 13: filename=lpdf-pdx.xml filetype=tex foundname=/home/maja/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml usedmethod=database
system > files > stop used files
system > structure > start used structure
used structure > text: plus_minus
system > structure > stop used structure
system > files > start used files
used file > 1: filename=cont-yes.mkiv filetype=tex foundname=/home/maja/context/tex/texmf-context/tex/context/base/cont-yes.mkiv usedmethod=database
used file > 2: filename=cont-new.mkiv filetype=tex foundname=/home/maja/context/tex/texmf-context/tex/context/base/cont-new.mkiv usedmethod=database
used file > 3: filename=lang-us.lua filetype=lua foundname=/home/maja/context/tex/texmf-context/tex/context/patterns/lang-us.lua usedmethod=database
used file > 4: filename=plus_minus.tex foundname=plus_minus.tex usedmethod=direct
used file > 5: filename=mkiv-base.map filetype=map format=map foundname=/home/maja/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map usedmethod=database
used file > 6: filename=lm.lfg filetype=tex foundname=/home/maja/context/tex/texmf-context/tex/context/fonts/lm.lfg usedmethod=database
used file > 7: filename=lm-math.lfg filetype=tex foundname=/home/maja/context/tex/texmf-context/tex/context/fonts/lm-math.lfg usedmethod=database
used file > 8: filename=lm-math.map filetype=map format=map foundname=/home/maja/context/tex/texmf/fonts/map/dvips/lm/lm-math.map usedmethod=database
used file > 9: filename=lm-rm.map filetype=map format=map foundname=/home/maja/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map usedmethod=database
used file > 10: filename=lmroman12-regular filetype=otf format=otf foundname=/home/maja/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf usedmethod=database
used file > 11: filename=latinmodern-math.otf filetype=opentypefonts foundname=/home/maja/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
used file > 12: filename=latinmodern-math.otf filetype=otf format=otf foundname=/home/maja/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
used file > 13: filename=lpdf-pdx.xml filetype=tex foundname=/home/maja/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml usedmethod=database
system > files > stop used files
system > options > start commandline options
used option > currentrun="3"
used option > fulljobname="./plus_minus.tex"
used option > input="./plus_minus.tex"
used option > kindofrun="2"
used option > maxnofruns="8"
used option > no-parse-first-line="true"
system > options > stop commandline options
system > options > start commandline files
used file > 1: ./plus_minus.tex
system > options > stop commandline files
mkiv lua stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats > used cache path: /home/maja/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats > resource resolver: loadtime 0.012 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 13 found files, scanned paths: <none>
mkiv lua stats > stored bytecode data: 323 modules (0.210 sec), 69 tables (0.010 sec), 392 chunks (0.220 sec)
mkiv lua stats > cleaned up reserved nodes: 41 nodes, 9 lists of 441
mkiv lua stats > node memory usage: 2 glue, 2 penalty, 9 attribute, 28 glue_spec, 3 attribute_list
mkiv lua stats > node list callback tasks: 6 unique task lists, 6 instances (re)created, 40 calls
mkiv lua stats > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats > loaded patterns: en::2
mkiv lua stats > jobdata time: 0.002 seconds saving, 0.001 seconds loading
mkiv lua stats > callbacks: 145 direct, 180 indirect, 325 total
mkiv lua stats > randomizer: resumed with value 0.57137628345349
mkiv lua stats > lxml preparation time: 0.000 seconds, 0 nodes, 15 lpath calls, 0 cached calls
mkiv lua stats > result saved in file: plus_minus.pdf, compresslevel 3, objectcompreslevel 3
mkiv lua stats > loaded fonts: 2 files: latinmodern-math.otf lmroman12-regular.otf
mkiv lua stats > fonts load time: 0.259 seconds
mkiv lua stats > luatex banner: this is luatex, version beta-0.75.0-2013031411 (tex live 2013/dev)(rev 4589)
mkiv lua stats > control sequences: 36706 of 65536 + 100000
mkiv lua stats > current memory usage: 27 MB (ctx: 26 MB)
mkiv lua stats > runtime: 0.755 seconds, 1 processed pages, 1 shipped pages, 1.325 pages/second
[-- Attachment #3: plus_minus.pdf --]
[-- Type: application/pdf, Size: 6619 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: plus_minus.tex --]
[-- Type: text/x-tex; name="plus_minus.tex", Size: 86 bytes --]
\starttext
\startformula
A = a ± b ∓ c = a \pm b \mp c
\stopformula
\stoptext
[-- Attachment #5: 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] 8+ messages in thread
* Re: math: ± and ∓ are shifted
2013-04-04 21:36 math: ± and ∓ are shifted Xenia
@ 2013-04-04 21:44 ` Aditya Mahajan
2013-04-04 22:06 ` Hans Hagen
0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2013-04-04 21:44 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 397 bytes --]
On Thu, 4 Apr 2013, Xenia wrote:
> Hi context list,
>
> I noticed that the ∓ sign is a little higher than the ± sign, so that
> the + signs are at the same height. But this looks strange and should be
> changed.
Indeed. These look very odd. I tested this with cambria and the outcome is
similar, so this is not a font bug, but something wrong in ConTeXt's math
handling.
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] 8+ messages in thread
* Re: math: ± and ∓ are shifted
2013-04-04 21:44 ` Aditya Mahajan
@ 2013-04-04 22:06 ` Hans Hagen
2013-04-04 22:13 ` Aditya Mahajan
0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2013-04-04 22:06 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 4/4/2013 11:44 PM, Aditya Mahajan wrote:
> On Thu, 4 Apr 2013, Xenia wrote:
>
>> Hi context list,
>>
>> I noticed that the ∓ sign is a little higher than the ± sign, so that
>> the + signs are at the same height. But this looks strange and should be
>> changed.
>
> Indeed. These look very odd. I tested this with cambria and the outcome
> is similar, so this is not a font bug, but something wrong in ConTeXt's
> math handling.
I'm not sure if I understand the issue
- lm has + and - touching with the + in the same position as the regular +
- cambria has a gap between + and - and moves the + up and down
Afaik context isn't doing any magic here as these are precomposed glyphs
that directly map.
$a \ruledhbox{$+$} b \ruledhbox{$-$} c$
$a \ruledhbox{$±$} b \ruledhbox{$∓$} c$
they are 'binary' in math mode, just like + and -
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] 8+ messages in thread
* Re: math: ± and ∓ are shifted
2013-04-04 22:06 ` Hans Hagen
@ 2013-04-04 22:13 ` Aditya Mahajan
2013-04-04 22:55 ` Hans Hagen
0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2013-04-04 22:13 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1248 bytes --]
On Fri, 5 Apr 2013, Hans Hagen wrote:
> On 4/4/2013 11:44 PM, Aditya Mahajan wrote:
>> On Thu, 4 Apr 2013, Xenia wrote:
>>
>>> Hi context list,
>>>
>>> I noticed that the ∓ sign is a little higher than the ± sign, so that
>>> the + signs are at the same height. But this looks strange and should be
>>> changed.
>>
>> Indeed. These look very odd. I tested this with cambria and the outcome
>> is similar, so this is not a font bug, but something wrong in ConTeXt's
>> math handling.
>
> I'm not sure if I understand the issue
>
> - lm has + and - touching with the + in the same position as the regular +
>
> - cambria has a gap between + and - and moves the + up and down
>
> Afaik context isn't doing any magic here as these are precomposed glyphs that
> directly map.
>
> $a \ruledhbox{$+$} b \ruledhbox{$-$} c$
>
> $a \ruledhbox{$±$} b \ruledhbox{$∓$} c$
>
> they are 'binary' in math mode, just like + and -
The question is not about the shape of the glyph, but their location.
But after looking at the output of latex for CM and Cambria, I am no
longer sure what the correct output should be. For Cambria, ConTeXt and
LaTeX give similar outputs. For CM/LM they give different outputs.
Aditya
[-- Attachment #2: Type: APPLICATION/pdf, Size: 16904 bytes --]
[-- Attachment #3: Type: APPLICATION/pdf, Size: 23470 bytes --]
[-- Attachment #4: 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] 8+ messages in thread
* Re: math: ± and ∓ are shifted
2013-04-04 22:13 ` Aditya Mahajan
@ 2013-04-04 22:55 ` Hans Hagen
2013-04-05 0:16 ` Khaled Hosny
0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2013-04-04 22:55 UTC (permalink / raw)
To: Aditya Mahajan; +Cc: mailing list for ConTeXt users, Boguslaw Jackowski
On 4/5/2013 12:13 AM, Aditya Mahajan wrote:
> On Fri, 5 Apr 2013, Hans Hagen wrote:
>
>> On 4/4/2013 11:44 PM, Aditya Mahajan wrote:
>>> On Thu, 4 Apr 2013, Xenia wrote:
>>>
>>>> Hi context list,
>>>>
>>>> I noticed that the ∓ sign is a little higher than the ± sign, so that
>>>> the + signs are at the same height. But this looks strange and
>>>> should be
>>>> changed.
>>>
>>> Indeed. These look very odd. I tested this with cambria and the outcome
>>> is similar, so this is not a font bug, but something wrong in ConTeXt's
>>> math handling.
>>
>> I'm not sure if I understand the issue
>>
>> - lm has + and - touching with the + in the same position as the
>> regular +
>>
>> - cambria has a gap between + and - and moves the + up and down
>>
>> Afaik context isn't doing any magic here as these are precomposed
>> glyphs that directly map.
>>
>> $a \ruledhbox{$+$} b \ruledhbox{$-$} c$
>>
>> $a \ruledhbox{$±$} b \ruledhbox{$∓$} c$
>>
>> they are 'binary' in math mode, just like + and -
>
> The question is not about the shape of the glyph, but their location.
> But after looking at the output of latex for CM and Cambria, I am no
> longer sure what the correct output should be. For Cambria, ConTeXt and
> LaTeX give similar outputs. For CM/LM they give different outputs.
it looks like the open type version has a fitting boundingbox while the
type 1 variants have a bit of the + sticking out:
\starttext
$x \ruledhbox{$\pm$} x \ruledhbox{$\mp$} x$
\stoptext
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] 8+ messages in thread
* Re: math: ± and ∓ are shifted
2013-04-04 22:55 ` Hans Hagen
@ 2013-04-05 0:16 ` Khaled Hosny
2013-04-05 7:32 ` Hans Hagen
0 siblings, 1 reply; 8+ messages in thread
From: Khaled Hosny @ 2013-04-05 0:16 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Boguslaw Jackowski
On Fri, Apr 05, 2013 at 12:55:40AM +0200, Hans Hagen wrote:
> On 4/5/2013 12:13 AM, Aditya Mahajan wrote:
> >On Fri, 5 Apr 2013, Hans Hagen wrote:
> >
> >>On 4/4/2013 11:44 PM, Aditya Mahajan wrote:
> >>>On Thu, 4 Apr 2013, Xenia wrote:
> >>>
> >>>>Hi context list,
> >>>>
> >>>>I noticed that the ∓ sign is a little higher than the ± sign, so that
> >>>>the + signs are at the same height. But this looks strange and
> >>>>should be
> >>>>changed.
> >>>
> >>>Indeed. These look very odd. I tested this with cambria and the outcome
> >>>is similar, so this is not a font bug, but something wrong in ConTeXt's
> >>>math handling.
> >>
> >>I'm not sure if I understand the issue
> >>
> >>- lm has + and - touching with the + in the same position as the
> >>regular +
> >>
> >>- cambria has a gap between + and - and moves the + up and down
> >>
> >>Afaik context isn't doing any magic here as these are precomposed
> >>glyphs that directly map.
> >>
> >>$a \ruledhbox{$+$} b \ruledhbox{$-$} c$
> >>
> >>$a \ruledhbox{$±$} b \ruledhbox{$∓$} c$
> >>
> >>they are 'binary' in math mode, just like + and -
> >
> >The question is not about the shape of the glyph, but their location.
> >But after looking at the output of latex for CM and Cambria, I am no
> >longer sure what the correct output should be. For Cambria, ConTeXt and
> >LaTeX give similar outputs. For CM/LM they give different outputs.
>
> it looks like the open type version has a fitting boundingbox while
> the type 1 variants have a bit of the + sticking out:
CFF fonts do not store bounding box info anywhere, the engine just
calculates it based on glyph outlines. For TFM fonts the metrics can be
adjusted to achieve specific alignment.
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] 8+ messages in thread
* Re: math: ± and ∓ are shifted
2013-04-05 0:16 ` Khaled Hosny
@ 2013-04-05 7:32 ` Hans Hagen
2013-04-05 13:46 ` Hans Hagen
0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2013-04-05 7:32 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Boguslaw Jackowski
On 4/5/2013 2:16 AM, Khaled Hosny wrote:
> On Fri, Apr 05, 2013 at 12:55:40AM +0200, Hans Hagen wrote:
>> On 4/5/2013 12:13 AM, Aditya Mahajan wrote:
>>> On Fri, 5 Apr 2013, Hans Hagen wrote:
>>>
>>>> On 4/4/2013 11:44 PM, Aditya Mahajan wrote:
>>>>> On Thu, 4 Apr 2013, Xenia wrote:
>>>>>
>>>>>> Hi context list,
>>>>>>
>>>>>> I noticed that the ∓ sign is a little higher than the ± sign, so that
>>>>>> the + signs are at the same height. But this looks strange and
>>>>>> should be
>>>>>> changed.
>>>>>
>>>>> Indeed. These look very odd. I tested this with cambria and the outcome
>>>>> is similar, so this is not a font bug, but something wrong in ConTeXt's
>>>>> math handling.
>>>>
>>>> I'm not sure if I understand the issue
>>>>
>>>> - lm has + and - touching with the + in the same position as the
>>>> regular +
>>>>
>>>> - cambria has a gap between + and - and moves the + up and down
>>>>
>>>> Afaik context isn't doing any magic here as these are precomposed
>>>> glyphs that directly map.
>>>>
>>>> $a \ruledhbox{$+$} b \ruledhbox{$-$} c$
>>>>
>>>> $a \ruledhbox{$±$} b \ruledhbox{$∓$} c$
>>>>
>>>> they are 'binary' in math mode, just like + and -
>>>
>>> The question is not about the shape of the glyph, but their location.
>>> But after looking at the output of latex for CM and Cambria, I am no
>>> longer sure what the correct output should be. For Cambria, ConTeXt and
>>> LaTeX give similar outputs. For CM/LM they give different outputs.
>>
>> it looks like the open type version has a fitting boundingbox while
>> the type 1 variants have a bit of the + sticking out:
>
> CFF fonts do not store bounding box info anywhere, the engine just
> calculates it based on glyph outlines. For TFM fonts the metrics can be
> adjusted to achieve specific alignment.
Sure, but one can 'cheat' with the boundingboxes as they're not cropboxes.
It's no big deal to adapt some metrics in mkiv, but best have the font
do the job.
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] 8+ messages in thread
* Re: math: ± and ∓ are shifted
2013-04-05 7:32 ` Hans Hagen
@ 2013-04-05 13:46 ` Hans Hagen
0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2013-04-05 13:46 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 4/5/2013 9:32 AM, Hans Hagen wrote:
> On 4/5/2013 2:16 AM, Khaled Hosny wrote:
>> On Fri, Apr 05, 2013 at 12:55:40AM +0200, Hans Hagen wrote:
>>> On 4/5/2013 12:13 AM, Aditya Mahajan wrote:
>>>> On Fri, 5 Apr 2013, Hans Hagen wrote:
>>>>
>>>>> On 4/4/2013 11:44 PM, Aditya Mahajan wrote:
>>>>>> On Thu, 4 Apr 2013, Xenia wrote:
>>>>>>
>>>>>>> Hi context list,
>>>>>>>
>>>>>>> I noticed that the ∓ sign is a little higher than the ± sign, so
>>>>>>> that
>>>>>>> the + signs are at the same height. But this looks strange and
>>>>>>> should be
>>>>>>> changed.
>>>>>>
>>>>>> Indeed. These look very odd. I tested this with cambria and the
>>>>>> outcome
>>>>>> is similar, so this is not a font bug, but something wrong in
>>>>>> ConTeXt's
>>>>>> math handling.
>>>>>
>>>>> I'm not sure if I understand the issue
>>>>>
>>>>> - lm has + and - touching with the + in the same position as the
>>>>> regular +
>>>>>
>>>>> - cambria has a gap between + and - and moves the + up and down
>>>>>
>>>>> Afaik context isn't doing any magic here as these are precomposed
>>>>> glyphs that directly map.
>>>>>
>>>>> $a \ruledhbox{$+$} b \ruledhbox{$-$} c$
>>>>>
>>>>> $a \ruledhbox{$±$} b \ruledhbox{$∓$} c$
>>>>>
>>>>> they are 'binary' in math mode, just like + and -
>>>>
>>>> The question is not about the shape of the glyph, but their location.
>>>> But after looking at the output of latex for CM and Cambria, I am no
>>>> longer sure what the correct output should be. For Cambria, ConTeXt and
>>>> LaTeX give similar outputs. For CM/LM they give different outputs.
>>>
>>> it looks like the open type version has a fitting boundingbox while
>>> the type 1 variants have a bit of the + sticking out:
>>
>> CFF fonts do not store bounding box info anywhere, the engine just
>> calculates it based on glyph outlines. For TFM fonts the metrics can be
>> adjusted to achieve specific alignment.
>
> Sure, but one can 'cheat' with the boundingboxes as they're not cropboxes.
>
> It's no big deal to adapt some metrics in mkiv, but best have the font
> do the job.
Experimental in beta:
\definefontfeature [lm-math] [mathdimensions=signs]
\starttext
\startTEXpage[offset=10pt]
$x \ruledhbox{$\pm$} x \ruledhbox{$\mp$} x$
\stopTEXpage
\stoptext
(explanation in font manual, not yet uploaded)
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] 8+ messages in thread
end of thread, other threads:[~2013-04-05 13:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-04 21:36 math: ± and ∓ are shifted Xenia
2013-04-04 21:44 ` Aditya Mahajan
2013-04-04 22:06 ` Hans Hagen
2013-04-04 22:13 ` Aditya Mahajan
2013-04-04 22:55 ` Hans Hagen
2013-04-05 0:16 ` Khaled Hosny
2013-04-05 7:32 ` Hans Hagen
2013-04-05 13:46 ` Hans Hagen
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).