ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] How to override parts of a typescript
@ 2023-08-11 16:19 Vincent Hennebert
  2023-08-11 16:39 ` [NTG-context] " Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Hennebert @ 2023-08-11 16:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Say I want to use the Adobe Source font family in my document. They are installed on my system, but the file names are different to what’s in the typescript file provided with the ConTeXt distribution. If I do this:

    \starttypescript [serif] [source] [name]
      \definefontsynonym [Serif]           [file:SourceSerif4-Regular] [features=default]
      \definefontsynonym [SerifItalic]     [file:SourceSerif4-It]      [features=default]
      \definefontsynonym [SerifBold]       [file:SourceSerif4-Bold]    [features=default]
      \definefontsynonym [SerifBoldItalic] [file:SourceSerif4-BoldIt]  [features=default]
    \stoptypescript
    \setupbodyfont[source]
    \starttext
    I want this text to be typeset in Adobe Source Serif.
    \stoptext

Then I get what I want. The question is: can I move the \start/stoptypescript code into its own typescript file that would somehow refer to the official one and override only what’s needed? Or is the only solution to just copy the whole file and tweak what I need?

I found some thread in the mailing list archive relating to this but it’s more than 15 years old. Maybe things have changed since then.

Thanks,  
Vincent
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [NTG-context] Re: How to override parts of a typescript
  2023-08-11 16:19 [NTG-context] How to override parts of a typescript Vincent Hennebert
@ 2023-08-11 16:39 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2023-08-11 16:39 UTC (permalink / raw)
  To: ntg-context

On 8/11/2023 6:19 PM, Vincent Hennebert wrote:
> Say I want to use the Adobe Source font family in my document. They are installed on my system, but the file names are different to what’s in the typescript file provided with the ConTeXt distribution. If I do this:
> 
>      \starttypescript [serif] [source] [name]
>        \definefontsynonym [Serif]           [file:SourceSerif4-Regular] [features=default]
>        \definefontsynonym [SerifItalic]     [file:SourceSerif4-It]      [features=default]
>        \definefontsynonym [SerifBold]       [file:SourceSerif4-Bold]    [features=default]
>        \definefontsynonym [SerifBoldItalic] [file:SourceSerif4-BoldIt]  [features=default]
>      \stoptypescript
>      \setupbodyfont[source]
>      \starttext
>      I want this text to be typeset in Adobe Source Serif.
>      \stoptext
> 
> Then I get what I want. The question is: can I move the \start/stoptypescript code into its own typescript file that would somehow refer to the official one and override only what’s needed? Or is the only solution to just copy the whole file and tweak what I need?
> 
> I found some thread in the mailing list archive relating to this but it’s more than 15 years old. Maybe things have changed since then.
Here is a cheat:

\definefontfile[file:SourceSerifPro-Regular][file:SourceSerif4-Regular]

before you enable the bodyfont (can be in your document style).

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-11 16:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-11 16:19 [NTG-context] How to override parts of a typescript Vincent Hennebert
2023-08-11 16:39 ` [NTG-context] " 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).