frac opentype feature broken by \setbreakpoints[compound]
![](https://secure.gravatar.com/avatar/114f07f31e228d83eece631b0937df73.jpg?s=120&d=mm&r=g)
Hello list, I found an interference between the "frac" opentype feature and \setbreakpoints[compound], which make the former fail when you have a numerator more than 2 digit wide. I found it with Adobe Garamond Premier Pro: with \setbreakpoints[compound], when the fraction had a 3-digit (or more) numerator, the denominator stayed high as the numerator (like a superscript). Here I replaced Garamond Premier Pro with the freely available "Lato" font, to let you reproduce the problem. The outcome is different, but still erroneous: \setbreakpoints[compound] makes ConTeXt ignore the "frac" feature at all. Please try this: \definefontfeature[frac][frac=yes] \definefontfamily[default][rm][lato][features=frac] \setupbodyfont[default,rm,11pt] \setbreakpoints[compound] \starttext \addff{frac} 1/3, 1/100, 1/1000, {\setbreakpoints[reset]1633/100}, 2345/12. \stoptext A workaround is a local \setbreakpoints[reset] limited to the fraction. Best regards, Massi
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 2/13/2017 4:47 PM, MF wrote:
Hello list, I found an interference between the "frac" opentype feature and \setbreakpoints[compound], which make the former fail when you have a numerator more than 2 digit wide.
I found it with Adobe Garamond Premier Pro: with \setbreakpoints[compound], when the fraction had a 3-digit (or more) numerator, the denominator stayed high as the numerator (like a superscript).
Here I replaced Garamond Premier Pro with the freely available "Lato" font, to let you reproduce the problem. The outcome is different, but still erroneous: \setbreakpoints[compound] makes ConTeXt ignore the "frac" feature at all.
Please try this:
\definefontfeature[frac][frac=yes] \definefontfamily[default][rm][lato][features=frac] \setupbodyfont[default,rm,11pt]
\setbreakpoints[compound]
\starttext
\addff{frac} 1/3, 1/100, 1/1000, {\setbreakpoints[reset]1633/100}, 2345/12.
\stoptext
A workaround is a local \setbreakpoints[reset] limited to the fraction.
i'll add this: \definefontfeature[f:fractions][frac=yes] \definealternativestyle [fractions] [\setfractions\resetbreakpoints] [\setfractions\resetbreakpoints] \unexpanded\def\setfractions{\doaddfeature{f:fractions}} \addff{frac} 1/3, 1/100, 1/1000, {\resetbreakpoints 1633/100}, 2345/12. \fractions{1/3, 1/100, 1/1000, 1633/100, 2345/12}. Keep in mind that often the fractions feature sis incomplete and can even give weird side effects when applied to a whole stretch of text so limiting the scope is wise anyway 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
-
MF