Skip to content

Commit

Permalink
Fix Decktet court glyph to work in dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Perlkonig committed Dec 14, 2024
1 parent f8496ab commit e8b02d6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/sheets/decktet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,16 @@ sheet.glyphs.set("decktet-9", (canvas: SVGContainer) => {

sheet.glyphs.set("decktet-court", (canvas: SVGContainer) => {
const symbol = canvas.symbol();
const court = symbol.defs().path("M22 241q-2 5 1 29t7 52q4 33 11 72q2 5 15.5 15.5t41.5 11.5q-26 11 -42 33t-16 50q0 38 28 64.5t68 26.5q20 0 37 -7t30 -19.5t20.5 -29t7.5 -35.5q0 -28 -15.5 -50t-40.5 -33q15 0 24 -1.5t15 -4t10.5 -5t9.5 -5.5q7 -45 11 -81q4 -31 5.5 -57t-1.5 -28q-2 -1 -12 -1q-4 0 -9 1q-5 -38 -9 -68q-3 -26 -5.5 -47t-2.5 -22q-4 -2 -26 -2.5t-48 -0.5q-25 0 -48 1t-29 2q1 3 0 24.5t-3 47.5q-2 30 -4 67q-7 0 -13 -1q-12 -2 -18 1zM65 64q29 2 58 2h78q10 0 13.5 -5.5t3 -13.5t-4 -15.5t-9.5 -12.5v-1v1q-10 0 -20.5 -0.5t-25.5 -0.5h-34h-48q-12 1 -17.5 8.5t-6.5 15.5t2.5 15t10.5 7zM76 504q0 -24 18.5 -40t43.5 -16t42.5 16t17.5 40q0 26 -17.5 43t-42.5 17t-43.5 -17t-18.5 -43zM86 275q-1 -35 -2 -63q-1 -24 0 -45.5t6 -26.5q4 -4 17.5 -5.5t28.5 -1t27.5 2.5t15.5 4t5 22.5t3 45.5t0.5 45l-0.5 20q-1 0 4.5 0.5t12.5 2.5q8 2 18 3q-2 27 -5 49q-2 19 -6 36.5t-10 23.5q-11 12 -29.5 15t-35.5 3t-35.5 -7t-28.5 -17q-5 -5 -8 -22t-4.5 -35t-2.5 -32t-2 -14z")
.attr("data-playerfill", true)
.fill("black");
const group = symbol.group();
group.matrix(1, 0, 0, -1, 0, 800);
group.use(court).dx(-150);
group.use(court).dx(150);
group.path("M22 241q-2 5 1 29t7 52q4 33 11 72q2 5 15.5 15.5t41.5 11.5q-26 11 -42 33t-16 50q0 38 28 64.5t68 26.5q20 0 37 -7t30 -19.5t20.5 -29t7.5 -35.5q0 -28 -15.5 -50t-40.5 -33q15 0 24 -1.5t15 -4t10.5 -5t9.5 -5.5q7 -45 11 -81q4 -31 5.5 -57t-1.5 -28q-2 -1 -12 -1q-4 0 -9 1q-5 -38 -9 -68q-3 -26 -5.5 -47t-2.5 -22q-4 -2 -26 -2.5t-48 -0.5q-25 0 -48 1t-29 2q1 3 0 24.5t-3 47.5q-2 30 -4 67q-7 0 -13 -1q-12 -2 -18 1zM65 64q29 2 58 2h78q10 0 13.5 -5.5t3 -13.5t-4 -15.5t-9.5 -12.5v-1v1q-10 0 -20.5 -0.5t-25.5 -0.5h-34h-48q-12 1 -17.5 8.5t-6.5 15.5t2.5 15t10.5 7zM76 504q0 -24 18.5 -40t43.5 -16t42.5 16t17.5 40q0 26 -17.5 43t-42.5 17t-43.5 -17t-18.5 -43zM86 275q-1 -35 -2 -63q-1 -24 0 -45.5t6 -26.5q4 -4 17.5 -5.5t28.5 -1t27.5 2.5t15.5 4t5 22.5t3 45.5t0.5 45l-0.5 20q-1 0 4.5 0.5t12.5 2.5q8 2 18 3q-2 27 -5 49q-2 19 -6 36.5t-10 23.5q-11 12 -29.5 15t-35.5 3t-35.5 -7t-28.5 -17q-5 -5 -8 -22t-4.5 -35t-2.5 -32t-2 -14z")
.dx(-150)
.attr("data-playerfill", true)
.fill("black");
group.path("M22 241q-2 5 1 29t7 52q4 33 11 72q2 5 15.5 15.5t41.5 11.5q-26 11 -42 33t-16 50q0 38 28 64.5t68 26.5q20 0 37 -7t30 -19.5t20.5 -29t7.5 -35.5q0 -28 -15.5 -50t-40.5 -33q15 0 24 -1.5t15 -4t10.5 -5t9.5 -5.5q7 -45 11 -81q4 -31 5.5 -57t-1.5 -28q-2 -1 -12 -1q-4 0 -9 1q-5 -38 -9 -68q-3 -26 -5.5 -47t-2.5 -22q-4 -2 -26 -2.5t-48 -0.5q-25 0 -48 1t-29 2q1 3 0 24.5t-3 47.5q-2 30 -4 67q-7 0 -13 -1q-12 -2 -18 1zM65 64q29 2 58 2h78q10 0 13.5 -5.5t3 -13.5t-4 -15.5t-9.5 -12.5v-1v1q-10 0 -20.5 -0.5t-25.5 -0.5h-34h-48q-12 1 -17.5 8.5t-6.5 15.5t2.5 15t10.5 7zM76 504q0 -24 18.5 -40t43.5 -16t42.5 16t17.5 40q0 26 -17.5 43t-42.5 17t-43.5 -17t-18.5 -43zM86 275q-1 -35 -2 -63q-1 -24 0 -45.5t6 -26.5q4 -4 17.5 -5.5t28.5 -1t27.5 2.5t15.5 4t5 22.5t3 45.5t0.5 45l-0.5 20q-1 0 4.5 0.5t12.5 2.5q8 2 18 3q-2 27 -5 49q-2 19 -6 36.5t-10 23.5q-11 12 -29.5 15t-35.5 3t-35.5 -7t-28.5 -17q-5 -5 -8 -22t-4.5 -35t-2.5 -32t-2 -14z")
.dx(150)
.attr("data-playerfill", true)
.fill("black");
symbol.viewbox(-128, 205, 530, 578);
return symbol;
});
Expand Down

0 comments on commit e8b02d6

Please sign in to comment.