ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* frac opentype feature broken by \setbreakpoints[compound]
@ 2017-02-13 15:47 MF
  2017-02-14 12:35 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: MF @ 2017-02-13 15:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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] 2+ messages in thread

* Re: frac opentype feature broken by \setbreakpoints[compound]
  2017-02-13 15:47 frac opentype feature broken by \setbreakpoints[compound] MF
@ 2017-02-14 12:35 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2017-02-14 12:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
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] 2+ messages in thread

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-13 15:47 frac opentype feature broken by \setbreakpoints[compound] MF
2017-02-14 12: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).