I want to find out how many spaces I need to use to create a string full of whitespaces that has the same width as another string. The font used is not monospaced, so different characters have different widths, is there any library that given a font and a string, returns the number of whitespaces to have the same width?
I can try character for character and find out how many whitespaces occupy the same or a similar width, but doing this for every character and for different fonts is very tedious.