shithub: riscv

ref: 025a2d172ebfe36bc0da32f5712dd250916c73f1
dir: /sys/lib/troff/font/devutf/charlib/L1/

View raw version
/LOGO-dict-mm dup where not
{ dup 64 dict def currentdict } if
exch get
begin
/globesetup {
/r exch def
/N exch def
/d 2 N r mul N 1 sub add div def
/h d r mul def
} def
/mkabs {
/yp exch def
/xl exch def
dup dup 0 get xl mul 0 exch put
dup dup 1 get h mul yp add 1 exch put
dup dup 2 get xl mul 2 exch put
dup dup 3 get h mul yp add 3 exch put
dup dup 4 get xl mul 4 exch put
dup dup 5 get h mul yp add 5 exch put
} def
/topsegment {
/n exch def
/y n r mul n .5 add add d mul def
/a y 1 y dup mul sub sqrt atan def
/x a cos def
/c2 exch x y mkabs def
/ly1 exch h mul y add def
/lx1 exch x abs mul def
/c1 exch x y mkabs def
x y /moveto load
0 0 1 a 180 a sub /arc load
c1 aload pop /curveto load
lx1 ly1 /lineto load
c2 aload pop /curveto load
/closepath load
} def
/botsegment {
/n exch 1 add def
/y n r mul n .5 sub add d mul def
/a y 1 y dup mul sub sqrt atan def
/x a cos def
/c2 exch x y mkabs def
/ly1 exch h mul y add def
/lx1 exch x abs mul def
/c1 exch x y mkabs def
x y /moveto load
0 0 1 a 540 a sub /arcn load
c1 aload pop /curveto load
lx1 ly1 /lineto load
c2 aload pop /curveto load
/closepath load
} def
/segment {
/n exch def
/dh exch 1 exch sub 2 div def
/ylb n r mul n 0.5 add add d mul def
/ylt ylb h add def
/yrb ylb h dh mul add def
/yrt ylt h dh mul sub def
/alb ylb 1 ylb dup mul sub sqrt atan def
/alt ylt 1 ylt dup mul sub sqrt atan def
/arb yrb 1 yrb dup mul sub sqrt atan 180 exch sub def
/art yrt 1 yrt dup mul sub sqrt atan 180 exch sub def
/xlb alb cos def
/xlt alt cos def
/xrb arb cos def
/xrt art cos def
/c4 exch xrb abs ylb mkabs def
/ly2 exch h mul ylb add def
/lx2 exch xrb abs mul def
/c3 exch xrb abs ylb mkabs def
/c2 exch xrt abs ylt mkabs def
/ly1 exch h mul ylt add def
/lx1 exch xrt abs mul def
/c1 exch xrt abs ylt mkabs def
xlb ylb /moveto load
0 0 1 alb alt /arc load
c2 4 get c2 5 get /lineto load
c2 2 get c2 3 get
c2 0 get c2 1 get
lx1 ly1	/curveto load
c1 4 get c1 5 get /lineto load
c1 2 get c1 3 get
c1 0 get c1 1 get
xrt yrt /curveto load
0 0 1 art arb /arc load
c3 aload pop /curveto load
lx2 ly2 /lineto load
c4 aload pop /curveto load
/closepath load
} def
8 2.5 globesetup
/globe8 [
/newpath load
[ -.9   .1  -.6   .2  -.5   .2  ] -.5   .2  [ -.4   .2   .0  .0  .4  .0 ] 3 topsegment
[ -.9  -.35 -.85 -.35 -.8  -.35 ] -.1  -.35 [  .1  -.35  .3  .0  .5  .0 ]
[ -.8   .35 -.75  .35 -.7   .35 ] -.1   .35 [  .1   .35  .4  .0  .55 .0 ] .55 2 segment
[ -.8  -.35 -.75 -.35 -.7  -.35 ]  .05 -.35 [  .2  -.35  .4  .0  .55 .0 ]
[ -.8   .35 -.75  .35 -.7   .35 ]  .05  .35 [  .2   .35  .45 .0  .6  .0 ] .7  1 segment
[ -.8  -.35 -.75 -.35 -.7  -.35 ]  .0  -.35 [  .15 -.35  .4  .0  .6  .0 ]
[ -.8   .35 -.75  .35 -.7   .35 ]  .0   .35 [  .15  .35  .4  .0  .6  .0 ] .7  0 segment
[ -.7  -.35 -.65 -.35 -.6  -.35 ] -.1  -.35 [  .05 -.35  .35 .0  .55 .0 ]
[ -.7   .35 -.65  .35 -.6   .35 ] -.1   .35 [  .05  .35  .25 .0  .4  .0 ] .8 -1 segment
[ -.65 -.2  -.55 -.2 -.45  -.2  ] -.3   -.2 [ -.2  -.2   .2  .0  .3  .0 ]
[ -.65  .1  -.55  .1 -.45   .1  ] -.45  .1  [ -.3   .1  -.1  .0  .0  .0 ] .96 -2 segment
[  .0   .0   .0   .0  .0    .0  ]  .0   .0  [  .0   .0   .0  .0  .0  .0 ]
[  .0   .0   .0   .0  .0    .0  ]  .0   .0  [  .0   .0   .0  .0  .0  .0 ]  1 -3 segment
[  .0   .0   .0   .0  .0    .0  ]  .0   .0  [  .0   .0   .0  .0  .0  .0 ] -4 botsegment
] cvx def
12 3 globesetup
/globe12 [
/newpath load
[ -.8   .2  -.7  .25 -.5   .25 ] -.4  .25 [ -.2   .25  .0  .0  .2  .0 ] 5 topsegment
[ -.7  -.35 -.7 -.35 -.6  -.35 ] -.3 -.35 [ -.1  -.35  .3  .0  .55 .0 ]
[ -.7   .35 -.7  .35 -.6   .35 ] -.25 .35 [ -.05  .35  .4  .0  .55 .0 ] .6  4 segment
[ -.8  -.35 -.7 -.35 -.6  -.35 ] -.1 -.35 [  .1  -.35  .4  .0  .5  .0 ]
[ -.8   .35 -.7  .35 -.6   .35 ] -.1  .35 [  .1   .35  .4  .0  .5  .0 ] .7  3 segment
[ -.8  -.35 -.7 -.35 -.6  -.35 ]  .0 -.35 [  .1  -.35  .45 .0  .55 .0 ]
[ -.8   .35 -.7  .35 -.6   .35 ]  .0  .35 [  .15  .35  .4  .0  .5  .0 ] .8  2 segment
[ -.75 -.35 -.7 -.35 -.6  -.35 ]  .0 -.35 [  .2  -.35  .4  .0  .5  .0 ]
[ -.75  .35 -.7  .35 -.6   .35 ]  .0  .35 [  .2   .35  .45 .0  .55 .0 ] .9  1 segment
[ -.7  -.35 -.6 -.35 -.55 -.35 ]  .0 -.35 [  .1  -.35  .45 .0  .55 .0 ]
[ -.7   .35 -.6  .35 -.55  .35 ]  .0  .35 [  .1   .35  .5  .0  .6  .0 ] .9  0 segment
] cvx
[
[ -.7 -.35 -.6 -.35 -.5  -.35 ] -.15 -.35 [  .0  -.35  .4  .0  .5  .0 ]
[ -.65 .35 -.55 .35 -.45  .35 ] -.15  .35 [  .0   .35  .35 .0  .45 .0 ] .9 -1 segment
[ -.8 -.1  -.5 -.3  -.4  -.3  ] -.2  -.3  [  .0  -.3   .3  .0  .4  .0 ]
[ -.8  .1  -.5  .3  -.4   .3  ] -.2   .3  [  .0   .3   .2  .0  .3  .0 ] 1 -2 segment
[ -.7 -.1  -.5 -.15 -.4  -.15 ] -.3  -.15 [ -.2  -.15  .0  .0  .2  .0 ]
[ -.7  .05 -.5  .1  -.4   .1  ] -.4   .1  [ -.3   .1   .0  .0  .2  .0 ] 1 -3 segment
[  .0  .0   .0  .0   .0   .0  ]  .0   .0  [  .0   .0   .0  .0  .0  .0 ]
[  .0  .0   .0  .0   .0   .0  ]  .0   .0  [  .0   .0   .0  .0  .0  .0 ] 1 -4 segment
[  .0  .0   .0  .0   .0   .0  ]  .0   .0  [  .0   .0   .0  .0  .0  .0 ]
[  .0  .0   .0  .0   .0   .0  ]  .0   .0  [  .0   .0   .0  .0  .0  .0 ] 1 -5 segment
[  .0  .0   .0  .0   .0   .0  ]  .0   .0  [  .0   .0   .0  .0  .0  .0 ] -6 botsegment
] cvx
4 array cvx
dup 0 5 -1 roll put
dup 1 /exec load put
dup 2 4 -1 roll put
dup 3 /exec load put
def
end
/build_L1 {
pop
LOGO-dict-mm begin
ptsize 29 lt
{ /globe /globe8 load def }
{ /globe /globe12 load def } ifelse
gsave
currentpoint translate
size 2 div dup scale
1.02 1 transform round exch round exch itransform
translate
globe fill
grestore
end
} def