Closed ghepting closed 10 years ago
Are non-integer pixel values a problem? Wouldn't this just be resolved (faster) by the browser?
It could have just been the fonts I was working with in this case, but extreme aliasing was resulting due to decimal values. Once I added rounding in it was much crisper. On Jul 2, 2012 10:14 AM, "Dave Rupert" < reply@reply.github.com> wrote:
Are non-integer pixel values a problem? Wouldn't this just be resolved (faster) by the browser?
Reply to this email directly or view it on GitHub: https://github.com/davatron5000/FitText.js/pull/33#issuecomment-6714087
I'd suggest using Math.floor rather than Math.round so that it's never rounded up making the text that one pixel greater than it's bounds pulling just one word to a new line :smile:
I may consider this more in the future, but things seem to be heading the way of the subpixel. Also, there's a merge conflict in the commit, so I'm going to close this.
Simple addition, but it seems to have reduced the effect of font character artifacts and improved native OS's ability to apply anti-aliasing, especially with fonts loaded via @font-face