[Bf-blender-cvs] [e9bd6abde37] master: BLF: New Font Stack for Better Language Coverage

Harley Acheson noreply at git.blender.org
Fri Jul 29 05:12:01 CEST 2022


Commit: e9bd6abde37c276f1b8a9a22f5312d794b0f159b
Author: Harley Acheson
Date:   Thu Jul 28 20:09:20 2022 -0700
Branches: master
https://developer.blender.org/rBe9bd6abde37c276f1b8a9a22f5312d794b0f159b

BLF: New Font Stack for Better Language Coverage

Replace our existing two fonts with a stack of new fonts to increase
and improve language coverage and to add many new symbols and icons.
Covers glyphs of top 44 languages - 1.5 billion more potential users.

See D10887 for lots of details.

Differential Revision: https://developer.blender.org/D10887

Reviewed by Brecht Van Lommel

===================================================================

A	release/datafiles/fonts/DejaVuSans.woff2
A	release/datafiles/fonts/DejaVuSansMono.woff2
A	release/datafiles/fonts/MaterialIcons-Variable.woff2
A	release/datafiles/fonts/Noto Sans CJK Regular.woff2
A	release/datafiles/fonts/NotoEmoji-VariableFont_wght.woff2
A	release/datafiles/fonts/NotoSansArabic-VariableFont_wdth,wght.woff2
A	release/datafiles/fonts/NotoSansArmenian-VariableFont_wdth,wght.woff2
A	release/datafiles/fonts/NotoSansBengali-VariableFont_wdth,wght.woff2
A	release/datafiles/fonts/NotoSansDevanagari-Regular.woff2
A	release/datafiles/fonts/NotoSansEthiopic-Regular.woff2
A	release/datafiles/fonts/NotoSansGeorgian-VariableFont_wdth,wght.woff2
A	release/datafiles/fonts/NotoSansGujarati-Regular.woff2
A	release/datafiles/fonts/NotoSansGurmukhi-VariableFont_wdth,wght.woff2
A	release/datafiles/fonts/NotoSansHebrew-VariableFont_wdth,wght.woff2
A	release/datafiles/fonts/NotoSansJavanese-Regular.woff2
A	release/datafiles/fonts/NotoSansKannada-VariableFont_wdth,wght.woff2
A	release/datafiles/fonts/NotoSansMalayalam-VariableFont_wdth,wght.woff2
A	release/datafiles/fonts/NotoSansMath-Regular.woff2
A	release/datafiles/fonts/NotoSansMyanmar-Regular.woff2
A	release/datafiles/fonts/NotoSansSymbols-VariableFont_wght.woff2
A	release/datafiles/fonts/NotoSansSymbols2-Regular.woff2
A	release/datafiles/fonts/NotoSansTamil-VariableFont_wdth,wght.woff2
A	release/datafiles/fonts/NotoSansTelugu-VariableFont_wdth,wght.woff2
A	release/datafiles/fonts/NotoSansThai-VariableFont_wdth,wght.woff2
D	release/datafiles/fonts/bmonofont-i18n.ttf
D	release/datafiles/fonts/droidsans.ttf
A	release/datafiles/fonts/lastresort.woff2
M	source/blender/blenfont/BLF_api.h
M	source/blender/blenfont/intern/blf_glyph.c

===================================================================

