ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Fonts from various .otf to work with \bold, \emph, \bf, \bfa ...
Date: Fri, 7 Feb 2020 22:58:39 +0100	[thread overview]
Message-ID: <D4E926F1-B248-4C85-8485-E4386DB39844@fiee.net> (raw)
In-Reply-To: <cab4123c-6645-5259-3142-83ebc3a357c2@gmx.es>


> "\definefont[Test][file:your-font-file.otf]" should work, but I never
> used this approach.
> 
> I think you need to mix fonts into a typeface with something similar to
> a typescript (but this is all Greek to me).


Here’s an example of a simple typescript using "file":


\definefontfeature[smallcaps][default][smcp=yes]

\starttypescriptcollection[charis]

    \starttypescript [serif] [charis]
        \definefontsynonym [Charis-Roman]       [file:CharisSIL-R.ttf]
        \definefontsynonym [Charis-Italic]      [file:CharisSIL-I.ttf]
        \definefontsynonym [Charis-Bold]        [file:CharisSIL-B.ttf]
        \definefontsynonym [Charis-BoldItalic]  [file:CharisSIL-BI.ttf]
        \definefontsynonym [Charis-Roman-Caps]  [Charis-Roman]
    \stoptypescript

    \starttypescript [serif] [charis] [name]
        \setups[font:fallback:serif]
        \definefontsynonym [Serif]            [Charis-Roman][features=default]
        \definefontsynonym [SerifItalic]      [Charis-Italic][features=default]
        \definefontsynonym [SerifBold]        [Charis-Bold][features=default]
        \definefontsynonym [SerifBoldItalic]  [Charis-BoldItalic][features=default]
        \definefontsynonym [SerifSlanted]     [Charis-Italic][features=default]
        \definefontsynonym [SerifBoldSlanted] [Charis-BoldItalic][features=default]
        \definefontsynonym [SerifCaps]        [Charis-Roman-Caps][features=smallcaps]
    \stoptypescript


\starttypescript [charis] % doesn’t make a lot of sense
  \definetypeface [charis] [rm] [serif] [charis] [default]
  \definetypeface [charis] [ss] [sans]  [heros]  [default]
  \definetypeface [charis] [tt] [mono]  [modern]   [default]
  \definetypeface [charis] [mm] [math]  [default]   [default]
\stoptypescript


\stoptypescriptcollection



Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

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

  reply	other threads:[~2020-02-07 21:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06  9:04 context
2020-02-06 19:24 ` Pablo Rodriguez
2020-02-07  7:34   ` context
2020-02-07 20:22     ` Pablo Rodriguez
2020-02-07 21:58       ` Henning Hraban Ramm [this message]
2020-02-08 11:49       ` Wolfgang Schuster

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=D4E926F1-B248-4C85-8485-E4386DB39844@fiee.net \
    --to=texml@fiee.net \
    --cc=ntg-context@ntg.nl \
    /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).