Thank you Chariri and Alexei for helping out, especially for introducing me
to ftinspect. The demos were extremely helpful and I certainly agree that
FreeType is much better than what Windows can provide.

What I was curious about was why Windows selectively hinted SimSun 3.03 at
24px, but didn't do so for SimSun 5.18. (3.03 is the version supplied on
Windows XP, and versions later than 5.00 come with recent Windows starting
from Vista.) Both versions have identical "Fixed Size" tables when
inspected with ftinspect.

The issue wasn't related to any Qt libraries, as they are depended on the
OS to render font (as expected).  (It might be helpful to note here that I
used the QFont::PreferFullHinting property, which is not turned on by
default when using QFont.) I probably should also say that it is also not
heavily related to FreeType, so only continue if you are interested in some
weird Windows ClearType and font metadata goofiness.

The reason for what I am experiencing is related to an interesting metadata
section contained in font files. I discovered this when opening this font
in external font editing software, and it is simply called "Hinting" in
Hi-Logic FontCreator and "Grid Fitting" in FontForge. Basically, Windows
adhere to the sets of rules in this property in deciding whether or not to
apply hinting.

[image: image.png]Grid Fitting Properties for SimSun 3.03

[image: image.png]Grid Fitting Properties for SimSun 5.18

The limit of size 24 included in SimSun 3.03 caused ClearType to somehow be
activated when I render glyphs onto an image with preferred hinting turned
on. The limit is apparently adjusted for later versions, resulting in
different behaviors. The numbers of embedded bitmaps don't differ. The
images I included in my previous email were straight-up FreeType vs.
ClearType.

As I previously mentioned, I don't have any experience with the internal
structure of font files, so it took me time to even find this table. I am
not sure if this information is accessible by any FreeType libraries (it's
also probably not that important to most users), but please let me know if
I am wrong again!

A weird but fruitful investigation in the end. Thank you all again for your
help! Happy to be here!

Best,
Roger

On Sun, 6 Nov 2022 at 22:20, Alexei Podtelezhnikov <[email protected]>
wrote:

> Some of the differences that you highlight favor FreeType. Actually, most
> of them favor FreeType over Windows.
>
> Since you are talking about QImage, shouldn't you first ask them Qt?
> If you are asking about the particular font, then you should examine the
> font. We do have some tools like ftinspect and other freetype-demos to help
> you.
>
> Good luck in your investigation,
> Alexei
>
>

Reply via email to