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

* Re: +ssty leads to wrong parentheses with stix2math fonts.
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Ulrike Fischer @ 2017-07-12  9:01 UTC (permalink / raw)
  To: ntg-context

Am Wed, 12 Jul 2017 10:00:15 +0200 schrieb Ulrike Fischer:

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

Addition: There is also a bug report on stix-site. 

https://sourceforge.net/p/stixfonts/tracking/86/

(But I don't know if it is really a bug in the font as xelatex with
harfbuzz has no problems.) 



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

___________________________________________________________________________________
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

* Re: +ssty leads to wrong parentheses with stix2math fonts.
  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
  0 siblings, 2 replies; 6+ messages in thread
From: Hans Hagen @ 2017-07-12  9:33 UTC (permalink / raw)
  To: news3, mailing list for ConTeXt users

On 7/12/2017 11:01 AM, Ulrike Fischer wrote:
> Am Wed, 12 Jul 2017 10:00:15 +0200 schrieb Ulrike Fischer:
> 
>> 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).
> 
> Addition: There is also a bug report on stix-site.
> 
> https://sourceforge.net/p/stixfonts/tracking/86/
> 
> (But I don't know if it is really a bug in the font as xelatex with
> harfbuzz has no problems.)
I don't know what harfbuzz does but the font definitely does some ssty 
mapping to rather simple glyphs with no extensible parts so basically 
it's a font bug. If xetex catches it, find but it's still a bug. Anyway, 
the previous mail with the patch checks for al three 'missing' fields so 
this is basically the same issue. If not, let me know.

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: +ssty leads to wrong parentheses with stix2math fonts.
  2017-07-12  9:33   ` Hans Hagen
@ 2017-07-12  9:41     ` Ulrike Fischer
  2017-07-14 17:18     ` Ulrike Fischer
  1 sibling, 0 replies; 6+ messages in thread
From: Ulrike Fischer @ 2017-07-12  9:41 UTC (permalink / raw)
  To: ntg-context

Am Wed, 12 Jul 2017 11:33:22 +0200 schrieb Hans Hagen:

>> (But I don't know if it is really a bug in the font as xelatex with
>> harfbuzz has no problems.)

> I don't know what harfbuzz does but the font definitely does some ssty 
> mapping to rather simple glyphs with no extensible parts so basically 
> it's a font bug. If xetex catches it, find but it's still a bug. Anyway, 
> the previous mail with the patch checks for al three 'missing' fields so 
> this is basically the same issue. If not, let me know.

I will check the code in the evening (and also try out if I can
inject it in luaotfload). 

But on the whole I tried to avoid to work around bugs too much - in
the end one pay with too complicated code. If it is a font bug then
one should try to resolve the issue there. 



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

___________________________________________________________________________________
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

* Re: +ssty leads to wrong parentheses with stix2math fonts.
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Ulrike Fischer @ 2017-07-14 17:18 UTC (permalink / raw)
  To: ntg-context

Am Wed, 12 Jul 2017 11:33:22 +0200 schrieb Hans Hagen:

> Anyway, the previous mail with the patch checks for al three
> 'missing' fields so this is basically the same issue. If not, let
> me know.

As far as I can the patch works fine. I even was able to include it
in the latex fontloaders (with a small glitch, so my earlier post).

Will it be part of the next beta? 
 

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

___________________________________________________________________________________
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

* Re: +ssty leads to wrong parentheses with stix2math fonts.
  2017-07-14 17:18     ` Ulrike Fischer
@ 2017-07-14 17:35       ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2017-07-14 17:35 UTC (permalink / raw)
  To: ntg-context

On 7/14/2017 7:18 PM, Ulrike Fischer wrote:
> Am Wed, 12 Jul 2017 11:33:22 +0200 schrieb Hans Hagen:
> 
>> Anyway, the previous mail with the patch checks for al three
>> 'missing' fields so this is basically the same issue. If not, let
>> me know.
> 
> As far as I can the patch works fine. I even was able to include it
> in the latex fontloaders (with a small glitch, so my earlier post).
> 
> Will it be part of the next beta?
The patch I sent you? Sure.

In fact there have been some changes last weeks that will be in there 
too. I'm testing some complex issues with idris so in the process there 
have been some performance improvements for the more extreme complex 
fonts - which is sort of tricky to test - and a few obscure fixes due to 
the fact that we check the current and upcoming husayni fonts against 
uniscribe and so. But best let the context users (and Idris) suffer from 
possible issues first (a bit faster update/fix cycle for such cases).

(Often performance improvements are mostly obscured by the rest of what 
happens.)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://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).