bohoomil / fontconfig-ultimate

freetype2-infinality run-time settings => infinality compatible fontconfig => infinality-bundle
454 stars 38 forks source link

Chinese characters distortion problem #182

Open jiaan opened 7 years ago

jiaan commented 7 years ago

I installed the infinality bundle on my Arch Linux machine for better font rendering. The rendering for Latin characters is good, but some Chinese characters are distorted between font size 10-14, which happens to be most frequent range for reading. I do not see the problem with regular fontconfig set, but as long as I switched to infinality(I'm using the "free" preset), problem occurs. Here are some screen shoots I made.

  1. Render text with regular fontconfig stuff. regular
  2. Rendering text with infinality bundle and corresponding patched fonts infinality
  3. Rendering text with infinality bundle with normal stock fonts. infinality2

Now please look at character "的" and "照" on picture 2 and 3. You can find that the strokes are gathered on the left part, making the character feel distorted. There are many more examples of such characters, and I feel really bad when I surf the web with distorted Chinese characters.

jiaan commented 7 years ago

I found a workaround in a deepin forum thread. set the following enviroment by saving them in /etc/profile.d/infinality-settings.sh:

`export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0

export INFINALITY_FT_STEM_FITTING_STRENGTH=0

export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0

export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0

export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0

export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false`

Artoria2e5 commented 7 years ago

Hey, this issue should still be kept open if it only happens in Infinality's FT. It suggests that some choices made in the defaults are somehow unwise.

Can you clarify which part of Infinality causes the problem, fontconfig or FT, too?


jiaan commented 7 years ago

Reopened the issue. I am not sure whether its a freetype or fontconfig problem, but it's definitely not the font problem.

lsyoyo commented 7 years ago

Thanks @jiaan , I have the same issue, however, I only need the following to fix my setup.

export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0
export INFINALITY_FT_STEM_FITTING_STRENGTH=0
# export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0
# export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0
# export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false