Open NathanLovato opened 2 years ago
Hi Nathan. Just for understanding, purpose of this issue is "just" to add some addtional fonts for support this languages. Right? So for example put a font from here: https://fontmeme.com/fonts/cjk-fonts-collection/ under the folder "ui/theme/fonts"
Yes, this also involves updating many font resources with the appropriate font files/fallbacks. See res://ui/theme/fonts
. Ideally I'd like a CJK font that's not only good-looking, clearly readable, but also fairly lightweight if possible. A great candidate is Noto Sans: https://fonts.google.com/noto
And as far as languages are concerned, we will need at least Japanese, simplified Chinese, perhaps Korean. We currently can't support arabic, at least iirc right-to-left writing isn't supported in Godot 3, so it's something we'll have to add when porting to Godot 4.
Hi. Thanks for make it clearer.
I had then just some addtional quqstions:
font_documentation_bold.tres
just then for the corresponding language for exaample font_documentation_korean.tres
DynamicFont also supports defining one or more fallback fonts, which will be used when displaying a character not supported by the main font.
- We should add then these new fonts as "Fallback" in all font resources
If i understand everything correct you can assigne this to me, and i will do this.
We should add then these new fonts as "Fallback" in all font resources
This is correct, this would be the best way to do it. And then test with some sample Japanese / Korean / Chinese text that it displays correctly in the editor (you can make label nodes, put the text in there and use the font resource on the labels)
For Chinese there are two, one for Simplified Chinese and one for Traditional Chinese
I would support simplified Chinese first, I think it's the one translation that'll quickly be completed.
You got it all right! I just assigned you to this issue. If you'd like me to check your work before you spend too much time on this, you can open a pr that just modifies one font resource. But if you feel confident you can just go ahead and change all the font resources in one go.
Oh and for the fonts I'd prefer sans serif. They read a little better I find when the text is too small. They look a bit more modern too.
Alright, thank you.
I will work on this, probably later this day 😉
So what going on adding the chinese?
@benpan2 I invite you to read the first post in the issue about how we'd like this to be done. Developers are most welcome to contribute - this is something we don't have the time to work on now. The feature to download CJK fonts as needed hasn't been contributed yet.
People are translating the app to Chinese and Japanese. We should include fonts for those languages in the app for testing purposes.
EDIT: PR https://github.com/GDQuest/learn-gdscript/pull/688 attempted to add those. However, these fonts are heavy and we'd like not to make the initial download larger for every user., but rather do it on demand.
Fonts should be downloaded at runtime and cached when users switch to Chinese or another CJK language. This means they also need to be swapped at runtime, using Godot's theming API.