| 1 |
% Date: 2019/04/05 |
| 2 |
|
| 3 |
code := 127; |
| 4 |
|
| 5 |
if known debugcables: else: boolean debugcables; debugcables = true; fi |
| 6 |
|
| 7 |
beginchar("-",wd#,ht#,dp#); "A knit stitch"; |
| 8 |
pickup symbol_pen; |
| 9 |
draw bot (w/2,h-topgap+o) -- top (w/2, -d+bottomgap-o); |
| 10 |
charbox; endchar; |
| 11 |
path purlbar; |
| 12 |
beginchar("=",wd#,ht#,dp#); "A purl stitch"; |
| 13 |
pickup symbol_pen; |
| 14 |
lft x1-rt x2 = 0.7standardheight; x1+x2=w; y1=y2=0.5[h,-d]; |
| 15 |
purlbar = z1--z2; |
| 16 |
draw purlbar; |
| 17 |
purlbox; endchar; |
| 18 |
beginchar(",",incrwidth(0,0),ht#,dp#); "No stitch"; |
| 19 |
purlbox; |
| 20 |
endchar; |
| 21 |
beginchar(".",incrwidth(0,0),ht#,dp#); "No stitch"; |
| 22 |
charbox; |
| 23 |
endchar; |
| 24 |
|
| 25 |
%Cables |
| 26 |
|
| 27 |
kright := incr code; |
| 28 |
Kright := incr code; |
| 29 |
pright := incr code; |
| 30 |
Pright := incr code; |
| 31 |
nright := incr code; |
| 32 |
eright := incr code; |
| 33 |
Nright := incr code; |
| 34 |
dright := incr code; |
| 35 |
oright := incr code; |
| 36 |
Dright := incr code; |
| 37 |
|
| 38 |
%if debugcables: |
| 39 |
kleft := incr code; |
| 40 |
Kleft := incr code; |
| 41 |
pleft := incr code; |
| 42 |
Pleft := incr code; |
| 43 |
nleft := incr code; |
| 44 |
eleft := incr code; |
| 45 |
Nleft := incr code; |
| 46 |
dleft := incr code; |
| 47 |
oleft := incr code; |
| 48 |
Dleft := incr code; |
| 49 |
%fi |
| 50 |
|
| 51 |
% Cable background/foreground blocks (empty cables) |
| 52 |
cablebgblock := 255; |
| 53 |
cablefgblock := 254; |
| 54 |
cablebgblockright := incr code; |
| 55 |
cablefgblockright := incr code; |
| 56 |
cablebgblockleft := incr code; |
| 57 |
cablefgblockleft := incr code; |
| 58 |
|
| 59 |
% Grid outlines and empty cables |
| 60 |
left_cable_grid := incr code; |
| 61 |
mid_cable_grid := incr code; |
| 62 |
right_cable_grid_bg := incr code; |
| 63 |
right_cable_grid_fg := incr code; |
| 64 |
left_cable_grid_rt := incr code; |
| 65 |
mid_cable_grid_rt := incr code; |
| 66 |
right_cable_grid_rt := incr code; |
| 67 |
|
| 68 |
% Empty boxes |
| 69 |
if gridfont: |
| 70 |
noknitleft := incr code; |
| 71 |
noknitmid := incr code; |
| 72 |
noknitright:= incr code; |
| 73 |
nopurlleft := incr code; |
| 74 |
nopurlmid := incr code; |
| 75 |
nopurlright:= incr code; |
| 76 |
|
| 77 |
beginchar(noknitleft, if fonttype = counttype: 0 else: wd# fi, ht#, dp#); "Left no stitch"; |
| 78 |
leftgrid_charbox; |
| 79 |
endchar; |
| 80 |
beginchar(noknitmid, if fonttype = counttype: 0 else: wd# fi, ht#, dp#); "Middle no stitch"; |
| 81 |
topbotgrid_charbox; |
| 82 |
endchar; |
| 83 |
beginchar(noknitright, if fonttype = counttype: 0 else: wd# fi, ht#, dp#); "Right no stitch"; |
| 84 |
rightgrid_charbox; |
| 85 |
endchar; |
| 86 |
|
| 87 |
beginchar(nopurlleft, if fonttype = counttype: 0 else: wd# fi, ht#, dp#); "Left no stitch"; |
| 88 |
leftgrid_charbox; |
| 89 |
if fonttype = purltype: |
| 90 |
fill |
| 91 |
( 0,-d)-- |
| 92 |
(w+nogrid_purlextend,-d)-- |
| 93 |
(w+nogrid_purlextend, h)-- |
| 94 |
( 0, h)--cycle; |
| 95 |
fi |
| 96 |
endchar; |
| 97 |
beginchar(nopurlmid, if fonttype = counttype: 0 else: wd# fi, ht#, dp#); "Middle no stitch"; |
| 98 |
topbotgrid_charbox; |
| 99 |
if fonttype = purltype: |
| 100 |
fill |
| 101 |
( -nogrid_purlextend,-d)-- |
| 102 |
(w+nogrid_purlextend,-d)-- |
| 103 |
(w+nogrid_purlextend, h)-- |
| 104 |
( -nogrid_purlextend, h)--cycle; |
| 105 |
fi |
| 106 |
endchar; |
| 107 |
beginchar(nopurlright, if fonttype = counttype: 0 else: wd# fi, ht#, dp#); "Right no stitch"; |
| 108 |
rightgrid_charbox; |
| 109 |
if fonttype = purltype: |
| 110 |
fill |
| 111 |
( -nogrid_purlextend,-d)-- |
| 112 |
(w,-d)-- |
| 113 |
(w, h)-- |
| 114 |
( -nogrid_purlextend, h)--cycle; |
| 115 |
fi |
| 116 |
endchar; |
| 117 |
|
| 118 |
ligtable ".": "." =:| noknitleft; |
| 119 |
ligtable noknitleft: "." |=: noknitright; |
| 120 |
ligtable noknitright: "." =:| noknitmid; |
| 121 |
ligtable noknitmid: "." |=: noknitright; |
| 122 |
|
| 123 |
ligtable ",": "," =:| nopurlleft; |
| 124 |
ligtable nopurlleft: "," |=: nopurlright; |
| 125 |
ligtable nopurlright: "," =:| nopurlmid; |
| 126 |
ligtable nopurlmid: "," |=: nopurlright; |
| 127 |
fi |
| 128 |
|
| 129 |
% Cable background blocks |
| 130 |
|
| 131 |
beginchar(cablebgblock, wd#, ht#, dp#); |
| 132 |
addto currentpicture also errorsymbol1; |
| 133 |
endchar; |
| 134 |
beginchar(cablefgblock, wd#, ht#, dp#); |
| 135 |
addto currentpicture also errorsymbol1; |
| 136 |
endchar; |
| 137 |
beginchar(cablebgblockright, wd#, ht#, dp#); endchar; |
| 138 |
beginchar(cablefgblockright, wd#, ht#, dp#); endchar; |
| 139 |
beginchar(cablebgblockleft, wd#, ht#, dp#); endchar; |
| 140 |
beginchar(cablefgblockleft, wd#, ht#, dp#); endchar; |
| 141 |
|
| 142 |
midhoriz := 20; |
| 143 |
righthoriz := 21; |
| 144 |
specialhoriz := ASCII"/"; |
| 145 |
|
| 146 |
cabletopleft := 15; |
| 147 |
cablebotleft := 16; |
| 148 |
cabletopright:= 7; |
| 149 |
cablebotright:= 8; |
| 150 |
|
| 151 |
cableleftslash := 9; |
| 152 |
cableleftbackslash := 10; |
| 153 |
cablerightslash := 11; |
| 154 |
cablerightbackslash := 12; |
| 155 |
|
| 156 |
leftslash := 13; |
| 157 |
rightslash := 14; |
| 158 |
|
| 159 |
beginchar("+",wd#,ht#,dp#); "Horizontal cable"; |
| 160 |
pickup symbol_pen; |
| 161 |
HCtop = (h-d)/2 + 0.2standardheight; |
| 162 |
HCbot = (h-d)/2 - 0.2standardheight; |
| 163 |
HCttop = bot (h-d)/2 + 0.5standardheight + o; |
| 164 |
HCbbot = top (h-d)/2 - 0.5standardheight - o; |
| 165 |
y.ul = y.ur = HCtop; |
| 166 |
y.ll = y.lr = HCbot; |
| 167 |
x.ul = x.ll = w-x.ur = w-x.lr; |
| 168 |
x.ur-x.ul = (ht+dp)-2smallgap; |
| 169 |
symbolpath0 := z.ul--z.ur; |
| 170 |
symbolpath1 := z.ll--z.lr; |
| 171 |
draw symbolpath0; draw symbolpath1; |
| 172 |
symbolpic0 := currentpicture; |
| 173 |
leftgrid_charbox; endchar; |
| 174 |
|
| 175 |
beginchar(midhoriz,wd#,ht#,dp#); "Middle of a horizontal cable"; |
| 176 |
currentpicture := symbolpic0; |
| 177 |
topbotgrid_charbox; endchar; |
| 178 |
beginchar(righthoriz,if fonttype = counttype: 0 else: wd# fi,ht#,dp#); "Right end of a horizontal cable"; |
| 179 |
currentpicture := symbolpic0; |
| 180 |
rightgrid_charbox; endchar; |
| 181 |
|
| 182 |
ligtable "+": specialhoriz: |
| 183 |
"+" |=: righthoriz; |
| 184 |
ligtable righthoriz: |
| 185 |
"+" |=: righthoriz, |
| 186 |
specialhoriz =:| midhoriz, |
| 187 |
righthoriz =:| midhoriz; |
| 188 |
|
| 189 |
|
| 190 |
beginchar(specialhoriz,wd#,ht#,dp#); "Special horizontal cable"; |
| 191 |
pickup symbol_pen; |
| 192 |
specialspread = 1.5symbolwidth; |
| 193 |
y.ul = y.ur = HCtop; |
| 194 |
y.ll = y.lr = HCbot; |
| 195 |
x.ul = x.ll = w-x.ur = w-x.lr; |
| 196 |
x.ur-x.ul = (ht+dp)-2smallgap; |
| 197 |
draw rt (w/2+specialspread,y.ur)--z.ur; |
| 198 |
draw rt (w/2+specialspread,y.lr)--z.lr; |
| 199 |
draw lft (w/2-specialspread,y.ur)--z.ul; |
| 200 |
draw lft (w/2-specialspread,y.lr)--z.ll; |
| 201 |
draw (w/2+specialspread,HCttop)--(w/2+specialspread,HCbbot); |
| 202 |
draw (w/2-specialspread,HCttop)--(w/2-specialspread,HCbbot); |
| 203 |
topbotgrid_charbox; endchar; |
| 204 |
|
| 205 |
beginchar("k",wd#,ht#,dp#); "Knit cable background"; |
| 206 |
pickup symbol_pen; |
| 207 |
%if gridfont: |
| 208 |
%drawdot (w/2, 0.5[botcableheight+cablevertgap,h-topgap]); |
| 209 |
%else: |
| 210 |
draw top (w/2, botcableheight+cablevertgap)--bot(w/2,h-topgap); |
| 211 |
%fi |
| 212 |
charbox; |
| 213 |
symbolpic0 := currentpicture; |
| 214 |
addto currentpicture also errorsymbol1; |
| 215 |
endchar; |
| 216 |
beginchar("c",wd#,ht#,dp#); "Knit cable background"; |
| 217 |
currentpicture := symbolpic0; |
| 218 |
addto currentpicture also errorsymbol1; |
| 219 |
endchar; |
| 220 |
beginchar(kleft,wd#,ht#,dp#); "Knit cable background"; |
| 221 |
currentpicture := symbolpic0; |
| 222 |
endchar; |
| 223 |
beginchar(kright,wd#,ht#,dp#); "Knit cable background"; |
| 224 |
currentpicture := symbolpic0; |
| 225 |
endchar; |
| 226 |
|
| 227 |
beginchar("p",wd#,ht#,dp#); "Purl cable background"; |
| 228 |
pickup symbol_pen; |
| 229 |
%if gridfont: |
| 230 |
%drawdot (w/2, 0.5[botcableheight+cablevertgap,h-topgap]); |
| 231 |
%else: |
| 232 |
draw purlbar; |
| 233 |
%fi |
| 234 |
charbox; purlfill; |
| 235 |
symbolpic0 := currentpicture; |
| 236 |
addto currentpicture also errorsymbol1; |
| 237 |
endchar; |
| 238 |
beginchar("g",wd#,ht#,dp#); "Purl cable background"; |
| 239 |
currentpicture := symbolpic0; |
| 240 |
addto currentpicture also errorsymbol1; |
| 241 |
endchar; |
| 242 |
beginchar(pright,wd#,ht#,dp#); "Purl cable background"; |
| 243 |
currentpicture := symbolpic0; |
| 244 |
endchar; |
| 245 |
beginchar(pleft,wd#,ht#,dp#); "Purl cable background"; |
| 246 |
currentpicture := symbolpic0; |
| 247 |
endchar; |
| 248 |
|
| 249 |
beginchar("n",incrwidth(0,1),ht#,dp#); "Back make one"; |
| 250 |
pickup symbol_pen; |
| 251 |
drawM(h-topgap, botcableheight+cablevertgap, 0.5wd,symbolwidth); |
| 252 |
charbox; |
| 253 |
symbolpic0:=currentpicture; |
| 254 |
addto currentpicture also errorsymbol1; |
| 255 |
endchar; |
| 256 |
beginchar(nright,incrwidth(0,1),ht#,dp#); "Back make one"; |
| 257 |
currentpicture := symbolpic0; endchar; |
| 258 |
beginchar(nleft,incrwidth(0,1),ht#,dp#); "Back make one"; |
| 259 |
currentpicture := symbolpic0; endchar; |
| 260 |
|
| 261 |
beginchar("e",incrwidth(0,1),ht#,dp#); "Back purlwise make one"; |
| 262 |
pickup purl_symbol_pen; |
| 263 |
drawM(h-topgap, botcableheight+cablevertgap, 0.5wd,purl_symbolwidth); |
| 264 |
charbox; purlfill; |
| 265 |
symbolpic0:=currentpicture; |
| 266 |
addto currentpicture also errorsymbol1; |
| 267 |
endchar; |
| 268 |
beginchar(eright,incrwidth(0,1),ht#,dp#); "Back purlwise make one"; |
| 269 |
currentpicture := symbolpic0; |
| 270 |
endchar; |
| 271 |
beginchar(eleft,incrwidth(0,1),ht#,dp#); "Back purlwise make one"; |
| 272 |
currentpicture := symbolpic0; |
| 273 |
endchar; |
| 274 |
|
| 275 |
beginchar("N",incrwidth(0,1),ht#,dp#); "Front make one"; |
| 276 |
pickup symbol_pen; |
| 277 |
drawM(topcableheight-cablevertgap, -d+bottomgap, 0.5wd,symbolwidth); |
| 278 |
charbox; |
| 279 |
symbolpic0 := currentpicture; |
| 280 |
addto currentpicture also errorsymbol1; |
| 281 |
endchar; |
| 282 |
beginchar(Nright,incrwidth(0,1),ht#,dp#); "Front make one"; |
| 283 |
currentpicture := symbolpic0; |
| 284 |
endchar; |
| 285 |
beginchar(Nleft,incrwidth(0,1),ht#,dp#); "Front make one"; |
| 286 |
currentpicture := symbolpic0; |
| 287 |
endchar; |
| 288 |
|
| 289 |
beginchar("d",decrwidth(2,1),ht#,dp#); "Back decrease"; |
| 290 |
pickup symbol_pen; |
| 291 |
drawSSK(h-topgap, botcableheight+cablevertgap); |
| 292 |
charbox; |
| 293 |
symbolpic0:=currentpicture; |
| 294 |
addto currentpicture also errorsymbol1; |
| 295 |
endchar; |
| 296 |
beginchar(dright,decrwidth(2,1),ht#,dp#); "Back decrease"; |
| 297 |
fliphoriz(symbolpic0)(currentpicture); endchar; |
| 298 |
beginchar(dleft,decrwidth(2,1),ht#,dp#); "Back decrease"; |
| 299 |
currentpicture := symbolpic0; endchar; |
| 300 |
|
| 301 |
beginchar("o",decrwidth(2,1),ht#,dp#); "Back purl decrease"; |
| 302 |
pickup purl_symbol_pen; |
| 303 |
drawSSK(h-topgap, botcableheight+cablevertgap); |
| 304 |
charbox; purlfill; |
| 305 |
symbolpic0:=currentpicture; |
| 306 |
addto currentpicture also errorsymbol1; |
| 307 |
endchar; |
| 308 |
beginchar(oright,decrwidth(2,1),ht#,dp#); "Back purl decrease"; |
| 309 |
fliphoriz(symbolpic0)(currentpicture); |
| 310 |
endchar; |
| 311 |
beginchar(oleft,decrwidth(2,1),ht#,dp#); "Back purl decrease"; |
| 312 |
currentpicture := symbolpic0;; |
| 313 |
endchar; |
| 314 |
|
| 315 |
beginchar("D",decrwidth(2,1),ht#,dp#); "Front decrease"; |
| 316 |
pickup symbol_pen; |
| 317 |
drawSSK(topcableheight-cablevertgap,-d+bottomgap); |
| 318 |
charbox; |
| 319 |
symbolpic0:=currentpicture; |
| 320 |
addto currentpicture also errorsymbol1; |
| 321 |
endchar; |
| 322 |
beginchar(Dright,decrwidth(2,1),ht#,dp#); "Front decrease"; |
| 323 |
fliphoriz(symbolpic0)(currentpicture); endchar; |
| 324 |
beginchar(Dleft,decrwidth(2,1),ht#,dp#); "Front decrease"; |
| 325 |
currentpicture := symbolpic0; endchar; |
| 326 |
|
| 327 |
|
| 328 |
beginchar("K",wd#,ht#,dp#); "Knit cable foreground"; |
| 329 |
pickup symbol_pen; |
| 330 |
%if gridfont: |
| 331 |
%drawdot (w/2, 0.5[-d+bottomgap,topcableheight-cablevertgap]); |
| 332 |
%else: |
| 333 |
draw top (w/2, -d+bottomgap)--bot(w/2,topcableheight-cablevertgap); |
| 334 |
%fi |
| 335 |
charbox; |
| 336 |
symbolpic0 := currentpicture; |
| 337 |
addto currentpicture also errorsymbol1; |
| 338 |
endchar; |
| 339 |
beginchar("C",wd#,ht#,dp#); "Knit cable foreground"; |
| 340 |
currentpicture := symbolpic0; |
| 341 |
addto currentpicture also errorsymbol1; |
| 342 |
endchar; |
| 343 |
beginchar(Kright,wd#,ht#,dp#); "Knit cable foreground"; |
| 344 |
currentpicture := symbolpic0; |
| 345 |
endchar; |
| 346 |
beginchar(Kleft,wd#,ht#,dp#); "Knit cable foreground"; |
| 347 |
currentpicture := symbolpic0; |
| 348 |
endchar; |
| 349 |
|
| 350 |
beginchar("P",wd#,ht#,dp#); "Purl cable foreground"; |
| 351 |
%if gridfont: |
| 352 |
%pickup dot_pen; |
| 353 |
%drawdot (w/2, 0.5[-d+bottomgap,topcableheight-cablevertgap]); |
| 354 |
%else: |
| 355 |
pickup symbol_pen; |
| 356 |
draw purlbar; |
| 357 |
%fi |
| 358 |
charbox; purlfill; |
| 359 |
symbolpic0 := currentpicture; |
| 360 |
addto currentpicture also errorsymbol1; |
| 361 |
endchar; |
| 362 |
beginchar("G",wd#,ht#,dp#); "Purl cable foreground"; |
| 363 |
currentpicture := symbolpic0; |
| 364 |
addto currentpicture also errorsymbol1; |
| 365 |
endchar; |
| 366 |
beginchar(Pright,wd#,ht#,dp#); "Purl cable foreground"; |
| 367 |
currentpicture := symbolpic0; |
| 368 |
endchar; |
| 369 |
beginchar(Pleft,wd#,ht#,dp#); "Purl cable foreground"; |
| 370 |
currentpicture := symbolpic0; |
| 371 |
endchar; |
| 372 |
|
| 373 |
beginchar("_",0,ht#,dp#); "Cable bottom connector"; |
| 374 |
pickup symbol_pen; |
| 375 |
x2 - x1 = 2wd - cablebargap; |
| 376 |
0.5[x1,x2]=0; |
| 377 |
y1=y2=botcableheight; draw z1--z2; |
| 378 |
endchar; |
| 379 |
beginchar("^",0,ht#,dp#); "Cable top connector"; |
| 380 |
pickup symbol_pen; |
| 381 |
x2 - x1 = 2wd - cablebargap; |
| 382 |
0.5[x1,x2]=0; |
| 383 |
y1=y2=topcableheight; draw z1--z2; |
| 384 |
% pickup pensquare scaled symbolwidth; |
| 385 |
% draw rt (-wd/2,topcableheight) -- lft (wd/2,topcableheight); |
| 386 |
endchar; |
| 387 |
|
| 388 |
beginchar(rightslash,0,ht#,dp#); "Cable right slant connector"; |
| 389 |
pickup symbol_pen; |
| 390 |
x4 - x3 = cableslant; 0.5[x3,x4]=0; |
| 391 |
y3=botcableheight; y4=topcableheight; |
| 392 |
draw z3--z4; |
| 393 |
symbolpic0 := currentpicture; |
| 394 |
endchar; |
| 395 |
|
| 396 |
beginchar(leftslash,0,ht#,dp#); "Cable left slant connector"; |
| 397 |
pickup symbol_pen; |
| 398 |
x3 - x4 = cableslant; 0.5[x3,x4]=0; |
| 399 |
y3=botcableheight; y4=topcableheight; |
| 400 |
draw z3--z4; |
| 401 |
symbolpic0 := currentpicture; |
| 402 |
endchar; |
| 403 |
|
| 404 |
|
| 405 |
beginchar(cabletopleft,0,ht#,dp#); "Cable top left connector"; |
| 406 |
pickup pensquare scaled symbolwidth; |
| 407 |
rt x2 - lft x1 = wd+2cableextend; lft x1 = -wd + cablebargap/2; |
| 408 |
y1=y2=topcableheight; |
| 409 |
symbolpath0 := z1--z2; |
| 410 |
draw symbolpath0; |
| 411 |
symbolpic0 := currentpicture; |
| 412 |
endchar; |
| 413 |
beginchar(cabletopright,0,ht#,dp#); "Cable top right connector"; |
| 414 |
currentpicture := symbolpic0 reflectedabout ((0,0),(0,h)); |
| 415 |
endchar; |
| 416 |
beginchar(cablebotleft,0,ht#,dp#); "Cable bot left connector"; |
| 417 |
pickup pensquare scaled symbolwidth; |
| 418 |
y1=y2=botcableheight; |
| 419 |
x1 = xpart (point 0 of symbolpath0); |
| 420 |
x2 = xpart (point 1 of symbolpath0); |
| 421 |
draw z1--z2; |
| 422 |
symbolpic0 := currentpicture; |
| 423 |
endchar; |
| 424 |
beginchar(cablebotright,0,ht#,dp#); "Cable bot right connector"; |
| 425 |
currentpicture := symbolpic0 reflectedabout ((0,0),(0,h)); |
| 426 |
endchar; |
| 427 |
|
| 428 |
beginchar(cableleftslash,0,ht#,dp#); "Cable slash connector"; |
| 429 |
pickup pensquare scaled symbolwidth; |
| 430 |
y1 = y2 = botcableheight; |
| 431 |
rt x1 = - cableslant/2; lft x2 = -wd + cablebargap/2; |
| 432 |
draw z1--z2; |
| 433 |
symbolpic0 := currentpicture; |
| 434 |
endchar; |
| 435 |
beginchar(cablerightbackslash,0,ht#,dp#); "Cable slash connector"; |
| 436 |
currentpicture := symbolpic0 reflectedabout ((0,0),(0,h)); |
| 437 |
endchar; |
| 438 |
beginchar(cableleftbackslash,0,ht#,dp#); "Cable slash connector"; |
| 439 |
pickup pensquare scaled symbolwidth; |
| 440 |
y1 = y2 = topcableheight; |
| 441 |
rt x1 = - cableslant/2; lft x2 = -wd + cablebargap/2; |
| 442 |
draw z1--z2; |
| 443 |
symbolpic0 := currentpicture; |
| 444 |
endchar; |
| 445 |
beginchar(cablerightslash,0,ht#,dp#); "Cable slash connector"; |
| 446 |
currentpicture := symbolpic0 reflectedabout ((0,0),(0,h)); |
| 447 |
endchar; |
| 448 |
|
| 449 |
if gridfont: |
| 450 |
beginchar(left_cable_grid,wd#,ht#,dp#); "Left-end cable outlines"; |
| 451 |
leftgrid_charbox; endchar; |
| 452 |
beginchar(mid_cable_grid,wd#,ht#,dp#); "Cable outlines"; |
| 453 |
topbotgrid_charbox; endchar; |
| 454 |
beginchar(mid_cable_grid_rt,wd#,ht#,dp#); "Cable outlines"; |
| 455 |
topbotgrid_charbox; endchar; |
| 456 |
beginchar(right_cable_grid_bg,wd#,ht#,dp#); "Right-end cable outlines"; |
| 457 |
rightgrid_charbox; endchar; |
| 458 |
beginchar(right_cable_grid_fg,wd#,ht#,dp#); "Right-end cable outlines"; |
| 459 |
rightgrid_charbox; endchar; |
| 460 |
beginchar(right_cable_grid_rt,wd#,ht#,dp#); "Right-end cable outlines"; |
| 461 |
rightgrid_charbox; endchar; |
| 462 |
fi |
| 463 |
|
| 464 |
if fonttype = gridtype: |
| 465 |
ligtable |
| 466 |
"k": |
| 467 |
"p": |
| 468 |
"c": |
| 469 |
"g": |
| 470 |
"o": |
| 471 |
"e": |
| 472 |
"n": |
| 473 |
"d": |
| 474 |
cablebgblock: |
| 475 |
"k" |=: right_cable_grid_bg, |
| 476 |
"c" |=: right_cable_grid_bg, |
| 477 |
"n" |=: right_cable_grid_bg, |
| 478 |
"d" |=: right_cable_grid_bg, |
| 479 |
"p" |=: right_cable_grid_bg, |
| 480 |
"g" |=: right_cable_grid_bg, |
| 481 |
"e" |=: right_cable_grid_bg, |
| 482 |
"o" |=: right_cable_grid_bg, |
| 483 |
cablebgblock |=: right_cable_grid_bg, |
| 484 |
"K" |=: right_cable_grid_rt, |
| 485 |
"P" |=: right_cable_grid_rt, |
| 486 |
"C" |=: right_cable_grid_rt, |
| 487 |
"G" |=: right_cable_grid_rt, |
| 488 |
"N" |=: right_cable_grid_rt, |
| 489 |
"D" |=: right_cable_grid_rt, |
| 490 |
cablefgblock |=: right_cable_grid_rt, |
| 491 |
right_cable_grid_rt =:| left_cable_grid, |
| 492 |
right_cable_grid_bg =:| left_cable_grid; |
| 493 |
|
| 494 |
ligtable |
| 495 |
"K": |
| 496 |
"P": |
| 497 |
"C": |
| 498 |
"G": |
| 499 |
"N": |
| 500 |
"D": |
| 501 |
cablefgblock: |
| 502 |
"k" |=: right_cable_grid_rt, |
| 503 |
"c" |=: right_cable_grid_rt, |
| 504 |
"n" |=: right_cable_grid_rt, |
| 505 |
"d" |=: right_cable_grid_rt, |
| 506 |
"p" |=: right_cable_grid_rt, |
| 507 |
"g" |=: right_cable_grid_rt, |
| 508 |
"e" |=: right_cable_grid_rt, |
| 509 |
"o" |=: right_cable_grid_rt, |
| 510 |
cablebgblock |=: right_cable_grid_rt, |
| 511 |
"K" |=: right_cable_grid_fg, |
| 512 |
"P" |=: right_cable_grid_fg, |
| 513 |
"C" |=: right_cable_grid_fg, |
| 514 |
"G" |=: right_cable_grid_fg, |
| 515 |
"N" |=: right_cable_grid_fg, |
| 516 |
"D" |=: right_cable_grid_fg, |
| 517 |
cablefgblock |=: right_cable_grid_fg, |
| 518 |
right_cable_grid_rt =:| left_cable_grid, |
| 519 |
right_cable_grid_fg =:| left_cable_grid; |
| 520 |
|
| 521 |
ligtable |
| 522 |
right_cable_grid_fg: |
| 523 |
"k" |=: right_cable_grid_rt, |
| 524 |
"n" |=: right_cable_grid_rt, |
| 525 |
"d" |=: right_cable_grid_rt, |
| 526 |
"p" |=: right_cable_grid_rt, |
| 527 |
"e" |=: right_cable_grid_rt, |
| 528 |
"o" |=: right_cable_grid_rt, |
| 529 |
cablebgblock |=: right_cable_grid_rt, |
| 530 |
"K" |=: right_cable_grid_fg, |
| 531 |
"P" |=: right_cable_grid_fg, |
| 532 |
"C" |=: right_cable_grid_fg, |
| 533 |
"G" |=: right_cable_grid_fg, |
| 534 |
"N" |=: right_cable_grid_fg, |
| 535 |
"D" |=: right_cable_grid_fg, |
| 536 |
cablefgblock |=: right_cable_grid_fg, |
| 537 |
right_cable_grid_rt =:| mid_cable_grid, |
| 538 |
right_cable_grid_fg =:| mid_cable_grid; |
| 539 |
ligtable |
| 540 |
right_cable_grid_bg: |
| 541 |
"k" |=: right_cable_grid_bg, |
| 542 |
"c" |=: right_cable_grid_bg, |
| 543 |
"n" |=: right_cable_grid_bg, |
| 544 |
"d" |=: right_cable_grid_bg, |
| 545 |
"p" |=: right_cable_grid_bg, |
| 546 |
"g" |=: right_cable_grid_bg, |
| 547 |
"e" |=: right_cable_grid_bg, |
| 548 |
"o" |=: right_cable_grid_bg, |
| 549 |
cablebgblock |=: right_cable_grid_bg, |
| 550 |
"K" |=: right_cable_grid_rt, |
| 551 |
"P" |=: right_cable_grid_rt, |
| 552 |
"N" |=: right_cable_grid_rt, |
| 553 |
"D" |=: right_cable_grid_rt, |
| 554 |
cablefgblock |=: right_cable_grid_rt, |
| 555 |
right_cable_grid_rt =:| mid_cable_grid, |
| 556 |
right_cable_grid_bg =:| mid_cable_grid; |
| 557 |
ligtable |
| 558 |
right_cable_grid_rt: |
| 559 |
"k" |=: right_cable_grid_rt, |
| 560 |
"n" |=: right_cable_grid_rt, |
| 561 |
"d" |=: right_cable_grid_rt, |
| 562 |
"p" |=: right_cable_grid_rt, |
| 563 |
"e" |=: right_cable_grid_rt, |
| 564 |
"o" |=: right_cable_grid_rt, |
| 565 |
cablebgblock |=: right_cable_grid_rt, |
| 566 |
"K" |=: right_cable_grid_rt, |
| 567 |
"P" |=: right_cable_grid_rt, |
| 568 |
"N" |=: right_cable_grid_rt, |
| 569 |
"D" |=: right_cable_grid_rt, |
| 570 |
cablefgblock |=: right_cable_grid_rt, |
| 571 |
right_cable_grid_rt =:| mid_cable_grid; |
| 572 |
fi |
| 573 |
|
| 574 |
if fonttype = foretype: |
| 575 |
|
| 576 |
for leftglyph = "k", "p", "o", "e", "n", "d", "c", "g", "cablebgblock": |
| 577 |
if leftglyph = "cablebgblock": |
| 578 |
leftglyphlig := cablebgblockleft; |
| 579 |
elseif leftglyph = "c": |
| 580 |
leftglyphlig := kleft; |
| 581 |
elseif leftglyph = "g": |
| 582 |
leftglyphlig := pleft; |
| 583 |
else: |
| 584 |
leftglyphlig := scantokens (leftglyph & "left"); |
| 585 |
fi |
| 586 |
ligtable if leftglyph = "cablebgblock": cablebgblock else: leftglyph fi: |
| 587 |
"k" |=:| cablebotleft, |
| 588 |
"c" |=:| cablebotleft, |
| 589 |
"n" |=:| cablebotleft, |
| 590 |
"d" |=:| cablebotleft, |
| 591 |
"p" |=:| cablebotleft, |
| 592 |
"g" |=:| cablebotleft, |
| 593 |
"e" |=:| cablebotleft, |
| 594 |
"o" |=:| cablebotleft, |
| 595 |
cablebgblock |=:| cablebotleft, |
| 596 |
"K" |=:| rightslash, |
| 597 |
"P" |=:| rightslash, |
| 598 |
"N" |=:| rightslash, |
| 599 |
"D" |=:| rightslash, |
| 600 |
cablefgblock |=:| rightslash, |
| 601 |
rightslash |=:| cableleftslash, |
| 602 |
cablebotleft =:| leftglyphlig, |
| 603 |
cableleftslash =:| leftglyphlig; |
| 604 |
endfor |
| 605 |
|
| 606 |
for leftglyph = "K", "P", "C", "G", "N", "D", "cablefgblock": |
| 607 |
if leftglyph = "cablefgblock": |
| 608 |
leftglyphlig := cablefgblockleft; |
| 609 |
elseif leftglyph = "C": |
| 610 |
leftglyphlig := Kleft; |
| 611 |
elseif leftglyph = "G": |
| 612 |
leftglyphlig := Pleft; |
| 613 |
else: |
| 614 |
leftglyphlig := scantokens (leftglyph & "left"); |
| 615 |
fi |
| 616 |
ligtable if leftglyph = "cablefgblock": cablefgblock else: leftglyph fi: |
| 617 |
"K" |=:| cabletopleft, |
| 618 |
"P" |=:| cabletopleft, |
| 619 |
"G" |=:| cabletopleft, |
| 620 |
"C" |=:| cabletopleft, |
| 621 |
"N" |=:| cabletopleft, |
| 622 |
"D" |=:| cabletopleft, |
| 623 |
cablefgblock |=:| cabletopleft, |
| 624 |
"k" |=:| leftslash, |
| 625 |
"p" |=:| leftslash, |
| 626 |
"o" |=:| leftslash, |
| 627 |
"e" |=:| leftslash, |
| 628 |
"n" |=:| leftslash, |
| 629 |
"d" |=:| leftslash, |
| 630 |
cablebgblock |=:| leftslash, |
| 631 |
leftslash |=:| cableleftbackslash, |
| 632 |
cabletopleft =:| leftglyphlig, |
| 633 |
cableleftbackslash =:| leftglyphlig; |
| 634 |
endfor |
| 635 |
|
| 636 |
ligtable |
| 637 |
Kright: |
| 638 |
Pright: |
| 639 |
Nright: |
| 640 |
Dright: |
| 641 |
cablefgblockright: |
| 642 |
"K" |=: Kright, |
| 643 |
Kright |=:| cabletopright, |
| 644 |
"P" |=: Pright, |
| 645 |
Pright |=:| cabletopright, |
| 646 |
"N" |=: Nright, |
| 647 |
Nright |=:| cabletopright, |
| 648 |
"D" |=: Dright, |
| 649 |
Dright |=:| cabletopright, |
| 650 |
cablefgblock |=: cablefgblockright, |
| 651 |
cablefgblockright |=:| cabletopright; |
| 652 |
|
| 653 |
ligtable |
| 654 |
kright: |
| 655 |
pright: |
| 656 |
oright: |
| 657 |
eright: |
| 658 |
nright: |
| 659 |
dright: |
| 660 |
cablebgblockright: |
| 661 |
"k" |=: kright, |
| 662 |
kright |=:| cablebotright, |
| 663 |
"p" |=: pright, |
| 664 |
pright |=:| cablebotright, |
| 665 |
"o" |=: oright, |
| 666 |
oright |=:| cablebotright, |
| 667 |
"e" |=: eright, |
| 668 |
eright |=:| cablebotright, |
| 669 |
"n" |=: nright, |
| 670 |
nright |=:| cablebotright, |
| 671 |
"d" |=: dright, |
| 672 |
dright |=:| cablebotright, |
| 673 |
cablebgblock |=: cablebgblockright, |
| 674 |
cablebgblockright |=:| cablebotright; |
| 675 |
|
| 676 |
ligtable rightslash: |
| 677 |
"K" |=: Kright, |
| 678 |
Kright |=:| cablerightslash, |
| 679 |
"P" |=: Pright, |
| 680 |
Pright |=:| cablerightslash, |
| 681 |
"N" |=: Nright, |
| 682 |
Nright |=:| cablerightslash, |
| 683 |
"D" |=: Dright, |
| 684 |
Dright |=:| cablerightslash, |
| 685 |
cablefgblock |=: cablefgblockright, |
| 686 |
cablefgblockright |=:| cablerightslash; |
| 687 |
ligtable leftslash: |
| 688 |
"k" |=: kright, |
| 689 |
"p" |=: pright, |
| 690 |
"o" |=: oright, |
| 691 |
"e" |=: eright, |
| 692 |
"n" |=: nright, |
| 693 |
"d" |=: dright, |
| 694 |
cablebgblock |=: cablebgblockright, |
| 695 |
kright |=:| cablerightbackslash, |
| 696 |
nright |=:| cablerightbackslash, |
| 697 |
dright |=:| cablerightbackslash, |
| 698 |
pright |=:| cablerightbackslash, |
| 699 |
eright |=:| cablerightbackslash, |
| 700 |
oright |=:| cablerightbackslash, |
| 701 |
cablebgblockright |=:| cablerightbackslash; |
| 702 |
|
| 703 |
fi |