From: Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Henning Hraban Ramm <texml@fiee.net>
Subject: Additional font variants
Date: Sun, 1 Aug 2021 19:33:27 +0200 [thread overview]
Message-ID: <FC39BC38-E562-4177-840D-80E3CCD80B9D@fiee.net> (raw)
Hi, I’m trying to set up a “handwriting” font.
In the example below I’m using Comic Sans, because probably everyone has it available, IRL I’m using the commercial “Supernett Cn” that has more styles. (Also, I’m using Alegreya Serif + Sans.)
If I name it "ss/sans/Sans", it works as expected, but with "hw/handwriting/Handwriting" it only uses the regular font, never other styles.
"mtxrun --script fonts ..." shows that the configured files are found.
Is this a limitation in ConTeXt, or what did I wrong?
Hraban
\starttypescript [handwriting] [comicsans]
%\setups[font:fallback:serif]
\definefontsynonym[ComicSans-Regular] [file:comic.ttf]
\definefontsynonym[ComicSans-Italic] [file:comicbd.ttf]
\definefontsynonym[ComicSans-Bold] [file:comicbd.ttf]
\definefontsynonym[ComicSans-BoldItalic] [file:comicbd.ttf]
\stoptypescript
\starttypescript [handwriting] [comicsans] [name]
%\setups[font:fallback:handwriting]
\definefontsynonym [Handwriting] [ComicSans-Regular] [features=default]
\definefontsynonym [HandwritingItalic] [ComicSans-Italic] [features=default]
\definefontsynonym [HandwritingBold] [ComicSans-Bold] [features=default]
\definefontsynonym [HandwritingBoldItalic] [ComicSans-BoldItalic] [features=default]
\stoptypescript
\starttypescript [ka]
\definetypeface [ka] [rm] [serif] [modern] [default]
\definetypeface [ka] [ss] [sans] [modern] [default]
\definetypeface [ka] [tt] [mono] [modern] [default]
\definetypeface [ka] [mm] [math] [modern] [default]
\definetypeface [ka] [hw] [handwriting] [comicsans] [default]
\stoptypescript
\setupbodyfont[ka,rm,18pt]
\setupbodyfontenvironment[default][em=italicface]
\definehighlight[emph][style={\em}]
\definehighlight[strong][style=boldface]
\starttext
\startbuffer
Some Text \emph{emphasized} normal \strong{strong} \emph{emph \emph{inner emph} end}.
\stopbuffer
\getbuffer
{\switchtobodyfont[ss]\getbuffer}
{\hw\getbuffer}
{\switchtobodyfont[hw]\getbuffer}
\stoptext
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2021-08-01 17:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-01 17:33 Henning Hraban Ramm via ntg-context [this message]
2021-08-01 18:19 ` Wolfgang Schuster via ntg-context
2021-08-01 20:14 ` Hans Hagen via ntg-context
2021-08-01 22:35 ` Henning Hraban Ramm via ntg-context
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=FC39BC38-E562-4177-840D-80E3CCD80B9D@fiee.net \
--to=ntg-context@ntg.nl \
--cc=texml@fiee.net \
/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).