+ssty leads to wrong parentheses with stix2math fonts.
The following is a context adaption of this tex.SX question: https://tex.stackexchange.com/questions/380262/left-right-problem-with-stix-... 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/
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/
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,
On 7/12/2017 11:01 AM, Ulrike Fischer wrote: 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 -----------------------------------------------------------------
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/
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/
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Ulrike Fischer