UNICKCHENG / logseq-developer-theme

A more developer-friendly minimalist theme. For more theme styles see: https://github.com/logseq/awesome-logseq
https://docs.unickcheng.cc/#/page/logseq-developer-theme
MIT License
41 stars 3 forks source link

[Bug Report] Failed to load font resource #20

Open AlucPro opened 1 year ago

AlucPro commented 1 year ago

Use @import url("https://cdn.jsdelivr.net/gh/unickcheng/logseq-developer-theme@release/custom.css"); in custom.css. And Error occur when page load: image

UNICKCHENG commented 1 year ago

Hi @AlucPro, the error in the screenshot is caused by the failure to download the font. Multiple redundant addresses have been configured in the code to ensure that the font is more likely to be downloaded, but there may still be cases where some address requests fail. Please refer to scss/_fonts.scss for details.

Has the font in the logseq application changed (as shown in the screenshot below)? If the font has changed, this error can be ignored. It is recommended to download themes from the plugin marketplace instead of using @import to ensure normal use in offline mode

image

UNICKCHENG commented 1 year ago

@AlucPro Just discovered that the font cache was invalid today, and the latest version has been fixed. You can now download it directly from the plugin marketplace. If the font still doesn't change, please try checking if there is a .ttf file in the ~/.logseq/plugins/logseq-developer-theme/fonts directory.

image

AllanChain commented 1 year ago

@UNICKCHENG I found that the latest release v1.2.14 has an empty fonts/ directory. Is this intentional or a regression?

Also, the font LxgwWenKai-Lite is loaded first from the remote then local, which is not optimal. Can you switch the order?

https://github.com/UNICKCHENG/logseq-developer-theme/blob/99325eca4d460f62517d282c86f7d5c5850c4480/scss/_fonts.scss#L18-L30