Matthew McCabe via ntg-context schrieb am 13.12.2022 um 09:15:
Hi list,

I'm looking to import a font with medium and light weights (in this case Roboto) and define font alternatives so one can quickly switch to light text just as one would switch to bold text. There is a stackexchange answer from Wolfgang ( which details a solution to this problem for ConTeXt MkIV but despite my best efforts I haven't been able to get things to work for me. There is the Roboto typescript example on ConTeXt garden but it isn't exactly what I'm looking for as for the document I'm making I would prefer to be able to treat the font weights as alternatives rather than separate families since I will be switching often.

One can download the exact set of fonts I am using from

Here is my code:


\starttypescript [sans] [roboto]
   \definebodyfont [default] [rm]

Replace [rm] with [ss]:

\definebodyfont [default] [ss]

      [lf=SansLight sa 1,
       li=SansLightItalic sa 1,
       tf=Sans sa 1,
       it=SansItalic sa 1,
       md=SansMedium sa 1,
       mi=SansMediumItalic sa 1,
       bf=SansBold sa 1,
       bi=SansBoldItalic sa 1,
       sc=SansCaps sa 1]


Replace [rm] with [ss]:

\definetypeface [roboto] [ss] [sans] [roboto] [default]

If your question is of interest to others as well, please add an entry to the 

maillist : /
webpage  : /
archive  :
wiki     :

Reply via email to