font: add 1 to the canvas glyph to avoid clipping

This commit is contained in:
Mitchell Hashimoto
2022-12-05 15:37:55 -08:00
parent 25f2f1a652
commit ed4e8c36b0
2 changed files with 10 additions and 6 deletions

View File

@@ -47,8 +47,8 @@ fetch(url.href).then(response =>
const font_ptr = malloc(font.byteLength);
new Uint8Array(memory.buffer, font_ptr).set(font);
// Call whatever example you want:
const face = face_new(font_ptr, font.byteLength, 72);
// Initialize our font face
const face = face_new(font_ptr, font.byteLength, 72 /* size in px */);
free(font_ptr);
// Render a glyph