be5invis / Sarasa-Gothic

Sarasa Gothic / 更纱黑体 / 更紗黑體 / 更紗ゴシック / 사라사 고딕
SIL Open Font License 1.1
10.12k stars 368 forks source link

“警” displays weird in sarasa-ui-sc-regular #265

Closed mercury233 closed 2 years ago

mercury233 commented 3 years ago

former version(0.17.0): image

current version(0.34.7): image

be5invis commented 3 years ago

No Repro. This is your text under DWrite @ 14ppem. image

mercury233 commented 3 years ago

i'm using freetype, you can reproduce with ftview -m "战警 宣言 后面 " -e unic 14 sarasa-ui-sc-regular.ttf

image image

mercury233 commented 2 years ago

image The 14px render of '上' in freetype is unacceptable, any chance we can fix this?

mwgamera commented 2 years ago

This isn't a problem with just a single glyph. On the screenshots above you can also see 言 and 后 looking particularly bad and others blurrier than desirable too. Looks like something is wrong with hinting under FreeType: only a few points are moved along the vertical axis making many horizontal strokes slanted or worse. As if the hinting program had aborted in the middle without ever reaching IUP or something. (I have no idea how to debug it.) Most points are not moved from their original unhinted positions.

Affected are all the stylistic and orthographic variants of Sarasa since the version 0.18.8. The last released version that rendered correctly was 0.18.7.

Here's what ftgrid shows for 警 in UI SC from 0.18.7, 0.18.8, and 0.35.1: ftgrid-0.18.7 ftgrid-0.18.8 ftgrid-0.35.1

Assortment of badly hinted glyphs from Gothic HC from 0.35.0 and 0.18.8 release: ftstring-0.35.0 ftstring-0.18.8

Here from 0.18.7 for comparison: ftstring-0.18.7

The problem occurs when rendered with recent versions of FreeType in hinting/antialiasing modes that make use of TrueType interpreter, but without difference whether using v35 or v40 one. However, the problem doesn't appear when using very old versions of FreeType (broken in FreeType 2.8.1 and 2.11.0 but works well in 2.6.3), but I also looked at "show grid fit" option of FontForge and it shows different, but just as badly fit outline there.

mwgamera commented 2 years ago

The 0.35.1 release was still affected, but I can't reproduce it with 0.35.2.