Releases: cibernox/ember-text-measurer
Releases · cibernox/ember-text-measurer
New babel
Sea bream with rosemary potatoes
- Added a
lines(text, width, font = null)
method that counts the number of lines the given test would require in a container
of the given width. This algorithm is not trivial and for very long texts might take a while.
By example, for a 5000 words (40k characters) text it takes 6~7ms in chrome on a modern laptop, so probably you don't want to use it on realtime with very very long texts. Texts below 10K chars should be fast even on old browsers.