Is there any easy way to figure out the width of each character in a font? I'm trying to line up two tables of data with data scraped from a website. The issue is that the text in one section of the table might be more than one line, so then I need to make sure the other side needs to be the same number of lines. I'm trying to do this by just calculating the number of lines by dividing the total text length by the line width. My problem is that each character has a different width. Is there any way I'm able to look up how many pixels wide each character in a font is?
For example, I can fit 7 W's and 27 l's if I have the total width set to 100px.