diff options
author | Hans Hagen <pragma@wxs.nl> | 2021-01-17 22:49:53 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2021-01-17 22:49:53 +0100 |
commit | 95686a1754b3cf4f1410d6a52aeb86b65033a96c (patch) | |
tree | e5a5b9c091e2722d8bc7b20d3ad0952055b70dab /metapost | |
parent | 980ad5b78d69aa8abfb093c7e6729b0024ce0b49 (diff) | |
download | context-95686a1754b3cf4f1410d6a52aeb86b65033a96c.tar.gz |
2021-01-17 21:42:00
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mpxl/mp-lmtx.mpxl | 5 | ||||
-rw-r--r-- | metapost/context/base/mpxl/mp-luas.mpxl | 5 | ||||
-rw-r--r-- | metapost/context/base/mpxl/mp-math.mpxl | 40 | ||||
-rw-r--r-- | metapost/context/fonts/mpiv/punkfont-characters.mp | 19 |
4 files changed, 40 insertions, 29 deletions
diff --git a/metapost/context/base/mpxl/mp-lmtx.mpxl b/metapost/context/base/mpxl/mp-lmtx.mpxl index 28fdb1417..88a0450d6 100644 --- a/metapost/context/base/mpxl/mp-lmtx.mpxl +++ b/metapost/context/base/mpxl/mp-lmtx.mpxl @@ -2219,10 +2219,7 @@ def lmt_registerglyphs = applyparameters "mpsglyphs" "lmt_do_registerglyphs" end def lmt_registerglyph = applyparameters "mpsglyph" "lmt_do_registerglyph" enddef ; newscriptindex mfid_registerglyphs ; mfid_registerglyphs := scriptindex "registerglyphs" ; def lmt_do_registerglyphs = runscript mfid_registerglyphs enddef ; -newscriptindex mfid_registerglyph ; mfid_registerglyph := scriptindex "registerglyph " ; def lmt_do_registerglyph = runscript mfid_registerglyph enddef ; - -% vardef lmt_do_registerglyphs = lua.mp.lmt_register_glyphs() ; enddef ; -% vardef lmt_do_registerglyph = lua.mp.lmt_register_glyph () ; enddef ; +newscriptindex mfid_registerglyph ; mfid_registerglyph := scriptindex "registerglyph" ; def lmt_do_registerglyph = runscript mfid_registerglyph enddef ; % Again an experiment (todo: the faster method): diff --git a/metapost/context/base/mpxl/mp-luas.mpxl b/metapost/context/base/mpxl/mp-luas.mpxl index c13db4d59..9ea130d35 100644 --- a/metapost/context/base/mpxl/mp-luas.mpxl +++ b/metapost/context/base/mpxl/mp-luas.mpxl @@ -215,16 +215,19 @@ permanent inpath, pointof, leftof, rightof ; extra_endfig := extra_endfig & " runscript mfid_path_reset ; " ; +newscriptindex mfid_utfnum ; mfid_utfnum := scriptindex "utfnum" ; newscriptindex mfid_utflen ; mfid_utflen := scriptindex "utflen" ; newscriptindex mfid_utfsub ; mfid_utfsub := scriptindex "utfsub" ; +% def utfnum = runscript mfid_utfnum enddef ; % def utflen = runscript mfid_utflen enddef ; % def utfsub = runscript mfid_utfsub enddef ; +vardef utfnum(expr s) = runscript mfid_utfnum s enddef ; % str vardef utflen(expr s) = runscript mfid_utflen s enddef ; % str vardef utfsub(text t) = runscript mfid_utfsub t enddef ; % str, first, (optional) last -permanent utflen, utfsub ; +permanent utfnum, utflen, utfsub ; newscriptindex mfid_getparameters ; mfid_getparameters := scriptindex "getparameters" ; newscriptindex mfid_presetparameters ; mfid_presetparameters := scriptindex "presetparameters" ; diff --git a/metapost/context/base/mpxl/mp-math.mpxl b/metapost/context/base/mpxl/mp-math.mpxl index c2723b0f6..cfe9e55e6 100644 --- a/metapost/context/base/mpxl/mp-math.mpxl +++ b/metapost/context/base/mpxl/mp-math.mpxl @@ -79,27 +79,27 @@ newscriptindex mfid_m_yz ; mfid_m_yz := scriptindex "m_y0" newscriptindex mfid_m_y ; mfid_m_y := scriptindex "m_y1" ; def m_y = runscript mfid_m_y enddef ; % y1 newscriptindex mfid_m_yn ; mfid_m_yn := scriptindex "m_yn" ; def m_yn = runscript mfid_m_yn enddef ; -newscriptindex mfid_c_sin ; mfid_c_asin := scriptindex "c_sin" ; def c_sin = runscript mfid_c_sin enddef ; -newscriptindex mfid_c_cos ; mfid_c_acos := scriptindex "c_cos" ; def c_cos = runscript mfid_c_cos enddef ; -newscriptindex mfid_c_tan ; mfid_c_acos := scriptindex "c_tan" ; def c_tan = runscript mfid_c_tan enddef ; -newscriptindex mfid_c_sinh ; mfid_c_acos := scriptindex "c_sinh" ; def c_sinh = runscript mfid_c_sinh enddef ; -newscriptindex mfid_c_cosh ; mfid_c_acos := scriptindex "c_cosh" ; def c_cosh = runscript mfid_c_cosh enddef ; -newscriptindex mfid_c_tanh ; mfid_c_acos := scriptindex "c_tanh" ; def c_tanh = runscript mfid_c_tanh enddef ; - -newscriptindex mfid_c_asin ; mfid_c_acos := scriptindex "c_asin" ; def c_asin = runscript mfid_c_asin enddef ; +newscriptindex mfid_c_sin ; mfid_c_sin := scriptindex "c_sin" ; def c_sin = runscript mfid_c_sin enddef ; +newscriptindex mfid_c_cos ; mfid_c_cos := scriptindex "c_cos" ; def c_cos = runscript mfid_c_cos enddef ; +newscriptindex mfid_c_tan ; mfid_c_tan := scriptindex "c_tan" ; def c_tan = runscript mfid_c_tan enddef ; +newscriptindex mfid_c_sinh ; mfid_c_sinh := scriptindex "c_sinh" ; def c_sinh = runscript mfid_c_sinh enddef ; +newscriptindex mfid_c_cosh ; mfid_c_cosh := scriptindex "c_cosh" ; def c_cosh = runscript mfid_c_cosh enddef ; +newscriptindex mfid_c_tanh ; mfid_c_tanh := scriptindex "c_tanh" ; def c_tanh = runscript mfid_c_tanh enddef ; + +newscriptindex mfid_c_asin ; mfid_c_asin := scriptindex "c_asin" ; def c_asin = runscript mfid_c_asin enddef ; newscriptindex mfid_c_acos ; mfid_c_acos := scriptindex "c_acos" ; def c_acos = runscript mfid_c_acos enddef ; -newscriptindex mfid_c_atan ; mfid_c_acos := scriptindex "c_atan" ; def c_atan = runscript mfid_c_atan enddef ; -newscriptindex mfid_c_asinh ; mfid_c_acos := scriptindex "c_asinh" ; def c_asinh = runscript mfid_c_asinh enddef ; -newscriptindex mfid_c_acosh ; mfid_c_acos := scriptindex "c_acosh" ; def c_acosh = runscript mfid_c_acosh enddef ; -newscriptindex mfid_c_atanh ; mfid_c_acos := scriptindex "c_atanh" ; def c_atanh = runscript mfid_c_atanh enddef ; - -newscriptindex mfid_c_sqrt ; mfid_c_acos := scriptindex "c_sqrt" ; def c_sqrt = runscript mfid_c_sqrt enddef ; -newscriptindex mfid_c_abs ; mfid_c_acos := scriptindex "c_abs" ; def c_abs = runscript mfid_c_abs enddef ; -newscriptindex mfid_c_arg ; mfid_c_acos := scriptindex "c_arg" ; def c_arg = runscript mfid_c_arg enddef ; -newscriptindex mfid_c_conj ; mfid_c_acos := scriptindex "c_conj" ; def c_conj = runscript mfid_c_conj enddef ; -newscriptindex mfid_c_exp ; mfid_c_acos := scriptindex "c_exp" ; def c_exp = runscript mfid_c_exp enddef ; -newscriptindex mfid_c_log ; mfid_c_acos := scriptindex "c_log" ; def c_log = runscript mfid_c_log enddef ; -newscriptindex mfid_c_proj ; mfid_c_acos := scriptindex "c_proj" ; def c_proj = runscript mfid_c_proj enddef ; +newscriptindex mfid_c_atan ; mfid_c_atan := scriptindex "c_atan" ; def c_atan = runscript mfid_c_atan enddef ; +newscriptindex mfid_c_asinh ; mfid_c_asinh := scriptindex "c_asinh" ; def c_asinh = runscript mfid_c_asinh enddef ; +newscriptindex mfid_c_acosh ; mfid_c_acosh := scriptindex "c_acosh" ; def c_acosh = runscript mfid_c_acosh enddef ; +newscriptindex mfid_c_atanh ; mfid_c_atanh := scriptindex "c_atanh" ; def c_atanh = runscript mfid_c_atanh enddef ; + +newscriptindex mfid_c_sqrt ; mfid_c_sqrt := scriptindex "c_sqrt" ; def c_sqrt = runscript mfid_c_sqrt enddef ; +newscriptindex mfid_c_abs ; mfid_c_abs := scriptindex "c_abs" ; def c_abs = runscript mfid_c_abs enddef ; +newscriptindex mfid_c_arg ; mfid_c_arg := scriptindex "c_arg" ; def c_arg = runscript mfid_c_arg enddef ; +newscriptindex mfid_c_conj ; mfid_c_conj := scriptindex "c_conj" ; def c_conj = runscript mfid_c_conj enddef ; +newscriptindex mfid_c_exp ; mfid_c_exp := scriptindex "c_exp" ; def c_exp = runscript mfid_c_exp enddef ; +newscriptindex mfid_c_log ; mfid_c_log := scriptindex "c_log" ; def c_log = runscript mfid_c_log enddef ; +newscriptindex mfid_c_proj ; mfid_c_proj := scriptindex "c_proj" ; def c_proj = runscript mfid_c_proj enddef ; newscriptindex mfid_c_erf ; mfid_c_erf := scriptindex "c_erf" ; def c_erf = runscript mfid_c_erf enddef ; newscriptindex mfid_c_erfc ; mfid_c_erfc := scriptindex "c_erfc" ; def c_erfc = runscript mfid_c_erfc enddef ; diff --git a/metapost/context/fonts/mpiv/punkfont-characters.mp b/metapost/context/fonts/mpiv/punkfont-characters.mp index da0015b02..5ba7a8a21 100644 --- a/metapost/context/fonts/mpiv/punkfont-characters.mp +++ b/metapost/context/fonts/mpiv/punkfont-characters.mp @@ -592,9 +592,19 @@ pd z1; pd z2; pd z3; pd z4; draw z1--z2; draw flex(z3,z6,z4); % stems pd z5; draw z5--z6; % crossbar endchar; -beginpunkchar("i",5,1,2); -z1=pp(.5w,0); z2=(.5w,1/3h); z3=(.5w,2/3h); z4=(.5w,h); -pd z1; pd z4; draw flex(z1,z2,z3,z4); % stem +% beginpunkchar("i",5,1,2); +% z1=pp(.5w,0); z2=(.5w,1/3h); z3=(.5w,2/3h); z4=(.5w,h); +% pd z1; pd z4; draw flex(z1,z2,z3,z4); % stem +% endchar; + +% beginpunkchar("i",9,1,2); +% z1=pp(.5w,0); z2=(.5w,.1h); z3=(.5w,2/3h); z4=(.5w,h); +% pd z1; pd z4; draw flex(z1,z2,z3,z4) withcolor red; % stem +% endchar; + +beginpunkchar("i",9,1,2); +z1=pp(.5w,0); z4=(.5w,h); +pd z1; pd z4; draw z1--z4; % stem endchar; beginpunkchar("j",9,1,2); @@ -642,7 +652,8 @@ z5=pp(.4w,.2h); z6=pp(w-u,-.1h); z7=pp(.5[x5,x6],-.2h); pd z5; pd z6; draw z5--z7--z6; % tail endchar; -beginpunkchar("r",16,1,2); +% beginpunkchar("r",16,1,2); +beginpunkchar("r",13,1,2); z1=pp(2u,0); z2=pp(2u,h); z3=pp(w-u,.6[y2,y4]); z4=pp(2u,.5h); z5=pp(w-1.5u,0); pd z1; pd z2; pd z5; draw z1--flex(z2,z3,z4)--z5; % stem, bowl, and diagonal endchar; |