Replace our Noto Sans CJK with a version that has Simplified Chinese
set as the default script.
When Unicode was defining codepoints for the languages that use ideographs they tried to avoid duplication. So if two languages had glyphs with similar meaning and display they were given just one codepoint. But there can be subtle differences between how different languages prefer some of the these shared symbols.
We obviously don't want to distribute 5 different fonts for Japanese, Korean, Simplified Chinese, Traditional Chinese, and Chinese as used in Taiwan. Therefore we use a font that supports all 5. These fonts deal with the differences in some of the characters by using variation glyphs. These are generally selected by setting an OpenType "lang" feature for the target script and then a shaping engine (like Harfbuzz) then uses the "GPOS" table to select the appropriate variation.
FreeType alone does not do this substitution, does not support OpenType features, nor exposes the GPOS table. It assumes this is all done by a higher-level shaping engine. We are not ready for that yet.
Instead this patch just replaces the version of our "Noto Sans CJK" font with a different version of the same font. The only difference is that the DEFAULT script is Simplified Chinese. For our (currently simple) purposes this fixes everything. Simplified Chinese obviously is perfect and better than we have ever supported. Other languages like Japanese and Korean use their own characters primarily, and so it is only when they use Chinese characters that they would see the Chinese variations versus their local variations. In Blender there is no change to Japanese, Korean, or Traditional Chinese when using this font change.
The differences between the glyphs is very subtle. In the following you will see columns of characters in 3.3 (old metafont), 3.4 (new separate fonts), a specific Chinese font, and the last column is with the font in this patch. This patch gives a perfect score.
The font replaced in this patch is specifically this one, if you wish to test it separately:
