% Copyright (c) 2026 Simon Rubinstein-Salzedo. % Distributed under the LaTeX Project Public License, version 1.3c or later. % Maintenance status: maintained. Current Maintainer: Simon Rubinstein-Salzedo. % License: https://www.latex-project.org/lppl.txt % See README.md for the list of files and attribution. % Adapted from the combgames symbol designs by Raymond Chen, % David Wolfe and Aaron N. Siegel; this is a renamed, modified source. prologues := 3; % outputtemplate := "%j-%c.mps"; outputformat := "svg"; % MetaPost 2.x outputtemplate := "%j-%c.svg"; % e.g., mysyms-15.svg, -16.svg, ... % Keep the nominal layout box, but never exclude ink (including pen width). % This also handles reflected pictures and strokes below the baseline. def fitbounds(expr nominal) = begingroup save bboxmargin, ink, lo, hi; bboxmargin := 0; path ink; ink := bbox currentpicture; pair lo, hi; lo := (min(xpart llcorner ink, xpart llcorner nominal), min(ypart llcorner ink, ypart llcorner nominal)); hi := (max(xpart urcorner ink, xpart urcorner nominal), max(ypart urcorner ink, ypart urcorner nominal)); setbounds currentpicture to (lo -- (xpart hi, ypart lo) -- hi -- (xpart lo, ypart hi) -- cycle); endgroup enddef; beginfig(0); % --- CM10-ish parameters (10pt) --- u := 10/18pt; % ≈0.55556 pt w := 12u; % glyph width (like MF) x_height := 4.30556pt; % cmr10 ex asc_height := 6.94444pt; % cap/asc height asc_depth := 2.0pt; rule_thickness := 0.40pt; % bar thickness spread := 0.45*x_height; % half spacing center↔outer bar % Arrowhead geometry bar_frac := .4; head_frac := 0.48; % head height as fraction of asc_height overhang := 2u; % how far the head base extends beyond each outer bar % --- derived geometry --- numeric h, d, xmid, ybase; h := asc_height; d := asc_depth; xmid := .5w; ybase := h - head_frac*asc_height; barbase := h - bar_frac*asc_height; % bar x-positions numeric xl, xc, xr; xl := xmid - spread; xc := xmid; xr := xmid + spread; % Draw the three stems with round ends; the middle stem reaches the apex. pickup pencircle scaled rule_thickness; draw (xl,-d)--(xl,barbase); draw (xc,-d)--(xc,h); draw (xr,-d)--(xr,barbase); % Stroked, curved arrowhead using MF's golden-ratio control anchor pair A, BL, BR, M, Znine; A := (xmid, h); % apex BL := (xl - overhang, ybase); % base corners OUTSIDE the outer bars BR := (xr + overhang, ybase); M := .5[BL, BR]; Znine := 0.381966[M, A]; % MF used 0.381966 (=1/phi^2) path leftedge, rightedge; leftedge := A .. {BL - Znine} BL; rightedge := A .. {BR - Znine} BR; draw leftedge; draw rightedge; fitbounds((0,-d)--(w,-d)--(w,h)--(0,h)--cycle); picture TRIPLEUP; TRIPLEUP := currentpicture; endfig; beginfig(1); draw TRIPLEUP yscaled -1; fitbounds((0,-h)--(w,-h)--(w,d)--(0,d)--cycle); endfig; beginfig(2); % --- CM10-ish parameters (10pt) --- u := 10/18pt; % ≈0.55556 pt w := 12u; % glyph width (like MF) x_height := 4.30556pt; % cmr10 ex asc_height := 6.94444pt; % cap/asc height asc_depth := 2.0pt; rule_thickness := 0.40pt; % bar thickness spread := 0.3*x_height; % half spacing center↔outer bar % Arrowhead geometry bar_frac := .4; head_frac := 0.47; % head height as fraction of asc_height overhang := 2u; % how far the head base extends beyond each outer bar % --- derived geometry --- numeric h, d, xmid, ybase; h := asc_height; d := asc_depth; xmid := .5w; ybase := h - head_frac*asc_height; barbase := h - bar_frac*asc_height; h1 := .45*ybase + .55*h; % bar x-positions numeric xl, xc, xr; xl := xmid - 1.5spread; xl1 := xmid - .5spread; xr1 := xmid + .5spread; xr := xmid + 1.5spread; % Draw four stems with round ends; the inner pair reaches higher. pickup pencircle scaled rule_thickness; draw (xl,-d)--(xl,barbase); draw (xl1,-d)--(xl1,h1); draw (xr1,-d)--(xr1,h1); draw (xr,-d)--(xr,barbase); % Stroked, curved arrowhead using MF's golden-ratio control anchor pair A, BL, BR, M, Znine; A := (xmid, h); % apex BL := (xl - overhang, ybase); % base corners OUTSIDE the outer bars BR := (xr + overhang, ybase); M := .5[BL, BR]; Znine := 0.381966[M, A]; % MF used 0.381966 (=1/phi^2) path leftedge, rightedge; leftedge := A .. {BL - Znine} BL; rightedge := A .. {BR - Znine} BR; draw leftedge; draw rightedge; fitbounds((0,-d)--(w,-d)--(w,h)--(0,h)--cycle); picture QUADUP; QUADUP := currentpicture; endfig; beginfig(3); draw QUADUP yscaled -1; fitbounds((0,-h)--(w,-h)--(w,d)--(0,d)--cycle); endfig; beginfig(15); % CM10-like parameters at 10pt u := 10/18pt; % ≈ 0.55556 pt w := 17u; % ≈ 9.444 pt x_height := 4.30556pt; % cmr10 x-height spread := 1.25*x_height; % ≈ 5.382 pt rule_thickness := 0.40pt; % TeX default rule thickness pickup pencircle scaled rule_thickness; % --- exact MF relations --- x2 := w - 1.5u; y2 := 0; % tip x1 := w - x2 + 3u; x3 := x1; % base line y1 := .5*spread; y3 := - .5*spread; x4 := x1 - 3u; x5 := x4; % vertical bar y4 := y1; y5 := y3; draw z1--z2--z3--cycle; % triangle outline draw z4--z5; % vertical bar picture GFUZ; GFUZ = currentpicture; fitbounds((0,-.5spread)--(w,-.5spread)--(w,.5spread)--(0,.5spread)--cycle); endfig; beginfig(16); draw GFUZ xscaled -1; fitbounds((-w,-.5spread)--(0,-.5spread)--(0,.5spread)--(-w,.5spread)--cycle); endfig; beginfig(17); % CM10-like parameters at 10pt u := 10/18pt; % ≈ 0.55556 pt w := 17u; % ≈ 9.444 pt x_height := 4.30556pt; % cmr10 x-height spread := 1.25*x_height; % ≈ 5.382 pt rule_thickness := 0.40pt; % TeX default rule thickness pickup pencircle scaled rule_thickness; % --- exact MF relations --- x2 := w - 1.5u; y2 := 0; % tip x1 := w - x2 + 3u; x3 := x1; % base line y1 := .5*spread; y3 := - .5*spread; x4 := x1 - 3u; x5 := x4; % vertical bar y4 := y1; y5 := y3; draw z1--z3; % vertical bar draw z4--z5; % vertical bar fitbounds((0,-.5spread)--(w,-.5spread)--(w,.5spread)--(0,.5spread)--cycle); endfig; beginfig(30); u := 10/18pt; % ≈0.5556 pt x_height := 4.30556pt; h := 0.90*x_height; % height above axis w := 2*h + 2*u; % makes horizontal length = vertical length = 2h d := h; % symmetric depth math_axis := 0; % --- key knobs (make ends BIG, center thin) --- flare := 0.15*w; % end half-thickness driver (≈ 2 pt if w≈5.6 pt) stem := 0.50pt; % center stroke thickness before the 1.1 factor % nodes per MF relations z1 = (0.5w, h); z2 = (0.5w, -h); % vertical ends z5 = (0.5w, math_axis); % vertical mid z6 = (0.5w, math_axis); % horizontal mid z3 = (u, math_axis); % left end z4 = (w-u, math_axis); % right end % variable-width outlines (MF: pos1(2flare,0), pos5(1.1stem,0), etc.) numeric fl, st; fl := 2*flare; st := 1.1*stem; % vertical stroke offsets (±x) z1l = (x1 - .5*fl, y1); z1r = (x1 + .5*fl, y1); z5l = (x5 - .5*st, y5); z5r = (x5 + .5*st, y5); z2l = (x2 - .5*fl, y2); z2r = (x2 + .5*fl, y2); % horizontal stroke offsets (±y) z3l = (x3, y3 - .5*fl); z3r = (x3, y3 + .5*fl); z6l = (x6, y6 - .5*st); z6r = (x6, y6 + .5*st); z4l = (x4, y4 - .5*fl); z4r = (x4, y4 + .5*fl); % build the two stroked shapes and fill them (like MF's filldraw stroke ...) path Vleft, Vright, Hleft, Hright; Vleft := z1l .. z5l .. z2l; Vright := z1r .. z5r .. z2r; Hleft := z3l .. z6l .. z4l; Hright := z3r .. z6r .. z4r; fill Vleft -- reverse Vright -- cycle; fill Hleft -- reverse Hright -- cycle; % bounding box like beginarithchar (so scaling behaves) fitbounds((0,-d)--(w,-d)--(w,h)--(0,h)--cycle); endfig; beginfig(31); u := 10/18pt; % ≈0.5556 pt x_height := 4.30556pt; h := 0.90*x_height; % height above axis w := 2*h + 2*u; % makes horizontal length = vertical length = 2h d := h; % symmetric depth math_axis := 0; % --- key knobs (make ends BIG, center thin) --- flare := 0.15*w; % end half-thickness driver (≈ 2 pt if w≈5.6 pt) stem := 0.50pt; % center stroke thickness before the 1.1 factor % nodes per MF relations z1 = (0.5w, h); z2 = (0.5w, -h); % vertical ends z5 = (0.5w, math_axis); % vertical mid z6 = (0.5w, math_axis); % horizontal mid z3 = (u, math_axis); % left end z4 = (w-u, math_axis); % right end % variable-width outlines (MF: pos1(2flare,0), pos5(1.1stem,0), etc.) numeric fl, st; fl := 2*flare; st := 1.1*stem; % vertical stroke offsets (±x) z1l = (x1 - .5*fl, y1); z1r = (x1 + .5*fl, y1); z5l = (x5 - .5*st, y5); z5r = (x5 + .5*st, y5); z2l = (x2 - .5*fl, y2); z2r = (x2 + .5*fl, y2); % horizontal stroke offsets (±y) z3l = (x3, y3 - .5*fl); z3r = (x3, y3 + .5*fl); z6l = (x6, y6 - .5*st); z6r = (x6, y6 + .5*st); z4l = (x4, y4 - .5*fl); z4r = (x4, y4 + .5*fl); % build the two stroked shapes and fill them (like MF's filldraw stroke ...) path Vleft, Vright, Hleft, Hright; Vleft := z1l .. z5l .. z2l; Vright := z1r .. z5r .. z2r; Hleft := z3l .. z6l .. z4l; Hright := z3r .. z6r .. z4r; fill Hleft -- reverse Hright -- cycle; % bounding box like beginarithchar (so scaling behaves) fitbounds((0,-d)--(w,-d)--(w,h)--(0,h)--cycle); endfig; beginfig(40); u := 10/18pt; % ≈0.5556 pt w := 12u; % glyph width x_height := 4.30556pt; h := 0.90*x_height; % height above axis d := h; % symmetric depth (arith char) rule_thickness := 0.40pt; pickup pencircle scaled rule_thickness; % points (MF relations) z0 = (.5w, 0); % math axis z1 = (.5w, h); % top of stem z2 = (.5w, -h); % bottom of stem x3 := u; y3 := -0.5h; % y3 = 0.5[y0,y2] with y0=0, y2=-h x4 := w - x3; y4 := y3; z3 = (x3, y3); z4 = (x4, y4); draw z1--z2; % stem draw z3--z0--z4; % V-shaped crossbar fitbounds((0,-d)--(w,-d)--(w,h)--(0,h)--cycle); picture UPSUM; UPSUM = currentpicture; endfig; beginfig(41); draw UPSUM yscaled -1; fitbounds((0,-d)--(w,-d)--(w,h)--(0,h)--cycle); endfig; beginfig(50); % --- metrics (CM10-ish defaults; tweak as you like) --- u := 10/18pt; % ~0.5556 pt w := 18u; % glyph width (from beginchar(...,18u,...)) asc_height := 6.94444pt; % cap height desc_depth := 2.0pt; % descender depth x_height := 4.30556pt; % ex bar_height := 0.50*x_height; % MF used 'bar_height' (tweak if needed) rule_thickness := 0.40pt; % stroke for inner lines circle_factor := 1.5; % MF drew circle with 1.5*rule_thickness % --- circle geometry (make it a true circle touching the 4 extremes) --- % MF set: left x6 = u, right x2 = w-u; top y8 = h+o; bottom y4 = -d-o % Choose 'o' so horizontal and vertical diameters match (a true circle): h := asc_height; d := desc_depth; o := 0.5*((w - 2u) - (h + d)); % may be slightly negative; that’s fine pair C; numeric R; C := (.5w, .5*(h - d)); % circle center R := .5*(w - 2u); % radius ( = .5*(h+d+2o) by construction) % outer circle (thicker pen, like 'pencircle scaled 1.5rule_thickness') pickup pencircle scaled (circle_factor*rule_thickness); draw fullcircle scaled (2R) shifted C; % --- inner strokes (round pen, matching the other line symbols) --- pickup pencircle scaled rule_thickness; % MF: lft x9 = good.x (.5w - 2u); x9 = x10 = x15; x11 = x12 = w - x9 x9 := .5w - 2u; x10 := x9; x15 := x9; x11 := w - x9; x12 := x11; % MF: y10=y12=.5h-6u; y9=.5h+2u; y10 := .5h - 6u; y12 := y10; y9 := .5h + 2u; % MF: y15=y11=(x_height/asc_height)[y10,y9]; y11 := (x_height/asc_height)[y10,y9]; y15 := y11; % points z9 = (x9, y9); z10 = (x10,y10); z11 = (x11,y11); z12 = (x12,y12); z15 = (x15,y15); % MF: z13 = (.7*bar_height/asc_height)[z10,z9]; z13 = (.7*bar_height/asc_height)[z10,z9]; % MF: z14 = whatever[z11,z13] = whatever[z12,z15]; % (intersection of the two infinite lines through those pairs) z14 = whatever[z11,z13] = whatever[z12,z15]; % draw the three segments draw z9--z10; % short vertical on the left draw z13--z11; % upper diagonal to the right draw z14--z12; % lower diagonal to the right % explicit bounding box (so scaling/clipping behaves like beginchar) fitbounds((0,-d - o)--(w,-d - o)--(w,h + o)--(0,h + o)--cycle); picture KO; KO = currentpicture; endfig; beginfig(51); % --- metrics (CM10-ish defaults; tweak as you like) --- u := 10/18pt; % ~0.5556 pt w := 18u; % glyph width (from beginchar(...,18u,...)) asc_height := 6.94444pt; % cap height desc_depth := 2.0pt; % descender depth x_height := 4.30556pt; % ex bar_height := 0.50*x_height; % MF used 'bar_height' (tweak if needed) rule_thickness := 0.40pt; % stroke for inner lines circle_factor := 1.5; % MF drew circle with 1.5*rule_thickness % --- circle geometry (make it a true circle touching the 4 extremes) --- % MF set: left x6 = u, right x2 = w-u; top y8 = h+o; bottom y4 = -d-o % Choose 'o' so horizontal and vertical diameters match (a true circle): h := asc_height; d := desc_depth; o := 0.5*((w - 2u) - (h + d)); % may be slightly negative; that’s fine pair C; numeric R; C := (.5w, .5*(h - d)); % circle center R := .5*(w - 2u); % radius ( = .5*(h+d+2o) by construction) % outer circle (thicker pen, like 'pencircle scaled 1.5rule_thickness') pickup pencircle scaled (circle_factor*rule_thickness); draw fullcircle scaled (2R) shifted C; % --- inner strokes (round pen, matching the other line symbols) --- pickup pencircle scaled rule_thickness; % MF relations: % lft x9 = good.x(.5w - 3u); x9 = x10; x11 = x12 = w - x9 x9 := .5w - 3u; x10 := x9; x11 := w - x9; x12 := x11; % y10 = y12 = .5h - 6u; y9 = .5h + 2u; y11 = y9 y10 := .5h - 6u; y12 := y10; y9 := .5h + 2u; y11 := y9; z9 = (x9, y9); z10 = (x10, y10); z11 = (x11, y11); z12 = (x12, y12); % z13 = 1/3[z10,z9]; z14 = whatever[z11,z13] = whatever[z9,z12] z13 = 1/3[z10, z9]; z14 = whatever[z11, z13] = whatever[z9, z12]; % draw segments draw z9--z10; % left short vertical draw z13--z11; % upper right diagonal draw z14--z12; % lower right diagonal % match beginchar bbox fitbounds((0,-d - o)--(w,-d - o)--(w,h + o)--(0,h + o)--cycle); picture KOBIG; KOBIG = currentpicture; endfig; beginfig(52); draw KO; % --- metrics (CM10-ish) --- u := 10/18pt; % ≈0.5556 pt w := 18u; % beginchar(...,18u,...) asc_height := 6.94444pt; % h desc_depth := 2.0pt; % d x_height := 4.30556pt; % ex rule_thickness := 0.40pt; % compute_spread(.2ex,.3ex) → take a mid value: spread := 0.25*x_height; h := asc_height; d := desc_depth; % MF beginchar had top = h + spread + rule_thickness o := spread + rule_thickness; % makes top bounds = h + o % endpoints (rt x5 = w - 2.5u, lft x6 = 2.5u; ignore tiny ±eps) x6 := 2.5u; x5 := w - 2.5u; % Centerline y so the top of the round stroke sits at h+o ybar := (h + o) - 0.5*rule_thickness; % draw the bar with rule-like pen pickup pencircle scaled rule_thickness; draw (x6, ybar) -- (x5, ybar); % bounds like beginchar(..., 18u, h+spread+rule_thickness, d) fitbounds((0,-d)--(w,-d)--(w,h+o)--(0,h+o)--cycle); endfig; beginfig(53); draw KOBIG; % --- metrics (CM10-ish) --- u := 10/18pt; % ≈0.5556 pt w := 18u; % beginchar(...,18u,...) asc_height := 6.94444pt; % h desc_depth := 2.0pt; % d x_height := 4.30556pt; % ex rule_thickness := 0.40pt; % compute_spread(.2ex,.3ex) → take a mid value: spread := 0.25*x_height; h := asc_height; d := desc_depth; % MF beginchar had top = h + spread + rule_thickness o := spread + rule_thickness; % makes top bounds = h + o % endpoints (rt x5 = w - 2.5u, lft x6 = 2.5u; ignore tiny ±eps) x6 := 2.5u; x5 := w - 2.5u; % Centerline y so the top of the round stroke sits at h+o ybar := (h + o) - 0.5*rule_thickness; % draw the bar with rule-like pen pickup pencircle scaled rule_thickness; draw (x6, ybar) -- (x5, ybar); % bounds like beginchar(..., 18u, h+spread+rule_thickness, d) fitbounds((0,-d)--(w,-d)--(w,h+o)--(0,h+o)--cycle); endfig; beginfig(70); % CM-ish metrics u := 10/18pt; h := 6.94444pt; % ascender d := 2.0pt; % descender w := h + d; % like beginchar(width=h+d) % outline style rule_thickness := 0.45pt; pickup pencircle scaled rule_thickness; % geometry pair C, vo, vi; numeric R, r, rotdeg; C := (0.5w, 0.5*(h - d)); R := 0.5*(h + d); % outer radius (hits y=h and y=-d) r := R*0.381966; % inner radius = R/φ^2 (regular star) rotdeg := 0; % extra rotation if desired % start with "up" vectors and rotate by multiples of 72° (outer) / 36° offset (inner) vo := (0, R) rotated rotdeg; % first outer vertex (top) vi := (0, r) rotated (rotdeg - 36); % first inner vertex % build vertices z0..z9 alternating outer/inner z0 = C + vo; z1 = C + vi; for i = 1 upto 4: vo := vo rotated -72; z[2*i] = C + vo; % next outer vi := vi rotated -72; z[2*i+1] = C + vi; % next inner endfor % draw outline (hollow star) draw z0--z1--z2--z3--z4--z5--z6--z7--z8--z9--cycle; % explicit bounds (like beginchar) fitbounds((0,-d)--(w,-d)--(w,h)--(0,h)--cycle); endfig; % Minor circular arc through exact endpoints A and B about center C. % Use cubic pieces spanning at most 45 degrees. Unlike angle-to-path-time % conversion, this preserves both endpoints and their circular tangents. vardef minorcirclearc(expr C, A, B) = save sweep, count, arcstep, k, P, Q, arc; numeric sweep, count, arcstep, k; pair P, Q; path arc; sweep := angle(B-C) - angle(A-C); if sweep > 180: sweep := sweep - 360 fi; if sweep < -180: sweep := sweep + 360 fi; count := max(1, ceiling(abs(sweep)/45)); arcstep := sweep/count; k := (4/3)*sind(arcstep/4)/cosd(arcstep/4); P := A; arc := A; for i = 1 upto count: Q := if i = count: B else: C + (A-C) rotated (i*arcstep) fi; arc := arc .. controls (P + k*((P-C) rotated 90)) and (Q - k*((Q-C) rotated 90)) .. Q; P := Q; endfor arc enddef; beginfig(80); % metrics u := 10/18pt; w := 18u; h := 6.94444pt; d := 2.0pt; rule_thickness := 0.40pt; % outer circle touching x=u, x=w-u and y=h+o, y=-d-o numeric o; o := 0.5*((w - 2u) - (h + d)); pair Co; numeric Ro, s; Co = (0.5w, 0.5*(h - d)); Ro = 0.5*(w - 2u); s = Ro/sqrt(2); % circle points (do NOT declare z1..z8) z8 = Co + (0, Ro); z4 = Co + (0, -Ro); z6 = Co + (-Ro, 0); z2 = Co + ( Ro, 0); z7 = Co + (-s, s); z1 = Co + ( s, s); z3 = Co + ( s, -s); z5 = Co + (-s,-s); % inner circle center on perp. bisector of chord z4--z7 numeric bulge; bulge := 0.24; % 0.20 thin … 0.30 fuller pair Ci; Ci = 0.5[z4,z7] + bulge*unitvector((z7 - z4) rotated 90); % Outer circle; the inner arc is constructed through its exact endpoints. path circO, innerarc; circO := fullcircle scaled (2*Ro) shifted Co; % stroke style pickup pencircle scaled rule_thickness; % ---------- OUTER: clockwise arc z7 -> z4 via top/right ---------- % fullcircle has exact eighth-circle knots: z7 at 3 and z4 at 6. draw reverse subpath (6, 11) of circO; % ---------- INNER: minor arc from z4 to z7 ---------- innerarc := minorcirclearc(Ci, z4, z7); draw innerarc; % bounds like MF beginchar with overshoot fitbounds((0,-d - o)--(w,-d - o)--(w,h + o)--(0,h + o)--cycle); endfig; beginfig(81); % --- metrics (CM-ish) --- u := 10/18pt; % ≈ 0.5556 pt w := 18u; % beginchar(..., 18u, ...) h := 6.94444pt; % asc_height d := 2.0pt; % desc_depth rule_thickness := 0.40pt; % stroke weight (like rule.nib) eps := 0.01pt; % tiny fudge like MF’s eps % Make the “circle_points” circle truly circular (MF’s overshoot trick) numeric o; o := 0.5*((w - 2u) - (h + d)); pair C; numeric R; C = (0.5w, 0.5*(h - d)); % center = .5[z4,z8] R = 0.5*(w - 2u); % radius (touches x=u and x=w-u) % --- outer circle with a uniform round stroke --- linecap := butt; linejoin := mitered; pickup pencircle scaled rule_thickness; % uniform circular ring; a square pen distorts it draw fullcircle scaled (2R) shifted C; % --- central dot --- % MF: fill fullcircle scaled (length(z4-z8)/2 + eps) shifted (.5[z4,z8]) % Here: |z4-z8| = 2R, so diameter = R + eps. fill fullcircle scaled (R + eps) shifted C; % bounding box like beginchar(..., 18u, h, d) with overshoot fitbounds((0,-d - o)--(w,-d - o)--(w,h + o)--(0,h + o)--cycle); endfig; end.