diff options
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mpxl/mp-text.mpxl | 7 | ||||
-rw-r--r-- | metapost/context/base/mpxl/mp-tool.mpxl | 12 |
2 files changed, 11 insertions, 8 deletions
diff --git a/metapost/context/base/mpxl/mp-text.mpxl b/metapost/context/base/mpxl/mp-text.mpxl index c18647baf..b3f1adf34 100644 --- a/metapost/context/base/mpxl/mp-text.mpxl +++ b/metapost/context/base/mpxl/mp-text.mpxl @@ -18,7 +18,8 @@ if known metafun_loaded_text : endinput ; fi ; newinternal boolean metafun_loaded_text ; metafun_loaded_text := true ; immutable metafun_loaded_text ; % This is still mostly the same as the one discussed in the good old \METAFUN\ -% example code but modernized abit to suit \LMTX. +% example code but modernized abit to suit \LMTX. We can actually use \hsplit +% now! newscriptindex mfid_setparshapeproperty ; mfid_setparshapeproperty := scriptindex "setparshapeproperty" ; @@ -123,9 +124,9 @@ def lmt_do_parshape = % todo: check and improve this rather oldie save a, b; pair a, b ; a := pat intersection_point (lin shifted (0,strutheight)) ; if intersection_found : - a := a shifted (0,-strutheight) ; + a := a shifted (0,-strutheight) ; else : - a := pat intersection_point lin ; + a := pat intersection_point lin ; fi ; b := pat intersection_point (lin shifted (0,-strutdepth)) ; if intersection_found : diff --git a/metapost/context/base/mpxl/mp-tool.mpxl b/metapost/context/base/mpxl/mp-tool.mpxl index 7b7814eef..adc2d1510 100644 --- a/metapost/context/base/mpxl/mp-tool.mpxl +++ b/metapost/context/base/mpxl/mp-tool.mpxl @@ -3390,22 +3390,24 @@ permanent break ; % primarydef p xstretched w = ( % p if (bbwidth (p)>0) and (w>0) : xscaled (w/bbwidth (p)) fi % ) enddef ; +% +% primarydef p ystretched h = ( +% p if (bbheight(p)>0) and (h>0) : yscaled (h/bbheight(p)) fi +% ) enddef ; + primarydef p xstretched w = ( begingroup save l, r ; pair r; r := xrange p ; l := ypart r - xpart r ; - p if (l > 0) and (w > 0) : xscaled (w/l (p)) fi + p if (l > 0) and (w > 0) : xscaled (w/l) fi endgroup ) enddef ; -% primarydef p ystretched h = ( -% p if (bbheight(p)>0) and (h>0) : yscaled (h/bbheight(p)) fi -% ) enddef ; primarydef p ystretched h = ( begingroup save l, r ; pair r; r := yrange p ; l := ypart r - xpart r ; - p if (l > 0) and (h > 0) : yscaled (h/l (p)) fi + p if (l > 0) and (h > 0) : yscaled (h/l) fi endgroup ) enddef ; |