diff --git a/release/datafiles/fonts/DejaVuSans.woff2 b/release/datafiles/fonts/DejaVuSans.woff2
new file mode 100644
index 00000000000..a391596a421
Binary files /dev/null and b/release/datafiles/fonts/DejaVuSans.woff2 differ
diff --git a/release/datafiles/fonts/DejaVuSansMono.woff2 b/release/datafiles/fonts/DejaVuSansMono.woff2
new file mode 100644
index 00000000000..cf200e12fff
Binary files /dev/null and b/release/datafiles/fonts/DejaVuSansMono.woff2 differ
diff --git a/release/datafiles/fonts/MaterialIcons-Variable.woff2 b/release/datafiles/fonts/MaterialIcons-Variable.woff2
new file mode 100644
index 00000000000..048802a6454
Binary files /dev/null and b/release/datafiles/fonts/MaterialIcons-Variable.woff2 differ
diff --git a/release/datafiles/fonts/Noto Sans CJK Regular.woff2 b/release/datafiles/fonts/Noto Sans CJK Regular.woff2
new file mode 100644
index 00000000000..5d3854b6bf7
Binary files /dev/null and b/release/datafiles/fonts/Noto Sans CJK Regular.woff2 differ
diff --git a/release/datafiles/fonts/NotoEmoji-VariableFont_wght.woff2 b/release/datafiles/fonts/NotoEmoji-VariableFont_wght.woff2
new file mode 100644
index 00000000000..4d019787bca
Binary files /dev/null and b/release/datafiles/fonts/NotoEmoji-VariableFont_wght.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansArabic-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansArabic-VariableFont_wdth,wght.woff2
new file mode 100644
index 00000000000..8ee78b73e72
Binary files /dev/null and b/release/datafiles/fonts/NotoSansArabic-VariableFont_wdth,wght.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansArmenian-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansArmenian-VariableFont_wdth,wght.woff2
new file mode 100644
index 00000000000..c6c1ed5c2cf
Binary files /dev/null and b/release/datafiles/fonts/NotoSansArmenian-VariableFont_wdth,wght.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansBengali-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansBengali-VariableFont_wdth,wght.woff2
new file mode 100644
index 00000000000..cdac12cc8e8
Binary files /dev/null and b/release/datafiles/fonts/NotoSansBengali-VariableFont_wdth,wght.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansDevanagari-Regular.woff2 b/release/datafiles/fonts/NotoSansDevanagari-Regular.woff2
new file mode 100644
index 00000000000..2cb157b2c51
Binary files /dev/null and b/release/datafiles/fonts/NotoSansDevanagari-Regular.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansEthiopic-Regular.woff2 b/release/datafiles/fonts/NotoSansEthiopic-Regular.woff2
new file mode 100644
index 00000000000..dc272d98964
Binary files /dev/null and b/release/datafiles/fonts/NotoSansEthiopic-Regular.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansGeorgian-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansGeorgian-VariableFont_wdth,wght.woff2
new file mode 100644
index 00000000000..4ebc52f0b59
Binary files /dev/null and b/release/datafiles/fonts/NotoSansGeorgian-VariableFont_wdth,wght.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansGujarati-Regular.woff2 b/release/datafiles/fonts/NotoSansGujarati-Regular.woff2
new file mode 100644
index 00000000000..6e66a15b1cd
Binary files /dev/null and b/release/datafiles/fonts/NotoSansGujarati-Regular.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansGurmukhi-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansGurmukhi-VariableFont_wdth,wght.woff2
new file mode 100644
index 00000000000..e752468775f
Binary files /dev/null and b/release/datafiles/fonts/NotoSansGurmukhi-VariableFont_wdth,wght.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansHebrew-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansHebrew-VariableFont_wdth,wght.woff2
new file mode 100644
index 00000000000..4f6033c916f
Binary files /dev/null and b/release/datafiles/fonts/NotoSansHebrew-VariableFont_wdth,wght.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansJavanese-Regular.woff2 b/release/datafiles/fonts/NotoSansJavanese-Regular.woff2
new file mode 100644
index 00000000000..aeb0bbe8dab
Binary files /dev/null and b/release/datafiles/fonts/NotoSansJavanese-Regular.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansKannada-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansKannada-VariableFont_wdth,wght.woff2
new file mode 100644
index 00000000000..56fbd8d8bce
Binary files /dev/null and b/release/datafiles/fonts/NotoSansKannada-VariableFont_wdth,wght.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansMalayalam-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansMalayalam-VariableFont_wdth,wght.woff2
new file mode 100644
index 00000000000..bdbce8a0b76
Binary files /dev/null and b/release/datafiles/fonts/NotoSansMalayalam-VariableFont_wdth,wght.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansMath-Regular.woff2 b/release/datafiles/fonts/NotoSansMath-Regular.woff2
new file mode 100644
index 00000000000..bb3baafeb7a
Binary files /dev/null and b/release/datafiles/fonts/NotoSansMath-Regular.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansMyanmar-Regular.woff2 b/release/datafiles/fonts/NotoSansMyanmar-Regular.woff2
new file mode 100644
index 00000000000..f18edac80ed
Binary files /dev/null and b/release/datafiles/fonts/NotoSansMyanmar-Regular.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansSymbols-VariableFont_wght.woff2 b/release/datafiles/fonts/NotoSansSymbols-VariableFont_wght.woff2
new file mode 100644
index 00000000000..98f940b813e
Binary files /dev/null and b/release/datafiles/fonts/NotoSansSymbols-VariableFont_wght.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansSymbols2-Regular.woff2 b/release/datafiles/fonts/NotoSansSymbols2-Regular.woff2
new file mode 100644
index 00000000000..cefcc2d9c0d
Binary files /dev/null and b/release/datafiles/fonts/NotoSansSymbols2-Regular.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansTamil-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansTamil-VariableFont_wdth,wght.woff2
new file mode 100644
index 00000000000..a3541942429
Binary files /dev/null and b/release/datafiles/fonts/NotoSansTamil-VariableFont_wdth,wght.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansTelugu-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansTelugu-VariableFont_wdth,wght.woff2
new file mode 100644
index 00000000000..790235d3a71
Binary files /dev/null and b/release/datafiles/fonts/NotoSansTelugu-VariableFont_wdth,wght.woff2 differ
diff --git a/release/datafiles/fonts/NotoSansThai-VariableFont_wdth,wght.woff2 b/release/datafiles/fonts/NotoSansThai-VariableFont_wdth,wght.woff2
new file mode 100644
index 00000000000..507255e6b5c
Binary files /dev/null and b/release/datafiles/fonts/NotoSansThai-VariableFont_wdth,wght.woff2 differ
diff --git a/release/datafiles/fonts/bmonofont-i18n.ttf b/release/datafiles/fonts/bmonofont-i18n.ttf
deleted file mode 100644
index 08b3f723d61..00000000000
Binary files a/release/datafiles/fonts/bmonofont-i18n.ttf and /dev/null differ
diff --git a/release/datafiles/fonts/droidsans.ttf b/release/datafiles/fonts/droidsans.ttf
deleted file mode 100644
index b03e47f087e..00000000000
Binary files a/release/datafiles/fonts/droidsans.ttf and /dev/null differ
diff --git a/release/datafiles/fonts/lastresort.woff2 b/release/datafiles/fonts/lastresort.woff2
new file mode 100644
index 00000000000..e5ad6f353f5
Binary files /dev/null and b/release/datafiles/fonts/lastresort.woff2 differ
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h
index 8cb368e2075..75824ae056f 100644
--- a/source/blender/blenfont/BLF_api.h
+++ b/source/blender/blenfont/BLF_api.h
@@ -18,10 +18,10 @@ extern "C" {
 #define BLF_DATAFILES_FONTS_DIR "fonts"
 
 /* File name of the default variable-width font. */
-#define BLF_DEFAULT_PROPORTIONAL_FONT "droidsans.ttf"
+#define BLF_DEFAULT_PROPORTIONAL_FONT "DejaVuSans.woff2"
 
 /* File name of the default fixed-pitch font. */
-#define BLF_DEFAULT_MONOSPACED_FONT "bmonofont-i18n.ttf"
+#define BLF_DEFAULT_MONOSPACED_FONT "DejaVuSansMono.woff2"
 
 /* enable this only if needed (unused circa 2016) */
 #define BLF_BLUR_ENABLE 0
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index 326cb2bcc27..48ddbc9f920 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -594,6 +594,10 @@ static FT_UInt blf_glyph_index_from_charcode(FontBLF **font, const uint charcode
     }
   }
 
+#ifdef DEBUG
+  printf("Unicode character U+%04X not found in loaded fonts. \n", charcode);
+#endif
+
   /* Not found in the stack, return from Last Resort if there is one. */
   if (last_resort && blf_ensure_face(last_resort)) {
     glyph_index = FT_Get_Char_Index(last_resort->face, charcode);



More information about the Bf-blender-cvs mailing list