summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkxl/meta-fnt.mkxl
blob: 45d1db2988ef9ccfaaa8330bd14ad43e9ec73d1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
%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