Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified contact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/contact-sheet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions docs/glyph-slots.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Regenerate with `npm run glyph-catalog`. Machine-readable author JSON: `build/gl
| chess | `chess-bishop-solid-montreal` | fill (fill), border (stroke), highlight (fill+stroke) | — |
| chess | `chess-bishop-solid-traditional` | fill (fill), border (stroke), highlight (fill+stroke) | — |
| chess | `chess-boat-outline-traditional` | fill (fill), border (fill+stroke) | — |
| chess | `chess-boat-solid-traditional` | fill (fill), highlight (fill+stroke), border (stroke) | — |
| chess | `chess-boat-solid-traditional` | fill (fill), border (stroke), highlight (fill+stroke) | — |
| chess | `chess-centaur-outline-traditional` | fill (fill), border (fill+stroke) | — |
| chess | `chess-centaur-solid-traditional` | fill (fill), border (stroke), highlight (fill+stroke) | — |
| chess | `chess-champion-outline-traditional` | fill (fill), border (fill+stroke) | — |
Expand All @@ -46,8 +46,10 @@ Regenerate with `npm run glyph-catalog`. Machine-readable author JSON: `build/gl
| chess | `chess-ferz-solid-traditional` | fill (fill), border (stroke), highlight (fill+stroke) | — |
| chess | `chess-fool-outline-traditional` | fill (fill), border (fill+stroke) | — |
| chess | `chess-fool-solid-traditional` | fill (fill), border (stroke), highlight (fill+stroke) | — |
| chess | `chess-giraffe-bishop-outline-traditional` | fill (fill), border (fill+stroke) | — |
| chess | `chess-giraffe-bishop-solid-traditional` | fill (fill), border (stroke), highlight (fill+stroke) | — |
| chess | `chess-giraffe-outline-traditional` | fill (fill), border (fill+stroke) | — |
| chess | `chess-giraffe-solid-traditional` | fill (fill), highlight (fill+stroke), border (stroke) | — |
| chess | `chess-giraffe-solid-traditional` | fill (fill), border (stroke), highlight (fill+stroke) | — |
| chess | `chess-king-outline-line` | fill (fill), border (fill+stroke) | — |
| chess | `chess-king-outline-millenia` | fill (fill), border (fill+stroke) | — |
| chess | `chess-king-outline-montreal` | fill (fill), border (fill+stroke) | — |
Expand Down
86 changes: 76 additions & 10 deletions src/sheets/contact/chess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,18 +279,17 @@ registerDuotoneGlyph(sheet, "chess-boat-outline-traditional", (canvas: SVGContai
registerSolidChessGlyph(sheet, "chess-boat-solid-traditional", (canvas: SVGContainer) => {
const symbol = canvas.symbol();
const group = symbol.group()
.attr("data-slot-stroke", "border")
.attr("data-slot-fill", "fill")
.attr("data-slot-stroke", "highlight")
.attr("data-slot-stroke", "border")
.fill({color: "#000", opacity: 1, rule: "evenodd"})
.stroke({color: "#000", width: 1.5, linecap: "round", linejoin: "round", miterlimit: 4});
group.path("M24.989 8.206v19.17")
.fill("none")
.attr("data-slot-stroke", "highlight")
.attr("data-slot-stroke", "border")
.stroke({color: "#000", width: 3, linejoin: "miter"});
group.path("M7.543 25.209l17.42-17.07 14.85 17.67")
.fill("none")
.attr("data-slot-stroke", "highlight")
.attr("data-slot-stroke", "border")
.stroke({color: "#000", width: 0.8, linejoin: "miter", linecap: "round"});
group.path("M25.029 8.206v19.17")
.attr("data-slot-stroke", "highlight")
Expand Down Expand Up @@ -920,6 +919,74 @@ registerSolidChessGlyph(sheet, "chess-fool-solid-traditional", (canvas: SVGConta
return symbol;
});

registerDuotoneGlyph(sheet, "chess-giraffe-bishop-outline-traditional", (canvas: SVGContainer) => {
const symbol = canvas.symbol();
const group = symbol.group()
.attr("data-slot-fill", "fill")
.attr("data-slot-stroke", "border")
.fill({color: "#fff", opacity: 1, rule: "evenodd"})
.stroke({color: "#000", width: 1.5, linecap: "round", linejoin: "round", miterlimit: 4});
group.path("M 41 36 C 37.6 35 30.9 36.4 27.5 34 C 24.1 36.4 17.4 35 14 36 C 14 36 12.4 36.5 11 38 C 11.7 39 12.6 39 14 38.5 C 17.4 37.5 24.1 39 27.5 37.5 C 30.9 39 37.6 37.5 41 38.5 C 42.4 39 43.3 39 44 38 C 42.6 36.1 41 36 41 36 Z");
group.path("M 35 32 C 32.5 34.5 22.5 34.5 20 32 C 19.5 30.5 20 30 20 30 H 35 C 35 30 35.5 30.5 35 32 Z");
group.path("M 16.36 0.93 H 18.91 M 17.72 5.01 V -1.15")
.fill("none");
group.path("M 34.975 29.97 C 29.66845 28.002 31.184 8.7732 27.39385 5.494 C 28.29485 4.6188 31.18485 3.526 28.91025 2.87 C 24.36105 1.558 25.87745 2.87 22.84465 4.182 C 19.8127 4.182 13.7471 1.558 12.2307 9.4292 C 10.71515 12.0524 7.68235 12.0524 6.16595 14.6764 C 5.208 16.3292 7.68235 19.9228 12.2307 15.9884 C 16.7799 15.9884 19.81185 15.9884 21.32825 13.3644 C 22.41965 15.9884 24.78605 16.8524 24.78605 23.3644 C 24.78605 25.9244 23.08605 27.8444 19.68605 29.97 Z");
group.path("M 19.335 1.81 H 21.885 M 20.695 5.89 V -0.27")
.fill("none");
group.path("M 15.31825 8.74937 A 0.36805 1.0392 0 1 1 14.58215 8.34937 A 0.36805 1.0392 0 1 1 15.31825 8.74937 Z")
.attr("data-slot-fill", "border")
.fill("#000")
.stroke("none");
group.path("M 27.41 14.69 A 1.4705 2 0 1 1 24.469 14.69 A 1.4705 2 0 1 1 27.41 14.69 Z")
.attr("data-slot-fill", "border")
.fill("#000")
.stroke("none");
group.path("M 29.1355 20.69 A 1.4705 2 0 1 1 26.1945 20.69 A 1.4705 2 0 1 1 29.1355 20.69 Z")
.attr("data-slot-fill", "border")
.fill("#000")
.stroke("none");
group.path("M20.5 30h14")
.attr("data-slot-stroke", "border")
.fill("none")
.stroke({color: "#000", width: 1.1});
symbol.viewbox(3.5, -2.5, 42, 43.5);
return symbol;
});

registerSolidChessGlyph(sheet, "chess-giraffe-bishop-solid-traditional", (canvas: SVGContainer) => {
const symbol = canvas.symbol();
const group = symbol.group()
.attr("data-slot-fill", "fill")
.attr("data-slot-stroke", "border")
.fill({color: "#000", opacity: 1, rule: "evenodd"})
.stroke({color: "#000", width: 1.5, linecap: "round", linejoin: "round", miterlimit: 4});
group.path("M 41 36 C 37.6 35 30.9 36.4 27.5 34 C 24.1 36.4 17.4 35 14 36 C 14 36 12.4 36.5 11 38 C 11.7 39 12.6 39 14 38.5 C 17.4 37.5 24.1 39 27.5 37.5 C 30.9 39 37.6 37.5 41 38.5 C 42.4 39 43.3 39 44 38 C 42.6 36.1 41 36 41 36 Z");
group.path("M 35 32 C 32.5 34.5 22.5 34.5 20 32 C 19.5 30.5 20 30 20 30 H 35 C 35 30 35.5 30.5 35 32 Z");
group.path("M 16.36 0.93 H 18.91 M 17.72 5.01 V -1.15")
.fill("none");
group.path("M 34.975 29.97 C 29.66845 28.002 31.184 8.7732 27.39385 5.494 C 28.29485 4.6188 31.18485 3.526 28.91025 2.87 C 24.36105 1.558 25.87745 2.87 22.84465 4.182 C 19.8127 4.182 13.7471 1.558 12.2307 9.4292 C 10.71515 12.0524 7.68235 12.0524 6.16595 14.6764 C 5.208 16.3292 7.68235 19.9228 12.2307 15.9884 C 16.7799 15.9884 19.81185 15.9884 21.32825 13.3644 C 22.41965 15.9884 24.78605 16.8524 24.78605 23.3644 C 24.78605 25.9244 23.08605 27.8444 19.68605 29.97 Z");
group.path("M 19.335 1.81 H 21.885 M 20.695 5.89 V -0.27")
.fill("none");
group.path("M 15.31825 8.74937 A 0.36805 1.0392 0 1 1 14.58215 8.34937 A 0.36805 1.0392 0 1 1 15.31825 8.74937 Z")
.attr("data-slot-fill", "highlight")
.fill("#fff")
.stroke("none");
group.path("M 27.41 14.69 A 1.4705 2 0 1 1 24.469 14.69 A 1.4705 2 0 1 1 27.41 14.69 Z")
.attr("data-slot-fill", "highlight")
.fill("#fff")
.stroke("none");
group.path("M 29.1355 20.69 A 1.4705 2 0 1 1 26.1945 20.69 A 1.4705 2 0 1 1 29.1355 20.69 Z")
.attr("data-slot-fill", "highlight")
.fill("#fff")
.stroke("none");
group.path("M20.5 30h14")
.attr("data-slot-stroke", "highlight")
.fill("none")
.stroke({color: "#fff", width: 1.1});
symbol.viewbox(3.5, -2.5, 42, 43.5);
return symbol;
});

registerDuotoneGlyph(sheet, "chess-giraffe-outline-traditional", (canvas: SVGContainer) => {
const symbol = canvas.symbol();
const group = symbol.group()
Expand Down Expand Up @@ -959,27 +1026,26 @@ registerDuotoneGlyph(sheet, "chess-giraffe-outline-traditional", (canvas: SVGCon
registerSolidChessGlyph(sheet, "chess-giraffe-solid-traditional", (canvas: SVGContainer) => {
const symbol = canvas.symbol();
const group = symbol.group()
.attr("data-slot-stroke", "border")
.attr("data-slot-fill", "fill")
.attr("data-slot-stroke", "highlight")
.attr("data-slot-stroke", "border")
.fill({color: "#000", opacity: 1, rule: "evenodd"})
.stroke({color: "#000", width: 1.5, linecap: "round", linejoin: "round", miterlimit: 4});
group.path("m39.5,40.1003l0,-5.478001c-6.243401,-2.459599 -4.459599,-20.018399 -8.919201,-24.117703c1.059601,-1.09367 4.459602,-2.45955 1.783901,-3.279408c-5.351601,-1.63971 -3.567801,0 -7.135401,1.63972c-3.567699,0 -10.703099,-3.27943 -12.486899,6.55879c-1.7838,3.279499 -5.35153,3.279499 -7.13536,6.558897c-1.12738,2.066 1.78383,6.558805 7.13536,1.6397c5.351501,0 8.9192,0 10.703,-3.2794c1.783899,3.2794 4.567699,4.3603 4.567699,20.757404l11.4869,0l0,-1z");
group.path("m17.6,4.8l3,0")
.fill("none")
.attr("data-slot-stroke", "highlight")
.attr("data-slot-stroke", "border")
.stroke({color: "#000", width: 1.5});
group.path("m19.2,9.9l0,-7.7")
.fill("none")
.attr("data-slot-stroke", "highlight")
.attr("data-slot-stroke", "border")
.stroke({color: "#000", width: 1.5});
group.path("m21.1,5.9l3,0")
.fill("none")
.attr("data-slot-stroke", "highlight")
.attr("data-slot-stroke", "border")
.stroke({color: "#000", width: 1.5});
group.path("m22.7,11l0,-7.7")
.fill("none")
.attr("data-slot-stroke", "highlight")
.attr("data-slot-stroke", "border")
.stroke({color: "#000", width: 1.5});
group.path("m16.37441,14.57421a0.433,1.299 0 1 1 -0.866,-0.5a0.433,1.299 0 1 1 0.866,0.5z")
.attr("data-slot-fill", "highlight")
Expand Down
66 changes: 56 additions & 10 deletions src/sheets/registry/glyph-slots.catalog.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 1,
"generated": "2026-10-18T18:03:16.228Z",
"generated": "2026-10-18T18:06:01.926Z",
"glyphs": {
"core:arrowhead": {
"sheet": "core",
Expand Down Expand Up @@ -1640,18 +1640,18 @@
],
"description": "Solid piece body."
},
"highlight": {
"border": {
"channels": [
"fill",
"stroke"
],
"description": "Interior line work and accents."
"description": "Outer silhouette rim."
},
"border": {
"highlight": {
"channels": [
"fill",
"stroke"
],
"description": "Outer silhouette rim."
"description": "Interior line work and accents."
}
},
"colour2Slot": "border"
Expand Down Expand Up @@ -2122,9 +2122,9 @@
},
"colour2Slot": "border"
},
"chess:chess-giraffe-outline-traditional": {
"chess:chess-giraffe-bishop-outline-traditional": {
"sheet": "chess",
"name": "chess-giraffe-outline-traditional",
"name": "chess-giraffe-bishop-outline-traditional",
"slots": {
"fill": {
"channels": [
Expand All @@ -2142,28 +2142,74 @@
},
"colour2Slot": "border"
},
"chess:chess-giraffe-solid-traditional": {
"chess:chess-giraffe-bishop-solid-traditional": {
"sheet": "chess",
"name": "chess-giraffe-solid-traditional",
"name": "chess-giraffe-bishop-solid-traditional",
"slots": {
"fill": {
"channels": [
"fill"
],
"description": "Solid piece body."
},
"border": {
"channels": [
"stroke"
],
"description": "Outer silhouette rim."
},
"highlight": {
"channels": [
"fill",
"stroke"
],
"description": "Interior line work and accents."
}
},
"colour2Slot": "border"
},
"chess:chess-giraffe-outline-traditional": {
"sheet": "chess",
"name": "chess-giraffe-outline-traditional",
"slots": {
"fill": {
"channels": [
"fill"
],
"description": "Primary player colour (body or main silhouette)."
},
"border": {
"channels": [
"fill",
"stroke"
],
"description": "Secondary outline, rim, or theme border band."
}
},
"colour2Slot": "border"
},
"chess:chess-giraffe-solid-traditional": {
"sheet": "chess",
"name": "chess-giraffe-solid-traditional",
"slots": {
"fill": {
"channels": [
"fill"
],
"description": "Solid piece body."
},
"border": {
"channels": [
"stroke"
],
"description": "Outer silhouette rim."
},
"highlight": {
"channels": [
"fill",
"stroke"
],
"description": "Interior line work and accents."
}
},
"colour2Slot": "border"
Expand Down
8 changes: 4 additions & 4 deletions test/wikimediaChessFairy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ describe("Wikimedia fairy chess import", () => {
expect(block).to.match(/M22\.5 19v12[\s\S]*\.attr\("data-slot-stroke", "highlight"\)/);
});

it("giraffe solid horns use highlight stroke slot", () => {
it("giraffe solid horns use border stroke slot", () => {
const chessTs = fs.readFileSync("src/sheets/contact/chess.ts", "utf8");
const block = extractGlyphBlock(chessTs, "chess-giraffe-solid-traditional");
expect(block).to.match(/m17\.6,4\.8[\s\S]*\.attr\("data-slot-stroke", "highlight"\)/);
expect(block).to.match(/m22\.7,11[\s\S]*\.attr\("data-slot-stroke", "highlight"\)/);
expect(block).to.match(/m17\.6,4\.8[\s\S]*\.attr\("data-slot-stroke", "border"\)/);
expect(block).to.match(/m22\.7,11[\s\S]*\.attr\("data-slot-stroke", "border"\)/);
});

it("knight solid nose stroke uses highlight slot like mane highlight", () => {
Expand Down Expand Up @@ -123,7 +123,7 @@ describe("Wikimedia fairy chess import", () => {
expect(sailIdx).to.be.greaterThan(ropeIdx, "rigging sits under the sail fill");
const ropeEnd = block.indexOf("width: 0.8", ropeIdx);
expect(ropeEnd).to.be.greaterThan(ropeIdx);
expect(block.slice(ropeIdx, ropeEnd)).to.include('.attr("data-slot-stroke", "highlight")');
expect(block.slice(ropeIdx, ropeEnd)).to.include('.attr("data-slot-stroke", "border")');
});

it("short rook renders smaller than standard rook", () => {
Expand Down
Loading