%%%%%
\definefontfeature
[korean-base]
[goodies=hanbatanglvt,
 colorscheme=default,
 mode=node,
 script=hang,
 language=kor]

\definefont[KoreanFont][hanbatanglvt*korean-base]

\starttext

\startMPdefinitions
  string KoreanColors[] ;

  KoreanColors[1] := "darkred" ;
  KoreanColors[2] := "darkgreen" ;
  KoreanColors[3] := "darkblue" ;
  KoreanColors[4] := "darkyellow" ;
  KoreanColors[5] := "darkgray" ;

  def KoreanOutline(expr txt) =
      picture p ; p := outlinetext.p(txt) ;
      numeric n ; n := 0 ;
      string old, new ; old := "" ;
      for i within p :
          new := prescriptpart i ;
          if (new = "") or (new <> old) :
              old := new ;
              n := n + 1 ;
              if unknown KoreanColors[n] :
                  n := 1 ;
              fi ;
          fi ;
          draw pathpart i
              withpen pencircle scaled 1/10
              withcolor KoreanColors[n] ;
      endfor ;
  enddef ;
\stopMPdefinitions
  % entered as three characters: ᄅ  ᅡ  ᆺ (mail collapses)
\startMPpage
  KoreanOutline("\KoreanFont 랏") ;
\stopMPpage
\startMPpage
  KoreanOutline("\KoreanFont 논") ;
\stopMPpage
\startMPpage
  KoreanOutline("\KoreanFont 왕") ;
\stopMPpage
\startMPpage
  KoreanOutline("\KoreanFont 닭") ;
\stopMPpage
\startMPpage
  KoreanOutline("\KoreanFont 박") ;
\stopMPpage
\startMPpage
  KoreanOutline("\KoreanFont 서") ;
\stopMPpage

%%%%%%%%%