Skip to content

Commit 4d9a304

Browse files
Wolfy7NathanLovato
andauthored
feat: add support for chinese text
close #497 * improvement: add CJK fonts and set them as fallback in the font ressources * remove JP and KR fonts, only keep chinese * use simplified chinese font as we have near 100% translations for simplified chinese --------- Co-authored-by: Nathan Lovato <[email protected]>
1 parent 2c69ab9 commit 4d9a304

27 files changed

+77
-25
lines changed

ui/theme/fonts/NotoSansSC-Bold.ttf

10.1 MB
Binary file not shown.
10.1 MB
Binary file not shown.

ui/theme/fonts/font_button.tres

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
[gd_resource type="DynamicFont" load_steps=2 format=2]
1+
[gd_resource type="DynamicFont" load_steps=3 format=2]
22

33
[ext_resource path="res://ui/theme/fonts/Montserrat-Bold.ttf" type="DynamicFontData" id=1]
4+
[ext_resource path="res://ui/theme/fonts/NotoSansSC-Bold.ttf" type="DynamicFontData" id=3]
45

56
[resource]
67
size = 24
78
use_mipmaps = true
89
use_filter = true
910
font_data = ExtResource( 1 )
11+
fallback/0 = ExtResource( 3 )
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
[gd_resource type="DynamicFont" load_steps=2 format=2]
1+
[gd_resource type="DynamicFont" load_steps=3 format=2]
22

33
[ext_resource path="res://ui/theme/fonts/Montserrat-Bold.ttf" type="DynamicFontData" id=1]
4+
[ext_resource path="res://ui/theme/fonts/NotoSansSC-Bold.ttf" type="DynamicFontData" id=3]
45

56
[resource]
67
size = 24
78
use_mipmaps = true
89
use_filter = true
910
extra_spacing_char = 1
1011
font_data = ExtResource( 1 )
12+
fallback/0 = ExtResource( 3 )

ui/theme/fonts/font_button_small.tres

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
[gd_resource type="DynamicFont" load_steps=2 format=2]
1+
[gd_resource type="DynamicFont" load_steps=3 format=2]
2+
3+
[ext_resource path="res://ui/theme/fonts/NotoSansSC-Bold.ttf" type="DynamicFontData" id=2]
24

35
[sub_resource type="DynamicFontData" id=1]
46
font_path = "res://ui/theme/fonts/Montserrat-Bold.ttf"
@@ -8,3 +10,4 @@ size = 18
810
use_mipmaps = true
911
use_filter = true
1012
font_data = SubResource( 1 )
13+
fallback/0 = ExtResource( 2 )

ui/theme/fonts/font_code.tres

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
[gd_resource type="DynamicFont" load_steps=2 format=2]
1+
[gd_resource type="DynamicFont" load_steps=3 format=2]
22

33
[ext_resource path="res://ui/theme/fonts/SourceCodePro-Regular.otf" type="DynamicFontData" id=1]
4+
[ext_resource path="res://ui/theme/fontt/NotoSansSC-Regular.otf" type="DynamicFontData" id=3]
45

56
[resource]
67
size = 20
78
use_mipmaps = true
89
use_filter = true
910
font_data = ExtResource( 1 )
11+
fallback/0 = ExtResource( 3 )
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
[gd_resource type="DynamicFont" load_steps=2 format=2]
1+
[gd_resource type="DynamicFont" load_steps=3 format=2]
22

33
[ext_resource path="res://ui/theme/fonts/SourceCodePro-Regular.otf" type="DynamicFontData" id=1]
4+
[ext_resource path="res://ui/theme/fonts/NotoSansSC-Regular.ttf" type="DynamicFontData" id=3]
45

56
[resource]
67
use_mipmaps = true
78
use_filter = true
89
font_data = ExtResource( 1 )
10+
fallback/0 = ExtResource( 3 )
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
[gd_resource type="DynamicFont" load_steps=2 format=2]
1+
[gd_resource type="DynamicFont" load_steps=3 format=2]
22

33
[ext_resource path="res://ui/theme/fonts/OpenSans-Bold.ttf" type="DynamicFontData" id=1]
4+
[ext_resource path="res://ui/theme/fonts/NotoSansSC-Bold.ttf" type="DynamicFontData" id=3]
45

56
[resource]
67
size = 18
78
use_mipmaps = true
89
use_filter = true
910
font_data = ExtResource( 1 )
11+
fallback/0 = ExtResource( 3 )
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
[gd_resource type="DynamicFont" load_steps=2 format=2]
1+
[gd_resource type="DynamicFont" load_steps=3 format=2]
22

33
[ext_resource path="res://ui/theme/fonts/OpenSans-Italic.ttf" type="DynamicFontData" id=1]
4+
[ext_resource path="res://ui/theme/fonts/NotoSansSC-Regular.ttf" type="DynamicFontData" id=2]
45

56
[resource]
67
size = 18
78
use_mipmaps = true
89
use_filter = true
910
font_data = ExtResource( 1 )
11+
fallback/0 = ExtResource( 2 )
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
[gd_resource type="DynamicFont" load_steps=2 format=2]
1+
[gd_resource type="DynamicFont" load_steps=3 format=2]
22

33
[ext_resource path="res://ui/theme/fonts/SourceCodePro-Regular.otf" type="DynamicFontData" id=1]
4+
[ext_resource path="res://ui/theme/fonts/NotoSansSC-Regular.ttf" type="DynamicFontData" id=3]
45

56
[resource]
67
size = 18
78
use_mipmaps = true
89
use_filter = true
910
font_data = ExtResource( 1 )
11+
fallback/0 = ExtResource( 3 )

0 commit comments

Comments
 (0)