Closed william-song-shy closed 9 months ago
Hi @william-song-shy ! Can you detail the steps you take to reproduce the error ? I do see some weird behavior that needs to be fixed, but not your issue.
Hi @william-song-shy ! Can you detail the steps you take to reproduce the error ? I do see some weird behavior that needs to be fixed, but not your issue.
I created a example config. I only changed the font part from the default config. I can reproduce the problem using it.
Indeed, it is always doing this when importing settings. The obvious fix is to replace "Space Mono" by an empty string "" for now.
Since this update, Bonjourr gets its fonts the "dumb" way by requesting a certain filename to cdn.jsdelivr.net. When importing, it doesn't verify what font subset is available and simply does:
zh_CN + Space Mono = space-mono@latest/chinese-simplified-400-normal.woff2
.
Indeed, it is always doing this when importing settings. The obvious fix is to replace "Space Mono" by an empty string "" for now.
Since this update, Bonjourr gets its fonts the "dumb" way by requesting a certain filename to cdn.jsdelivr.net. When importing, it doesn't verify what font subset is available and simply does:
zh_CN + Space Mono =
space-mono@latest/chinese-simplified-400-normal.woff2
.
But these font files are loaded one by one, and the Latin file is loaded after the Chinese file failed. I belive the problem can be solved if you load the Latin file first or load all the font files together.
I forgot to mention that this a bug! To fix it, we need to check if the subset is valid before fetching the file.
The goal is to only load the file needed for performance reasons, so Latin will only be fetched if something fails.
I think that's the way to solve it! Will you fix it in next version?
Not 100% sure, but it should be included in the next update !
I understand that the improvement "Font autocomplete only shows fonts available for your language". So maybe the problem is caused by the upgrade :smile:
All fixed, update coming pretty soon 👍
Describe the bug If lauguage is Chinese, using font without Chinese supporting (such as Space Mono) will take long time requesting for non-existing chinese-simplified font file. The latin font will request after it fails. It takes a long time to load the fonts, so it also takes a long time to display the page.
To Reproduce Steps to reproduce the behavior:
Expected behavior Latin font file should load first. Also maybe the non-existing chinese font file should be ignored.
Screenshots
Device (please complete the following information):