ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Additional font variants
@ 2021-08-01 17:33 Henning Hraban Ramm via ntg-context
  2021-08-01 18:19 ` Wolfgang Schuster via ntg-context
  0 siblings, 1 reply; 4+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2021-08-01 17:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-01 22:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-01 17:33 Additional font variants Henning Hraban Ramm via ntg-context
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

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).