I don’t really have a good solution for you here, but in the case where you want to use a special font for Chinese characters, keep in mind that people who visit your site will already have those characters in the form of their system font. So while the font downloads in the background, the characters will appear, but you need to make sure you’re doing a couple things. If you do use the Google fonts api, make sure you have ‘display=swap’ in the request. This will ensure that the font is swapped when ready, and isn’t blank while fonts are downloading:
Of course, googleapis.com is (sometimes?) blocked in China, but this answer seems to state that fonts work:
There’s also a trick you can use, where you can only download certain characters from a font: https://stackoverflow.com/q/18641479. If anyone visiting your site has ever seen a website that uses that font (the odds are pretty high) then they will have that font already in their browser cache, so no download will be necessary.
Another trick: If you are 'bold’ing only a single character and don’t want to download every single character for that ‘weight’, here’s what you would do. Let’s say you wanted to get
黃
In the Noto font, but only that character. You would first encode it as %E9%BB%83 using this and then your font url would be:
https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap&text=%E9%BB%83 which is only 1.2kb!
yes, but not sometimes, but always at least for now.
Yes, only google font Apis is working for China, but the speed is not stable, that is why we need VPN access.
Chinese font is completely different with English font, and that is why the chinese font is always so big, so, that way of stackoverflow is not practical for Chinese fonts.
En... thanks so much.
Actually, I only use the Noto+Sans+SC, the total size is around 400MB, I can upload it to our server, do you think it is possible to reference that font from our local server?
2# The key here is that I used the ../fonts/ as directory in CSS, and without our local sever domain name, and also not ${resourcesFolderName}/, otherwise there will error at frontend, right way looks as following:
The above way does not support preview the font in Hype, so, the only problem for me now, is that I need use Google font in Hype to preview, and change the custom CSS before upload sever, anyway, it works.