Calculate text width with JavaScript
I’d like to use JavaScript to calculate the width of a string. Is this possible without having to use a monospace typeface? If it’s not built-in, my only idea is to create a table of widths for each character, but this is pretty unreasonable especially supporting Unicode and different type sizes (and all browsers for … Read more