Open thekingofcity opened 8 months ago
Refer to railmapgen/railmapgen.github.io#80
From the platform's point of view, we recommend user to download those needed free fonts in advance to reduce network traffic and speed up loading. With the local fonts, we don't need to inject any Base64 fonts in CSS and it will just work in both browser and Adobe Illustrator.
IMHO I don't think adding extra non-native fonts is a good idea as we can't guarantee Google Noto Fonts are pre-installed. Also, these fonts are not officially used in any current styles, so there's no difference between falling back to SimHei (PingFang in iOS/macOS) and to Google Noto Fonts.
Please try this feature out in 'Runtime Demo' app with devtools on in settings panel and give any advice on it. :)
Sorry for the ambiguity. By fallback fonts, I mean hosting a font but ranking it at the end of the font-family. This should help users who do not have a Chinese font be able to see the characters.
These fallback fonts could be loaded after the load so loading speed might not be a problem. And injecting Base64 fonts and/or turning fonts into paths are still important as light users won't download those for the first few times. Of course, we will support only using local fonts on export.
Network traffic would increase, but we may stop loading them for users who have zh-cn like language tags in the browser.
This should help #530.
Google Noto Sans might be a great option for Chinese.