1%D \module 2%D [ file=meta-fnt, 3%D version=2013.09.06, 4%D title=\METAPOST\ Graphics, 5%D subtitle=Fonts, 6%D author=Hans Hagen, 7%D date=\ currentdate, 8%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] 9%C 10%C This module is part of the \CONTEXT\ macro||package and is 11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for 12%C details. 13 14\writestatus{loading}{MetaPost Graphics / Fonts} 15 16\registerctxluafile{meta-fnt}{autosuffix} 17\registerctxluafile{font-mpf}{autosuffix} 18 19\unprotect 20 21%D Contrary to the \MKIV\ variant we dont' use the \LUA\ call but the \LUA\ call 22%D uses this here: 23 24\permanent\tolerant\protected\def\definemetafont[#1]#*[#2]#*[#3]% 25 {\doonlyonce{#2}{% 26 \definefontfeature[metafont-#2][metapost=#2] 27 \startMPcalculation{simplefun} input "#2" ; \stopMPcalculation 28 }% 29 \definefont[#1][Mono*metafont-#2 #3]} 30 31%D Demo: 32%D 33%D \starttyping 34%D \setupbodyfont[dejavu] 35%D \starttext 36%D \showglyphs 37%D \startTEXpage[offset=10pt] 38%D \definemetafont[MyDemoA][demo-symbols][at 10pt]\MyDemoA\char9754 39%D \definemetafont[MyDemoB][demo-symbols][at 30pt]\MyDemoB\char9754 40%D \stopTEXpage 41%D \stoptext 42%D \stoptyping 43 44\protect \endinput 45 |