Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] Failed to load font resource #20

Open
AlucPro opened this issue May 30, 2023 · 3 comments
Open

[Bug Report] Failed to load font resource #20

AlucPro opened this issue May 30, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@AlucPro
Copy link

AlucPro commented May 30, 2023

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

@AlucPro AlucPro changed the title Failed to load font resource [Bug Report] Failed to load font resource May 30, 2023
@UNICKCHENG
Copy link
Owner

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 UNICKCHENG added the bug Something isn't working label May 31, 2023
@UNICKCHENG
Copy link
Owner

@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
Copy link

@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/lxgw/LxgwWenKai-Lite
@font-face {
font-family: common-font;
@if not $IS_WEB {
// GitHub do not affect local use, but there are CORS(crossover restrictions) if used on the web.
src: url("https://github.com/lxgw/LxgwWenKai-Lite/releases/download/v1.245.1/LXGWWenKaiLite-Regular.ttf") format("TrueType"),
url("../fonts/Fonts_LXGWWenKaiLite_Regular.ttf") format("TrueType"),
url("fonts/Fonts_LXGWWenKaiLite_Regular.ttf") format("TrueType"),
url("https://docs.unickcheng.cc/static/fonts/Fonts_LXGWWenKaiLite_Regular.ttf") format("TrueType");
} @else {
src: url("https://docs.unickcheng.cc/static/fonts/Fonts_LXGWWenKaiLite_Regular.ttf") format("TrueType");
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants