Skip to content

Commit 6691e5f

Browse files
committed
feat: switch to smaller font on mobile
1 parent 30cb5bd commit 6691e5f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/main.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ window.addEventListener("load", main, false);
2626

2727
function drawCanvas(canvas, ctx) {
2828
const { currentColorIndex, bgColors } = state;
29-
ctx.font = "25px monospace";
29+
const font = canvas.width < 500 ? 20 : 25;
30+
ctx.font = `${font}px Satoshi Bold`;
3031
ctx.fillStyle = `rgba(${bgColors[currentColorIndex].join(", ")}, 1)`;
3132
ctx.fillRect(0, 0, canvas.width, canvas.height);
3233

0 commit comments

Comments
 (0)