Generate an Image and Get Its Size in JavaScript
November 2025
This is a test to see about using html2canvas to generate an image from an element on a page and then determine its size.
HTML
this is the input
Output
this is the input
end of line
Endnotes
The idea here is to be able to automate part of the process of figuring out how tall the baseline characters are for different fonts. Something I'm doing for fonts.alanwsmith.com