bidi-symbols.mp /size: 2933 b    last modification: 2021-10-28 13:50
1
%D \module
2
%D [ file=bidi-symbols.mp,
3
%D version=2013.09.06,
4
%D title=\CONTEXT\ \METAPOST\ graphics,
5
%D subtitle=demo font,
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
passvariable
(
"
fontname
"
,
"
bidi-symbols
"
)
;
15
passvariable
(
"
fontversion
"
,
"
1.009
"
)
;
16 17
numeric
font_bidi_dp
;
font_bidi_dp
:
=
-6
;
18
numeric
font_bidi_wd
;
font_bidi_wd
:
=
-12
;
19 20
% beginfig(1) ; % lre
21
% charcode := 8234 ; charwd := 0 ; charht := 0 ; chardp := 0 ;
22
% drawarrow (0,0) -- (0,font_bidi_dp) -- (font_bidi_wd,font_bidi_dp) withcolor red ;
23
% currentpicture := currentpicture scaled charscale ;
24
% setbounds currentpicture to boundingbox nullpicture ;
25
% endfig ;
26
%
27
% beginfig(2) ; % rle
28
% charcode := 8235 ; charwd := 0 ; charht := 0 ; chardp := 0 ;
29
% drawarrow (0,0) -- (0,font_bidi_dp) -- (-font_bidi_wd,font_bidi_dp) withcolor green ;
30
% currentpicture := currentpicture scaled charscale ;
31
% setbounds currentpicture to boundingbox nullpicture ;
32
% endfig ;
33
%
34
% beginfig(3) ; % pdf
35
% charcode := 8236 ; charwd := 0 ; charht := 0 ; chardp := 0 ;
36
% draw (0,0) -- (0,font_bidi_dp) -- (-font_bidi_wd/2,font_bidi_dp) -- (font_bidi_wd/2,font_bidi_dp) withcolor blue ;
37
% currentpicture := currentpicture scaled charscale ;
38
% setbounds currentpicture to boundingbox nullpicture ;
39
% endfig ;
40
%
41
% beginfig(4) ; % lro
42
% charcode := 8237 ; charwd := 0 ; charht := 0 ; chardp := 0 ;
43
% drawarrow reverse ((0,0) -- (0,font_bidi_dp) -- (font_bidi_wd,font_bidi_dp)) withcolor red ;
44
% currentpicture := currentpicture scaled charscale ;
45
% setbounds currentpicture to boundingbox nullpicture ;
46
% endfig ;
47
%
48
% beginfig(5) ; % rlo
49
% charcode := 8238 ; charwd := 0 ; charht := 0 ; chardp := 0 ;
50
% drawarrow reverse ((0,0) -- (0,font_bidi_dp) -- (-font_bidi_wd,font_bidi_dp)) withcolor green ;
51
% currentpicture := currentpicture scaled charscale ;
52
% setbounds currentpicture to boundingbox nullpicture ;
53
% endfig ;
54 55
beginfont
(
"
bidi-symbols
"
)
;
56 57
beginglyph
(
8234
,
0
,
0
,
0
)
;
% lre
58
drawarrow
(
0
,
0
)
--
(
0
,
font_bidi_dp
)
--
(
font_bidi_wd
,
font_bidi_dp
)
withcolor
red
;
59
endglyph
;
60 61
beginglyph
(
8235
,
0
,
0
,
0
)
;
% rle
62
drawarrow
(
0
,
0
)
--
(
0
,
font_bidi_dp
)
--
(
-
font_bidi_wd
,
font_bidi_dp
)
withcolor
green
;
63
endglyph
;
64 65
beginglyph
(
8236
,
0
,
0
,
0
)
;
% pdf
66
draw
(
0
,
0
)
--
(
0
,
font_bidi_dp
)
--
(
-
font_bidi_wd
/
2
,
font_bidi_dp
)
--
(
font_bidi_wd
/
2
,
font_bidi_dp
)
withcolor
blue
;
67
endglyph
;
68 69
beginglyph
(
8237
,
0
,
0
,
0
)
;
% lro
70
drawarrow
reverse
(
(
0
,
0
)
--
(
0
,
font_bidi_dp
)
--
(
font_bidi_wd
,
font_bidi_dp
)
)
withcolor
red
;
71
endglyph
;
72 73
beginglyph
(
8238
,
0
,
0
,
0
)
;
% rlo
74
drawarrow
reverse
(
(
0
,
0
)
--
(
0
,
font_bidi_dp
)
--
(
-
font_bidi_wd
,
font_bidi_dp
)
)
withcolor
green
;
75
endglyph
;
76 77
endfont
;
78