ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* font feature
@ 2021-07-08  7:46 Thomas A. Schmitz
  2021-07-08 21:33 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas A. Schmitz @ 2021-07-08  7:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Hi all,

is it possible to subtract a featureset that has been applied to a 
fontfamily? MWE:

\definefontfeature
   [f:frac]
   [frac=yes,onum=no,pnum=no]

\definefontfeature
   [f:onum]
   [onum=yes,pnum=yes]

\definefontfamily [test] [serif] [AntykwaTorunska] [features=f:onum]
\definefontfamily [test] [sans]  [Myriad Pro]
\definefontfamily [test] [mono]  [DejaVu Sans Mono]
\definefontfamily [test] [math]  [Xits Math]

\setupbodyfont[test,12pt]

\starttext

Mozarts erster Satz ist ein
{\subtractfeature[f:test]\addfeature[f:frac]4/4}-Takt, Beethoven wählt 
einen Dreiertakt, Mozarts Romanze ist ein 3/8-Takt, Beethoven wählt 
einen 2/4,
Mozarts Rondo ist eine Gavotte im 2/2-Takt, Beethoven schreibt ein 
Jagdrondo im 6/8-Takt.

\stoptext

If I comment out the part [features=f:onum], I get the fractions that 
I'm looking for, but it seems that I can't get the same effect with 
\subtractfeature and \addfeature. I'm confused...

Thanks and all best

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

* Re: font feature
  2021-07-08  7:46 font feature Thomas A. Schmitz
@ 2021-07-08 21:33 ` Hans Hagen
  2021-07-09  8:04   ` Thomas A. Schmitz
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2021-07-08 21:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Thomas A. Schmitz

On 7/8/2021 9:46 AM, Thomas A. Schmitz wrote:
> 
> Hi all,
> 
> is it possible to subtract a featureset that has been applied to a 
> fontfamily? MWE:
> 
> \definefontfeature
>    [f:frac]
>    [frac=yes,onum=no,pnum=no]
> 
> \definefontfeature
>    [f:onum]
>    [onum=yes,pnum=yes]
> 
> \definefontfamily [test] [serif] [AntykwaTorunska] [features=f:onum]
> \definefontfamily [test] [sans]  [Myriad Pro]
> \definefontfamily [test] [mono]  [DejaVu Sans Mono]
> \definefontfamily [test] [math]  [Xits Math]
> 
> \setupbodyfont[test,12pt]
> 
> \starttext
> 
> Mozarts erster Satz ist ein
> {\subtractfeature[f:test]\addfeature[f:frac]4/4}-Takt, Beethoven wählt 
> einen Dreiertakt, Mozarts Romanze ist ein 3/8-Takt, Beethoven wählt 
> einen 2/4,
> Mozarts Rondo ist eine Gavotte im 2/2-Takt, Beethoven schreibt ein 
> Jagdrondo im 6/8-Takt.
> 
> \stoptext
> 
> If I comment out the part [features=f:onum], I get the fractions that 
> I'm looking for, but it seems that I can't get the same effect with 
> \subtractfeature and \addfeature. I'm confused...
you forgot the 'default' so you basically force basemode which is does 
permanent features .. add/subtract works only in node mode

\definefontfeature
   [f:onum]
   [onum=yes,pnum=yes]

\definefontfamily [test] [serif] [AntykwaTorunska] 
[features={default,f:onum}]
\definefontfamily [test] [sans]  [Myriad Pro]
\definefontfamily [test] [mono]  [DejaVu Sans Mono]
\definefontfamily [test] [math]  [Xits Math]

\setupbodyfont[test,12pt]

\starttext
     test 1 2 3 test 1/2 \subtractfeature[f:onum] test 1 2 3 test 1/2
\stoptext




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

* Re: font feature
  2021-07-08 21:33 ` Hans Hagen
@ 2021-07-09  8:04   ` Thomas A. Schmitz
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas A. Schmitz @ 2021-07-09  8:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> On 8. Jul 2021, at 23:33, Hans Hagen <j.hagen@xs4all.nl> wrote:
> 
> you forgot the 'default' so you basically force basemode which is does permanent features .. add/subtract works only in node mode
> 
> \definefontfeature
>  [f:onum]
>  [onum=yes,pnum=yes]
> 
> \definefontfamily [test] [serif] [AntykwaTorunska] [features={default,f:onum}]
> \definefontfamily [test] [sans]  [Myriad Pro]
> \definefontfamily [test] [mono]  [DejaVu Sans Mono]
> \definefontfamily [test] [math]  [Xits Math]
> 
> \setupbodyfont[test,12pt]
> 
> \starttext
>    test 1 2 3 test 1/2 \subtractfeature[f:onum] test 1 2 3 test 1/2
> \stoptext

Thank you, Hans, this works! I’m looking for a place to add this information to the “featuresets” page on the wiki, will do this soon!

All best

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

end of thread, other threads:[~2021-07-09  8:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08  7:46 font feature Thomas A. Schmitz
2021-07-08 21:33 ` Hans Hagen
2021-07-09  8:04   ` Thomas A. Schmitz

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