ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Ulrike Fischer <news3@nililand.de>
To: ntg-context@ntg.nl
Subject: +ssty leads to wrong parentheses with stix2math fonts.
Date: Wed, 12 Jul 2017 10:00:15 +0200	[thread overview]
Message-ID: <1es3jot5xaoog.dlg@nililand.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 3459 bytes --]

The following is a context adaption of this tex.SX question:

https://tex.stackexchange.com/questions/380262/left-right-problem-with-stix-math-two-when-small-applied-to-the-group-luala

The problem is that with the stix 2 math fonts, parentheses don't
grow in a font with active +ssty feature when using luatex with the
context based fontloader. (With xelatex everything is fine, harfbuzz
seems to do it as wanted).

Below are two examples: One a mix of plain and context, and one with
a (shortened) typescript definition from a posting some weeks ago.
In both cases the parenthese in the second exponent is too small (I
attach an image, but don't know if it will come through).

Imho the source of the problem is that the font contains
parenleft.ssty, parenright.ssty, parenleft.ssty2 and
parenright.ssty2 glyphs and these "wins" when the fontloader is
looking for variants. The glyphs are *not* in the vvariants-list of
the parentheses. Other delimiters are not affected. 

[983731]={
   ["boundingbox"]={ 60, -205, 374, 787 },
   ["index"]=4286,
   ["name"]="parenleft.ssty",
   ["unicode"]=40,
   ["width"]=417,
  }

%%%%%%%% plain + context example:

\starttext

\font\STIXMx=file:stix2math.otf:mode=base;script=math;language=DFLT;
at 10pt
\font\STIXMix=file:stix2math.otf:mode=base;script=math;language=DFLT;
at 9pt
\font\STIXMixssty=file:stix2math.otf:mode=base;script=math;language=DFLT;+ssty=0;
at 9pt  
\font\STIXMv=file:stix2math.otf:mode=base;script=math;language=DFLT;
at 5pt

\textfont0=\STIXMx
\scriptfont0=\STIXMix
\scriptscriptfont0=\STIXMv

$\left({a\over b}\over {c\over d}\right)
 a^{\left({a\over b}\over {c\over d}\right)}
$


\textfont0=\STIXMx
\scriptfont0=\STIXMixssty
\scriptscriptfont0=\STIXMv

$\left({a\over b}\over {c\over d}\right)
 a^{\left({a\over b}\over {c\over d}\right)}
$

\stoptext


% with typescript definition 

\unprotect
\starttypescriptcollection[Stix2]

        \starttypescript [\s!serif] [Stix2] [\s!all]
                \definefontsynonym
            [Stix2Regular]
            [file:STIX2Text-Regular.otf]
        \definefontsynonym
            [Stix2Bold]
            [file:STIX2Text-Bold.otf]
        \definefontsynonym
            [Stix2Italic]
            [file:STIX2Text-Italic.otf]
        \definefontsynonym
            [Stix2BoldItalic]
            [file:STIX2Text-BoldItalic.otf]
        \definefontsynonym[\s!Serif] [Stix2Regular]
[\s!features=\s!default]
        \definefontsynonym[\s!SerifBold] [Stix2Bold]
[\s!features=\s!default]
        \definefontsynonym[\s!SerifItalic] [Stix2Italic]
[\s!features=\s!default]
        \definefontsynonym[\s!SerifBoldItalic] [Stix2BoldItalic]
[\s!features=\s!default]
    \stoptypescript

    \starttypescript [\s!math] [Stix2]
        \definefontsynonym
            [Stix2Math]
            [file:STIX2Math.otf]
            [features=math\mathsizesuffix]
        \definefontsynonym [\s!MathRoman] [Stix2Math]

[\s!features={\s!math\mathsizesuffix,mathextra,stixtwo-math-feature},\s!designsize=\s!auto]
    \stoptypescript

    \starttypescript [Stix2]
        \definetypeface [\typescriptone] [\s!rm] [\s!serif] [Stix2]
[\s!default]
        \definetypeface [\typescriptone] [\s!mm] [\s!math] [Stix2]
[\s!default]
    \stoptypescript

\stoptypescriptcollection

\protect

\setupbodyfont[Stix2]

\starttext

$\left({a\over b}\over {c\over d}\right)
 a^{\left({a\over b}\over {c\over d}\right)}
$

\stoptext


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

[-- Attachment #2: Attached file: context-ssty-problem.PNG --]
[-- Type: image/PNG, Size: 17427 bytes --]

[-- Attachment #3: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2017-07-12  8:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12  8:00 Ulrike Fischer [this message]
2017-07-12  9:01 ` Ulrike Fischer
2017-07-12  9:33   ` Hans Hagen
2017-07-12  9:41     ` Ulrike Fischer
2017-07-14 17:18     ` Ulrike Fischer
2017-07-14 17:35       ` Hans Hagen

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=1es3jot5xaoog.dlg@nililand.de \
    --to=news3@nililand.de \
    --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).