calculate font metrics via canvas

This commit is contained in:
Mitchell Hashimoto
2022-12-04 22:01:58 -08:00
parent 37f00ac725
commit df302fc2b6
3 changed files with 77 additions and 10 deletions

View File

@@ -41,8 +41,8 @@ fetch(url.href).then(response =>
new Uint8Array(memory.buffer, font_ptr).set(font);
// Call whatever example you want:
const face = face_new(font_ptr, font.byteLength);
face_free(face);
const face = face_new(font_ptr, font.byteLength, 14);
//face_free(face);
} finally {
free(font_ptr);
}