cogentcore / core

A free and open source framework for building powerful, fast, elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the web with a single Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.74k stars 82 forks source link

Improve default fonts and support displaying all unicode characters #568

Open kkoreilly opened 1 year ago

kkoreilly commented 1 year ago

Roboto, Roboto Mono, and the Noto Sans fonts should be embedded into apps by default. Roboto and Roboto Mono look better than Go and Go Mono and are the default on Android, ChromeOS, and other Google products. Noto Sans supports many more characters than default fonts and will help resolve issues like goki/gi#484 and goki/girl#2. The one thing that needs to be figured out is a way to optimize and only embed the Noto fonts that are needed, as all of them for every script would take a lot of space.

kkoreilly commented 10 months ago

Roboto and Roboto Mono are now used as the default fonts, but we still need to support Noto fonts, likely through a separate fonts repository from which people can underscore import specific fonts. For dynamic translation, we will need to figure out a better approach, but that is beyond the scope of v2 (see #9).

kkoreilly commented 9 months ago

We also need to implement support for RTL and vertical text.

ddkwork commented 9 months ago

Roboto and Roboto Mono are now used as the default fonts, but we still need to support Noto fonts, likely through a separate fonts repository from which people can underscore import specific fonts. For dynamic translation, we will need to figure out a better approach, but that is beyond the scope of v2 (see #9).

I think it is possible to return fonts in the font repository by setting the body language, for example, when we set language="Chinese" after body instantiation, loading Chinese fonts is the default