[NTG-context] outlined font using MetaFun

Jeong Dal haksan at me.com
Fri Feb 8 17:18:04 CET 2019


Dear all,

The following code which is borrowed from MetaFun manual is working nicely.

%%%%%%
\setupMPvariables[outlineT][tt="Hello"]
\startuseMPgraphic{outlineT}
  draw outlinetext.b (\MPvar{tt})
  (withcolor .5white)
  (withcolor .625blue withpen pencircle scaled .2pt)
  scaled 3 ;
\stopuseMPgraphic

\starttext
\useMPgraphic{outlineT}
\stoptext
%%%%%%%%

However, the next example is not working(without \setupMPvariables[]).

%%%%%%%
\startuseMPgraphic{outlineT}{tt}
  draw outlinetext.b (\MPvar{tt})
  (withcolor .5white)
  (withcolor .625blue withpen pencircle scaled .2pt)
  scaled 3 ;
\stopuseMPgraphic

\starttext
\useMPgraphic{outlineT}{tt=“Hello”}
\stoptext
%%%%%%%%

So, the trial to use above code for chapter title as following didn’t work either.
%%%%%%%%
\startuseMPgraphic{outlineT}{tt}
string tt;
  draw outlinetext.b (\MPvar{tt})
  (withcolor .5white)
  (withcolor .625blue withpen pencircle scaled .2pt)
  scaled 3 ;
\stopuseMPgraphic
\define[1]\myTest{\useMPgraphic{outlineT}{#1}}

\setuphead[chapter]
 [textcommand=\myTest,
 numbercommand=\myTest,
number=yes]
	
\starttext
\startchapter[title={First chapter}]

 Chapter

\stopchapter
\stoptext
%%%%%%%%%%%

Is there any way to make it work?

thank you.

Best regards,

Dalyoung



More information about the ntg-context mailing list