ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* +ssty leads to wrong parentheses with stix2math fonts.
@ 2017-07-12  8:00 Ulrike Fischer
  2017-07-12  9:01 ` Ulrike Fischer
  0 siblings, 1 reply; 6+ messages in thread
From: Ulrike Fischer @ 2017-07-12  8:00 UTC (permalink / raw)
  To: ntg-context

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

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

end of thread, other threads:[~2017-07-14 17:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12  8:00 +ssty leads to wrong parentheses with stix2math fonts Ulrike Fischer
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

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