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
___________________________________________________________________________________

Reply via email to