On 4/18/2023 3:52 PM, Pawel Urbanski via ntg-context wrote:
Hi Hans,
I will write what I want to acomplish. While it is definitely thrivial, I'm either missing something obvious or more experienced users suffer from the curse of knowledge.

I want ot use Roboto Flex for my chapter and section heads with Garamond Premier for the body contents.

I followed the Context wiki example and consistant examples from the web.

Here is my code:
\usemodule[fonts-variable]
\definefontfamily[roboto-flex][ss][rotoboflex]
% robotoflex.ttf is the recognized font file name.
\setuphead[chapter]
[style={\switchtobodyfont[roboto-flex,20pt]\ss}]

While the Garamond is embedded and text is styled, the chapter tible is typeset with Garamond not Roboto.

Any hints or feed back will be very appriciated.
\usetypescriptfile[ebgaramond]

\starttypescript [sans] [robotoflex]
    \setups[font:fallback:sans]
    \definefontsynonym [Sans]          [name:robotoflexregular]
    \definefontsynonym [SansItalic]    [name:robotoflexregularitalic]
    \definefontsynonym [SansBold]      [name:robotoflexregularbold]
    \definefontsynonym [SansBoldItalic][name:robotoflexregularbolditalic]
\stoptypescript

\starttypescript[robocop]
\definetypeface [\typescriptone] [rm] [serif] [ebgaramond] [default] \definetypeface [\typescriptone] [ss] [sans] [robotoflex] [default] \definetypeface [\typescriptone] [tt] [mono] [dejavu] [default] [rscale=0.8]
    \definetypeface [\typescriptone] [mm] [math]  [ebgaramond] [default]
\stoptypescript

\setupbodyfont[robocop]

\setuphead[chapter][style=\ssbfd]

\starttext

    \startchapter[title=Whatever]
        \input tufte
    \stopchapter

    \page

    \usemodule[fonts-variable]

    \showfontvariations[font=file:robotoflex.ttf]

\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 / 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
___________________________________________________________________________________

Reply via email to