%D \module
%D   [       file=meta-fnt,
%D        version=2013.09.06,
%D          title=\METAPOST\ Graphics,
%D       subtitle=Fonts,
%D         author=Hans Hagen,
%D           date=\ currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{loading}{MetaPost Graphics / Fonts}

\registerctxluafile{meta-fnt}{autosuffix}
\registerctxluafile{font-mpf}{autosuffix}

\unprotect

%D Contrary to the \MKIV\ variant we dont' use the \LUA\ call but the \LUA\ call
%D uses this here:

\permanent\tolerant\protected\def\definemetafont[#1]#*[#2]#*[#3]%
  {\doonlyonce{#2}{%
     \definefontfeature[metafont-#2][metapost=#2]
     \startMPcalculation{simplefun} input "#2" ; \stopMPcalculation
   }%
   \definefont[#1][Mono*metafont-#2 #3]}

%D Demo:
%D
%D \starttyping
%D \setupbodyfont[dejavu]
%D \starttext
%D \showglyphs
%D \startTEXpage[offset=10pt]
%D     \definemetafont[MyDemoA][demo-symbols][at 10pt]\MyDemoA\char9754
%D     \definemetafont[MyDemoB][demo-symbols][at 30pt]\MyDemoB\char9754
%D \stopTEXpage
%D \stoptext
%D \stoptyping

\protect \endinput
