diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-10-01 20:08:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-10-01 20:08:00 +0200 |
commit | bf97b73a1cb3cde1c12619fc7de0fc7efbacadcc (patch) | |
tree | 274dfe768b2c599030879c51fd660ec30c527697 /metapost | |
parent | c54e16cd36f55642657ebe388715b6fd890d13ec (diff) | |
download | context-bf97b73a1cb3cde1c12619fc7de0fc7efbacadcc.tar.gz |
beta 2013.10.01 20:08
Diffstat (limited to 'metapost')
-rw-r--r-- | metapost/context/base/mp-tool.mpiv | 4 | ||||
-rw-r--r-- | metapost/context/fonts/demo-symbols.mp | 21 | ||||
-rw-r--r-- | metapost/context/fonts/demo-symbols.tex | 21 |
3 files changed, 45 insertions, 1 deletions
diff --git a/metapost/context/base/mp-tool.mpiv b/metapost/context/base/mp-tool.mpiv index a39219c67..bb5ae288e 100644 --- a/metapost/context/base/mp-tool.mpiv +++ b/metapost/context/base/mp-tool.mpiv @@ -2454,8 +2454,10 @@ def beginglyph(expr unicode, width, height, depth) = enddef ; def endglyph = - currentpicture := currentpicture scaled charscale ; setbounds currentpicture to (boundingbox unitsquare xscaled charwd yscaled (charht + chardp) shifted (0,-chardp)) ; + if known charscale : + currentpicture := currentpicture scaled charscale ; + fi ; endfig ; enddef ; diff --git a/metapost/context/fonts/demo-symbols.mp b/metapost/context/fonts/demo-symbols.mp new file mode 100644 index 000000000..822854c94 --- /dev/null +++ b/metapost/context/fonts/demo-symbols.mp @@ -0,0 +1,21 @@ +%D \module +%D [ file=demo-symbols.mp, +%D version=2013.09.06, +%D title=\CONTEXT\ \METAPOST\ graphics, +%D subtitle=demo font, +%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. + +passvariable("fontname","demo-symbols") ; +passvariable("fontversion","1.005") ; + +beginglyph(9754,2,4,0) ; % high voltage + interim ahlength := 1 ; + drawarrow (1,4) -- (0,2) -- (2,3) -- (1,0) withcolor darkred ; +endglyph ; + diff --git a/metapost/context/fonts/demo-symbols.tex b/metapost/context/fonts/demo-symbols.tex new file mode 100644 index 000000000..e9af4a027 --- /dev/null +++ b/metapost/context/fonts/demo-symbols.tex @@ -0,0 +1,21 @@ +\starttext + + \definemetafont[demo-symbols][demo-symbols.mp] + + \startbuffer + watch this: {\demo\char"261A} \quad \ruledhbox{\demo\char"261A} + \stopbuffer + + \definefont[demo][demo@demo-symbols] + + \getbuffer \blank + + \definefont[demo][demo@demo-symbols at \the\dimexpr3\exheight] + + \getbuffer \blank + + \definefont[demo][demo@demo-symbols at \the\dimexpr4\exheight] + + \getbuffer \blank + +\stoptext |