add monogram font
This commit is contained in:
parent
f19dafdd37
commit
96c73f49be
1
src/.gitignore
vendored
Normal file
1
src/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/fonts/monogram*
|
@ -91,7 +91,7 @@ export class Sprite {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function drawDebug(context, x, y, w, h) {
|
function drawDebug(context, x, y, w, h) {
|
||||||
context.font = '14px serif';
|
context.font = '16px Monogram';
|
||||||
context.fillStyle = '#ffffff';
|
context.fillStyle = '#ffffff';
|
||||||
context.fillText(`${x}x${y}`, x + 1, y - 2);
|
context.fillText(`${x}x${y}`, x + 1, y - 2);
|
||||||
context.fillStyle = '#000000';
|
context.fillStyle = '#000000';
|
||||||
|
@ -37,6 +37,7 @@ export class Scene {
|
|||||||
this.#layers = Array();
|
this.#layers = Array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: remove it
|
||||||
setScreenSize(w, h) {
|
setScreenSize(w, h) {
|
||||||
this.#canvas.width = w;
|
this.#canvas.width = w;
|
||||||
this.#canvas.height = h;
|
this.#canvas.height = h;
|
||||||
|
@ -1,3 +1,19 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: 'Monogram';
|
||||||
|
src: url('/fonts/monogramextended.woff2') format('woff2'),
|
||||||
|
url('/fonts/monogramextended.woff') format('woff'),
|
||||||
|
url('/fonts/monogramextended.ttf') format('truetype');
|
||||||
|
font-weight: 500;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
canvas {
|
canvas {
|
||||||
image-rendering: crisp-edges;
|
image-rendering: crisp-edges;
|
||||||
image-rendering: pixelated;
|
image-rendering: pixelated;
|
||||||
|
Loading…
Reference in New Issue
Block a user