% user commands
(StartBitmap) % -> . Starts capturing a bitmap.
{
bitmapSize bt.AllocateBitmap
bt.UseBitmap
.initdc .erase
1 1 .translate 3 3 .scale
0 0 .setpos
}.cvx .def
(StopBitmap) % -> . Stops capturing a bitmap, convolutes it, and makes samples.
{
.initdc .white 50 {0 0 2 150 .drawbox 3 0 .translate}.cvx .rept
.initdc .white 50 {0 0 150 2 .drawbox 0 3 .translate}.cvx .rept
.initdc bt.UseScreen
0 bt.LoadFromBitmap
0 9 bt.Scale
Convolute0 Convolute0 Convolute0
(Char.ais) 0 bt.StoreAIS
(Char.ais) .setupais
127.5 .tvalue
e .initdc .outline
0 .setslen
.makecontours .setcontours 10 scale
.countcon {.afsa .afsa .afsa .afsa .nextcon}.cvx .rept
-4 -4 translatecontours e ds
}.cvx .def
(CaptureChar) % <singleCharString> -> . Makes samples for a character outline
{
StartBitmap
1 descent .translate .drawtext
StopBitmap
}.cvx .def
(Grid) {
.initdc 50 {0 0 1000 1 .drawbox 0 30 .translate}.cvx .rept
.initdc 50 {0 0 1 1000 .drawbox 30 0 .translate}.cvx .rept
.initdc
}.cvx .def
(ShowBits) {
.initdc .true .setinvert .pop 30 30 .scale 1 5 .translate 0 0 .moveto
.drawtext
.initdc
}.cvx .def
(StrikeChar) {
.dup .cviac (curChar) .exch .store
.cviac CaptureChar
(Do curChar SaveChar when done)=
}.cvx .def
(NextChar) {curChar .cvaci 1 .add StrikeChar}.cvx .def
(auto) {5 .dynnodes 90 .squaretangents mn 90 1 2 2 .dynspline}.cvx .def
(SaveChar) {
.true .setlog
.dup .cvaci .cvias (").note .note (" Char).noter
.initdc .drawtext .getpos .exch cvtempstring .note ( ).note cvtempstring .note ( Width).noter
"{setUpTransform" .noter
logcs
"}.cvx EndChar" .noter
.false .setlog
}.cvx .def
% parameters
(descent) 5 .def
(bitmapSize) 60 .def % max of (height+depth) and width, times 3
(StrikeFont) (Tioga10.strike) .def
.flushpath 0 0 bitmapSize 3.0 .div .dup .rect 0 0 .drawstroke