meta-blb.mkiv /size: 1435 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=meta-blb,
3
%D version=2018.04.12,
4
%D title=\METAPOST\ Graphics,
5
%D subtitle=Blobs,
6
%D author=Hans Hagen,
7
%D date=\ currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is
11
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12
%C details.
13 14
\writestatus
{
loading
}{
MetaPost
Graphics
/
Blobs
}
15 16
\registerctxluafile
{
meta
-
blb
}{}
17 18
\unprotect
19 20
\unexpanded
\def
\MPLIBgetblobscaledcm
#
1
#
2
#
3
#
4
#
5
#
6
#
7
#
8
#
9
%
21
{
\clf_mpgetblob
\MPtextbox
#
1
\relax
22
\setbox
\MPbox
\hpack
\bgroup
23
\dotransformnextbox
{
#
2
}{
#
3
}{
#
4
}{
#
5
}{
#
6
}{
#
7
}
%
24
\vpack
to
\zeropoint\bgroup
25
\vss
26
\hpack
to
\zeropoint
\bgroup
27
% \fastsxsy{#8}{#9}{\raise\dp\MPtextbox\box\MPtextbox}%
28
\fastsxsy
{
#
8
}{
#
9
}{
\box
\MPtextbox
}
%
29
\hss
30
\egroup
31
\egroup
32
\egroup
33
\smashbox
\MPbox
34
\box
\MPbox
}
35 36
%D An example of usage:
37 38
\definefontfeature
[
followtext
][
liga
=
no
]
39 40
\unexpanded
\def
\MPLIBfollowtext
#
1
#
2
%
41
{
\begingroup
42
\scratchcounter
#
1
\relax
43
\setbox
\scratchbox
\hbox
{
\addff
{
followtext
}
#
2
}
%
44
\clf_MPLIBconvertfollowtext
\scratchcounter\scratchbox
45
\endgroup
}
46 47
% \def\reversedtext#1%
48
% {\cldcontext{table.concat(table.reverse(utf.totable(\!!bs#1\!!es)))}}
49 50
%D New:
51 52
\newtoks
\mpblobtext
53 54
\mpblobtext
{
\global\setbox
\mptextbox
\vbox
{
\clf_mpblobtext
}}
55 56
\protect
\endinput
57