This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Today, 56-neon-noto.conf is wrong for Noto Sans/Serif CJK

Tags: None
(comma "," separated)
User avatar
ytomino
Registered Member
Posts
15
Karma
0
OS
Hello.
The settings for Noto Sans/Serif CJK in /etc/fonts/conf.d/56-neon-noto.conf (provided by the package neon-settings) seems wrong.

Premise knowledge:

(1) Google has asserted to use the full native hint and gray-scale rendering.

Add the best hinting configuration for Noto Sans CJK to use in fontconfig
https://github.com/googlefonts/noto-fonts/issues/159

(2) The default hinting behavior is changed after fontconfig 2.12.3, on Debian and Ubuntu

http://changelogs.ubuntu.com/changelogs ... /changelog
https://metadata.ftp-master.debian.org/ ... _changelog
Add a NEWS file to describe the change in the default hinting style.


Unfortunately, this NEWS file is dropped on Ubuntu. Refer Debian.

https://metadata.ftp-master.debian.org/ ... onfig.NEWS
fontconfig (2.12.3-0.2) unstable; urgency=medium

Starting with version 2.12, fontconfig is using "Slight" (hintslight) as
automatic hinting style. This might change the rendering of the fonts.

If you want the to restore the old hinting, run "dpkg-reconfigure
fontconfig-config" and select "Full" as hinting style.

-- Laurent Bigonville <bigon@debian.org> Tue, 04 Jul 2017 21:10:57 +0200


Today hintslight implies autohint.

Current settings on KDE neon:

56-neon-noto.conf
<match target="font">
<test name="noto_cjk"><bool>true</bool></test>
<!-- Turn on the native CFF hint -->
<!-- Turn off sub-pixel anti-aliasing because Adobe's CFF
rasterizer is for gray-scale rendering. -->
<edit name="hinting" mode="assign"><bool>true</bool></edit>
<edit name="autohint" mode="assign"><bool>false</bool></edit>
<edit name="hintstyle" mode="assign"><const>hintslight</const></edit>
<edit name="antialias" mode="assign"><bool>true</bool></edit>
<edit name="rgba" mode="assign"><const>none</const></edit>
</match>


hintstyle is set as hintslight. I think this setting is written for the older version, but the condition was changed now.
And subpixel rendering is off here.

This setting is wrong doubly.
First, hintslight implies autohint as as noted above.
Second, this setting is overridden by 69-language-selector-ja.conf (provided the package language-selector-common).
(69-language-selector-ja.conf is named "ja", but this file seems be not limited to Japan.)

69-language-selector-ja.conf
<match target="font">
<test name="family" compare="contains">
<string>Noto Sans CJK JP</string>
</test>
<test qual="all" name="pixelsize" compare="less_eq">
<double>18</double>
</test>
<edit mode="assign" name="embeddedbitmap">
<bool>false</bool>
</edit>
<edit mode="assign" name="hintstyle">
<const>hintnone</const>
</edit>
</match>


The general used font sizes are of course smaller than 18 pixels.
So hintstyle is overridden by hintnone.
However, the setting for subpixel rendering is not overridden. "rgba" is still none.

As a result, Noto Sans/Serif CJK are rendered without any hinting nor subpixel rendering. It inherited worst from both settings.

Solutions:

We should choice one of solutions...

(1) According to Google's assertion. Use hintfull and gray-scale rendering.
Remove 69-language-selector-ja.conf, and rewrite hintslight to hintfull in 56-neon-noto.conf.

(2) According to Debian/Ubuntu's setting. Use hintnone and subpixel rendering.
Remove the settings for Noto Sans/Serif CJK from 56-neon-noto.conf.

Fortunately, It's easy to fix my local file. However the package neon-settings has been updated frequently. I'm bothered every time.
I would be happy if the repository of neon-settings is fixed.

Thank you.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]