The interface font of the Simplified Chinese version is displayed incorrectly in Blender 3.4 #102140

Open
opened 2022-10-29 12:35:04 +02:00 by Ye Gui · 25 comments

System Information
Operating system: Windows11 Home 22H2
Graphics card: NVIDIA GeForce RTX 2060

Blender Version
Broken: 3.4.0 Alpha, f9113b7eb6, master, 2022-10-29
Worked: 3.3.1

Short description of error
As shown in the picture, in 3.4, some of the interface text does not match the Chinese writing, which seems to be closer to Japanese ? In contrast, version 3.3 and previous versions are roughly correct, but still have some errors. When the font is switched to Noto Sans S Chinese Regular, the display result is completely correct.
3.3.png
3.4.png
In Text Editor:
text.png
example.blend
NotoSansHans-Regular.otf

Thanks!
(I can‘t speak English,the above is machine translated)

**System Information** Operating system: Windows11 Home 22H2 Graphics card: NVIDIA GeForce RTX 2060 **Blender Version** Broken: 3.4.0 Alpha, f9113b7eb6ee, master, 2022-10-29 Worked: 3.3.1 **Short description of error** As shown in the picture, in 3.4, some of the interface text does not match the Chinese writing, which seems to be closer to Japanese ? In contrast, version 3.3 and previous versions are roughly correct, but still have some errors. When the font is switched to Noto Sans S Chinese Regular, the display result is completely correct. ![3.3.png](https://archive.blender.org/developer/F13795591/3.3.png) ![3.4.png](https://archive.blender.org/developer/F13795593/3.4.png) In Text Editor: ![text.png](https://archive.blender.org/developer/F13795596/text.png) [example.blend](https://archive.blender.org/developer/F13795612/example.blend) [NotoSansHans-Regular.otf](https://archive.blender.org/developer/F13795615/NotoSansHans-Regular.otf) Thanks! (I can‘t speak English,the above is machine translated)
Author

Added subscriber: @ziweidao

Added subscriber: @ziweidao

#102134 was marked as duplicate of this issue

#102134 was marked as duplicate of this issue
Author
Maybe it related to https://developer.blender.org/rBe9bd6abde37c
Member

Added subscriber: @Harley

Added subscriber: @Harley
Member

I’m away from home and computer right now (Blender conference). But in a nutshell the font we are using here is a “Noto CJK” font, which has glyphs for Chinese, Japanese, and Korean. But there are some “overlaps” in the languages in that some Unicode characters can differ between languages. I’m not currently sure which is the “default language” in the font file we are shipping but perhaps it is different from our old font. Fairly certain that the intent is that we set an OpenType “feature” called “locl” that selects an output language so that these characters use the right language-specific variant. Will look into this when I get back but will appreciate any advice or help if you have any.

I’m away from home and computer right now (Blender conference). But in a nutshell the font we are using here is a “Noto CJK” font, which has glyphs for Chinese, Japanese, and Korean. But there are some “overlaps” in the languages in that some Unicode characters can differ between languages. I’m not currently sure which is the “default language” in the font file we are shipping but perhaps it is different from our old font. Fairly certain that the intent is that we set an OpenType “feature” called “locl” that selects an output language so that these characters use the right language-specific variant. Will look into this when I get back but will appreciate any advice or help if you have any.
Author

In #102140#1438684, @Harley wrote:
I’m away from home and computer right now (Blender conference). But in a nutshell the font we are using here is a “Noto CJK” font, which has glyphs for Chinese, Japanese, and Korean. But there are some “overlaps” in the languages in that some Unicode characters can differ between languages. I’m not currently sure which is the “default language” in the font file we are shipping but perhaps it is different from our old font. Fairly certain that the intent is that we set an OpenType “feature” called “locl” that selects an output language so that these characters use the right language-specific variant. Will look into this when I get back but will appreciate any advice or help if you have any.

Thank you very much! I have another question: The Chinese Font Thumbnails are showed as Japanese "あア亜" currently(In 3.3 showed as Chinese & Latin). I think it would be more suitable to display Chinese Font in Chinese. Maybe it related to https://developer.blender.org/rB4e7983e07320
3.3a1.jpg

3.3b1.jpg

3.4a1.jpg

3.4b1.jpg

> In #102140#1438684, @Harley wrote: > I’m away from home and computer right now (Blender conference). But in a nutshell the font we are using here is a “Noto CJK” font, which has glyphs for Chinese, Japanese, and Korean. But there are some “overlaps” in the languages in that some Unicode characters can differ between languages. I’m not currently sure which is the “default language” in the font file we are shipping but perhaps it is different from our old font. Fairly certain that the intent is that we set an OpenType “feature” called “locl” that selects an output language so that these characters use the right language-specific variant. Will look into this when I get back but will appreciate any advice or help if you have any. Thank you very much! I have another question: The Chinese Font Thumbnails are showed as Japanese "あア亜" currently(In 3.3 showed as Chinese & Latin). I think it would be more suitable to display Chinese Font in Chinese. Maybe it related to https://developer.blender.org/rB4e7983e07320 ![3.3a1.jpg](https://archive.blender.org/developer/F13799656/3.3a1.jpg) ![3.3b1.jpg](https://archive.blender.org/developer/F13799660/3.3b1.jpg) ![3.4a1.jpg](https://archive.blender.org/developer/F13799662/3.4a1.jpg) ![3.4b1.jpg](https://archive.blender.org/developer/F13799664/3.4b1.jpg)
Member

@ziweidao - The Chinese Font Thumbnails are showed as Japanese "あア亜" currently(In 3.3 showed as Chinese & Latin). I think it would be more suitable to display Chinese Font in Chinese. Maybe it related to…

Yes, that is me too. For me to fix that I’d need your help. For testing of the font I’d need examples of characters that would definitely be in a Chinese font but would not be in one for Japanese or any other language.

Assuming we can test for such a font, what three characters would you like shown in the thumbnail? It can meaning or not (as long as it not at all offensive) but should show shapes well to help differentiate between the styles of different fonts.

> @ziweidao - The Chinese Font Thumbnails are showed as Japanese "あア亜" currently(In 3.3 showed as Chinese & Latin). I think it would be more suitable to display Chinese Font in Chinese. Maybe it related to… Yes, that is me too. For me to fix that I’d need your help. For testing of the font I’d need examples of characters that would definitely be in a Chinese font but would not be in one for Japanese or any other language. Assuming we can test for such a font, what three characters would you like shown in the thumbnail? It can meaning or not (as long as it not at all offensive) but should show shapes well to help differentiate between the styles of different fonts.

Added subscriber: @deadpin

Added subscriber: @deadpin

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Will confirm this for now and set to High as it's a regression and seems important to fix before release.

Will confirm this for now and set to High as it's a regression and seems important to fix before release.

Added subscriber: @copur

Added subscriber: @copur

Added subscriber: @XCIX

Added subscriber: @XCIX

Blender.png
系统自带.png

目前由部分字体显示为“布丁体”
我建议简体中文可统一用“简体字”
还有,繁体中文可统一使用“繁體字”,如同Windows操作系统那样。

Currently, some fonts are displayed as "布丁体"
I suggest that Simplified Chinese can be unified with "简体字"
Also, Traditional Chinese can be unified with "繁體字", just like Windows OS.

P%F%IE(0{8QSZP_K~$_DU(C.png

![Blender.png](https://archive.blender.org/developer/F13803813/Blender.png) ![系统自带.png](https://archive.blender.org/developer/F13803818/系统自带.png) 目前由部分字体显示为“布丁体” 我建议简体中文可统一用“简体字” 还有,繁体中文可统一使用“繁體字”,如同Windows操作系统那样。 Currently, some fonts are displayed as "布丁体" I suggest that Simplified Chinese can be unified with "简体字" Also, Traditional Chinese can be unified with "繁體字", just like Windows OS. ![P%F%IE(0{8QSZP_K~$_DU(C.png](https://archive.blender.org/developer/F13803821/P_F_IE_0_8QSZP_K___DU_C.png)
Author

In #102140#1438811, @XCIX wrote:
Blender.png
系统自带.png

目前由部分字体显示为“布丁体”
我建议简体中文可统一用“简体字”
还有,繁体中文可统一使用“繁體字”,如同Windows操作系统那样。

Currently, some fonts are displayed as "布丁体"
I suggest that Simplified Chinese can be unified with "简体字"
Also, Traditional Chinese can be unified with "繁體字", just like Windows OS.

P%F%IE(0{8QSZP_K~$_DU(C.png

@Harley Acheson (harley) I think these three characters are appropriate

> In #102140#1438811, @XCIX wrote: > ![Blender.png](https://archive.blender.org/developer/F13803813/Blender.png) > ![系统自带.png](https://archive.blender.org/developer/F13803818/系统自带.png) > > > 目前由部分字体显示为“布丁体” > 我建议简体中文可统一用“简体字” > 还有,繁体中文可统一使用“繁體字”,如同Windows操作系统那样。 > > Currently, some fonts are displayed as "布丁体" > I suggest that Simplified Chinese can be unified with "简体字" > Also, Traditional Chinese can be unified with "繁體字", just like Windows OS. > > ![P%F%IE(0{8QSZP_K~$_DU(C.png](https://archive.blender.org/developer/F13803821/P_F_IE_0_8QSZP_K___DU_C.png) @Harley Acheson (harley) I think these three characters are appropriate
Harley Acheson self-assigned this 2022-10-30 08:33:03 +01:00
Member

I’m away until November 7th.

Will looking to see if a single different version of the Noto CJK font can work with all the languages sufficiently for us. These all contain all the glyphs for Chinese, Japanese, Korean, but there are versions that have different defaults for language-specific variations. https://github.com/googlefonts/noto-cjk

We probably can’t do one way of switching, using the “locl” feature and “gsub” table, which is not exposed in FreeType - assumed to be done by a higher level by Harfbuzz and we aren’t ready for that yet.

Another solution is the versions of this font that treat them separately in the same font file. Basically looks like one font with multiple faces. But they remain smaller than separate fonts by internally sharing tables of shared glyphs. Might be easy but would also need a change in how our fallback works to check multiple faces but that should be done anyway.

I’m away until November 7th. Will looking to see if a single different version of the Noto CJK font can work with all the languages sufficiently for us. These all contain all the glyphs for Chinese, Japanese, Korean, but there are versions that have different defaults for language-specific variations. https://github.com/googlefonts/noto-cjk We probably can’t do one way of switching, using the “locl” feature and “gsub” table, which is not exposed in FreeType - assumed to be done by a higher level by Harfbuzz and we aren’t ready for that yet. Another solution is the versions of this font that treat them separately in the same font file. Basically looks like one font with multiple faces. But they remain smaller than separate fonts by internally sharing tables of shared glyphs. Might be easy but would also need a change in how our fallback works to check multiple faces but that should be done anyway.
Member

Note also - if I take too long or get hit by a beer truck - that “reverting” to old behaviour should not require code changes, just replacing font files. For example just replacing our current main font with the old metafont, then deleting the CJK font. That would give us old font but with fallback to all the added symbols, new languages, and last resort.

Note also - if I take too long or get hit by a beer truck - that “reverting” to old behaviour should not require code changes, just replacing font files. For example just replacing our current main font with the old metafont, then deleting the CJK font. That would give us old font but with fallback to all the added symbols, new languages, and last resort.
Member

@ziweidao - last column shows the changes proposed with D16426: Fix #102140: Replacement of Noto Sans CJK Font

{F13870744,width=100%}

@ziweidao - last column shows the changes proposed with [D16426: Fix #102140: Replacement of Noto Sans CJK Font](https://archive.blender.org/developer/D16426) {[F13870744](https://archive.blender.org/developer/F13870744/image.png),width=100%}
Author

@Harley Yes,now it works properly.

@Harley Yes,now it works properly.

This issue was referenced by ce68367969

This issue was referenced by ce68367969c729c33e6c105bd558452bacba3c11

This issue was referenced by d01187c963

This issue was referenced by d01187c9634631b53c932e2a2eed1f2e9e203989
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Member

Added subscriber: @ChengduLittleA

Added subscriber: @ChengduLittleA
Member

Changed status from 'Resolved' to: 'Needs Developer To Reproduce'

Changed status from 'Resolved' to: 'Needs Developer To Reproduce'
YimingWu reopened this issue 2023-01-11 05:07:28 +01:00
Member

Another solution is the versions of this font that treat them separately in the same font file. Basically looks like one font with multiple faces. But they remain smaller than separate fonts by internally sharing tables of shared glyphs. Might be easy but would also need a change in how our fallback works to check multiple faces but that should be done anyway.

Hi guys, I encountered this similar problem recently when doing my own programs with freetype, turns out freetype can actually handle fonts with different variants. If we implement this into blender it could be better for all CJK users because they all see their preferred variant. I haven't dug deep enough how blender handles that but here's what I did to extract chinese variant from the "combined" font file (with some references from freetype doc and some searches...) :

    //...
        FT_Face face; FT_Long i,num_faces; FT_Open_Args args; args.flags=FT_OPEN_PATHNAME; args.pathname=buf;
        if(FT_Open_Face(f->ftlib, &args, -1, &face )) /* Here use for checking how many faces are there. */  continue; /* Can't find file. */ 
        num_faces = face->num_faces; FT_Done_Face(face); int found=0;
        for(int fa=0;fa<num_faces;fa++){
            if(FT_Open_Face(f->ftlib,&args,fa,&face)){ continue; } /* Here use `fa` to select the index of desired face. */
            if(strstr(face->family_name,"SC")){ found=1; break; } /* Here we can switch depends on the language settings and use appropriate one. */
            FT_Done_Face(face);
        }
        if(found){ /* The face for SC variant is found.*/ }
        

I'm not sure if this is useful enough or not, maybe I could help implement a fallback method in BLF.

> Another solution is the versions of this font that treat them separately in the same font file. Basically looks like one font with multiple faces. But they remain smaller than separate fonts by internally sharing tables of shared glyphs. Might be easy but would also need a change in how our fallback works to check multiple faces but that should be done anyway. Hi guys, I encountered this similar problem recently when doing my own programs with freetype, turns out freetype *can* actually handle fonts with different variants. If we implement this into blender it could be better for all CJK users because they all see their preferred variant. I haven't dug deep enough how blender handles that but here's what I did to extract chinese variant from the "combined" font file (with some references from freetype doc and some searches...) : ``` //... FT_Face face; FT_Long i,num_faces; FT_Open_Args args; args.flags=FT_OPEN_PATHNAME; args.pathname=buf; if(FT_Open_Face(f->ftlib, &args, -1, &face )) /* Here use for checking how many faces are there. */ continue; /* Can't find file. */ num_faces = face->num_faces; FT_Done_Face(face); int found=0; for(int fa=0;fa<num_faces;fa++){ if(FT_Open_Face(f->ftlib,&args,fa,&face)){ continue; } /* Here use `fa` to select the index of desired face. */ if(strstr(face->family_name,"SC")){ found=1; break; } /* Here we can switch depends on the language settings and use appropriate one. */ FT_Done_Face(face); } if(found){ /* The face for SC variant is found.*/ } ``` I'm not sure if this is useful enough or not, maybe I could help implement a fallback method in BLF.
Member

I guess this isn't a very pressing issue

I guess this isn't a very pressing issue
Philipp Oeser removed the
Interest
User Interface
label 2023-02-10 09:21:30 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#102140
No description provided.