Text Overflow Compensation Javascript Library
It is often the case that dynamic text, whether that be a name, a web address, or any other variable text, will not fit a designated area and therefore causes overflow. This could mean that ugly scroll bars may appear where they were not intended or the design of the page may be altered unexpectedly in other ways. This problem is hard to predict especially when the number of words or characters is not know upfront. This library solves the problem of overflow text by automatically resizing text so that it no longer causes overflow. It is possible to set a minimum font size when applying this library so that the text doesn’t become too small. For example the library could be applied with a minimum font size of 0.3em, 20%, 12px etc. This means that the text will never be reduced smaller than this threshold. This provides the benefit of reducing text overflow without the risk that the text will become so small that is unreadable.