Now, admittedly, it’s not perfect. The values are close to the original design but not quite perfect. This is because a linear trendline is an approximation of specific font sizes at specific viewport widths. This is inherit of linear regression. There is always some error in your results. It’s a trade-off of simplicity vs. accuracy.
Also, the more varied out your text sizes are, the more error that will be in your trendline. Can we do better than this?
In order to get a more accurate trendline, you need to look at more advanced topics, like a polynomial regression trendline that might look something like this:
... read the whole story at medium.com.