fc_tofu wrote: ↑
Tue Feb 18, 2020 4:40 pm
But in this case, the variation level obviously exceeds the font design factor.
Can't download your fonts, so I am using others with similar names.
Arial renders to almost perfect height, hysw is about double what it should be and simsun is a massive 7x what it should be.
If I compare hysw, simsun and arial in fontforge, the parameters (em size, ascender, descender, advance etc) are vastly different, so I'm not completely surprised that they render differently.
We only do a simple scaling of desired_height / em_size, so if the font uses an unusual em size or draws the glyphs in only part of the em square we won't get the intended size. We could use a more complex scaling algorithm, but it still would not guarantee the right size.
Another issue is that some fonts have bitmaps (which we don't use) for various sizes inside the font file, so if a program uses the bitmap(s) to render the glyphs, there is no guarantee that we (using the contours) will generate the same size glyphs.
You can make a feature request for more accurate font scaling, but I imagine it will be a long wait.