From a90bcf0dcd9265b64b65b1f874b39f4c75553137 Mon Sep 17 00:00:00 2001 From: Marius Date: Tue, 1 Oct 2013 21:20:26 +0300 Subject: beta 2013.10.01 20:08 --- metapost/context/base/mp-tool.mpiv | 4 +++- metapost/context/fonts/demo-symbols.mp | 21 +++++++++++++++++++++ metapost/context/fonts/demo-symbols.tex | 21 +++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 metapost/context/fonts/demo-symbols.mp create mode 100644 metapost/context/fonts/demo-symbols.tex (limited to 'metapost') 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 -- cgit v1.2.3