Skip to content

Commit

Permalink
feat: switch to smaller font on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
dy0gu committed Aug 28, 2024
1 parent 30cb5bd commit 6691e5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ window.addEventListener("load", main, false);

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

Expand Down

0 comments on commit 6691e5f

Please sign in to comment.