ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Matthew McCabe via ntg-context <ntg-context@ntg.nl>
Cc: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Subject: Re: Non-standard font alternatives
Date: Wed, 14 Dec 2022 19:02:54 +0100	[thread overview]
Message-ID: <fa873429-9996-95be-df00-27447d2a9344@gmail.com> (raw)
In-Reply-To: <3AA1AF9A-D024-44A5-A568-2A1C14900BE5@icloud.com>

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 
> (https://tex.stackexchange.com/questions/303648/context-font-weights) 
> 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 
> https://fonts.google.com/specimen/Roboto
> 
> 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]
> \stoptypescript
> 
> \definetypeface[roboto][rm][sans][roboto][default]

Replace [rm] with [ss]:

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

Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________

      parent reply	other threads:[~2022-12-14 18:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13  8:15 Matthew McCabe via ntg-context
2022-12-13  8:53 ` Hans Hagen via ntg-context
2022-12-14 10:49   ` Matthew McCabe via ntg-context
2023-01-06  7:55     ` Hans Hagen via ntg-context
2023-04-19 14:53       ` [NTG-context] " Pawel Urbanski via ntg-context
2023-04-19 16:52         ` Henning Hraban Ramm via ntg-context
2023-04-19 18:02           ` Pawel Urbanski via ntg-context
2023-04-19 19:24         ` Henning Hraban Ramm via ntg-context
2023-04-19 21:57           ` Pawel Urbanski via ntg-context
2023-04-20 21:34           ` Pawel Urbanski via ntg-context
2022-12-14 18:02 ` Wolfgang Schuster via ntg-context [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=fa873429-9996-95be-df00-27447d2a9344@gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=wolfgang.schuster.lists@gmail.com \
    /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).