Unfortunately for TightenText, Safari rounds font sizes to whole pixels as soon as it crosses the half-pixel boundary. This leads to a significant jump in how wide the text is, and also potentially means the resulting text is smaller than the developer's desired minFontSize (if, say, they want it to be 0.97 ems, and that results in a font size of 15.49px, Safari will render 15px text).
Some options:
- Add a disclaimer for Safari.
- Detect pixel rounding, refuse to cross the half pixel boundary if using such a browser.
- Scale the font some other way (e.g.
transform) that would achieve the same visual effect as the font-size change?
Unfortunately for
TightenText, Safari rounds font sizes to whole pixels as soon as it crosses the half-pixel boundary. This leads to a significant jump in how wide the text is, and also potentially means the resulting text is smaller than the developer's desiredminFontSize(if, say, they want it to be 0.97 ems, and that results in a font size of 15.49px, Safari will render 15px text).Some options:
transform) that would achieve the same visual effect as thefont-sizechange?