I need to calculate the number of lines some saved text will require when displayed.
The text will, ultimately, be displayed in a div 500 pixels wide – the added complication being that the text can contain \n (‘s) so I must factor those into the line number calculation also.
Thanks in advance.
Change the font settings (font-family, style, size) to your settings.