If the directive is wrapped inside an element with padding, it appears this is not being considered. The result is that the text is sized as if this padding was not there.
A solution could be changing:
Math.min((parent[0].offsetWidth - 6) * ratio * compressor,
If the directive is wrapped inside an element with padding, it appears this is not being considered. The result is that the text is sized as if this padding was not there.
A solution could be changing:
to