diff options
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mp-mlib.mpiv | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/metapost/context/base/mp-mlib.mpiv b/metapost/context/base/mp-mlib.mpiv index 329683f8c..eaef033a9 100644 --- a/metapost/context/base/mp-mlib.mpiv +++ b/metapost/context/base/mp-mlib.mpiv @@ -54,12 +54,11 @@ vardef transparency_alternative_to_number(expr name) = fi enddef ; -% def namedcolor(expr n, v) = -% 1 -% withprescript "sp_type=named" -% withprescript "sp_name=" & n -% withprescript "sp_value=" & v -% enddef ; +def namedcolor (expr n) = + 1 + withprescript "sp_type=named" + withprescript "sp_name=" & n +enddef ; def spotcolor(expr n, v) = 1 @@ -157,6 +156,16 @@ enddef ; defaultfont := "Mono" ; % was cmr10, could be lmmono10-regular, but is fed into context anyway +vardef fontsize expr str = + save size ; numeric size ; + size := bbwidth(textext("\MPfontsizehskip{" & defaultfont & "}")) ; + if size = 0 : + 12pt + else : + size + fi +enddef ; + pair mfun_laboff ; mfun_laboff := (0,0) ; pair mfun_laboff.lft ; mfun_laboff.lft := (-1,0) ; pair mfun_laboff.rt ; mfun_laboff.rt := (1,0) ; |