ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: frac opentype feature broken by \setbreakpoints[compound]
Date: Tue, 14 Feb 2017 13:35:02 +0100	[thread overview]
Message-ID: <34b75ebc-c21d-951d-e3ec-eaf315c6ddf3@wxs.nl> (raw)
In-Reply-To: <1487000874.19621.1.camel@fastwebnet.it>

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
___________________________________________________________________________________

      reply	other threads:[~2017-02-14 12:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13 15:47 MF
2017-02-14 12:35 ` Hans Hagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34b75ebc-c21d-951d-e3ec-eaf315c6ddf3@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).