- Posts: 212
- Thank you received: 38
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Webfonts in themes missing in extended (derived) themes
- ritapas
- Topic Author
- Offline
- Elite Member
Less
More
2 years 7 months ago - 2 years 7 months ago #218708
by ritapas
Webfonts in themes missing in extended (derived) themes was created by ritapas
Hello,
I've developed a theme which uses some custom webfonts.
I've uploaded the fonts in the theme resources box and added appropriate css in the custom.css file, like the following:
This works in that particular theme, but if I extend it, while using the derived theme I got the following errors in the browser console:
Can you help?
I wouldnt' like to reload the files for each derived theme.
LS Version: 3.23.5
Best regards.
Rita
I've developed a theme which uses some custom webfonts.
I've uploaded the fonts in the theme resources box and added appropriate css in the custom.css file, like the following:
Code:
@font-face { font-family: 'Open Sans'; src: url("../files/OpenSans-Regular-webfont.woff")format("woff"), url("../files/OpenSans-Regular-webfont.ttf") format("truetype"); font-weight:400; font-style: normal; }
This works in that particular theme, but if I extend it, while using the derived theme I got the following errors in the browser console:
Code:
downloadable font: download failed (font-family: "Open Sans" style:normal weight:400 stretch:100 src index:0): status=2147746065 source: https://xxx.xxx.xxx.xxx/limesurvey/tmp/assets/e56e81b5/files/OpenSans-Regular-webfont.woff
Can you help?
I wouldnt' like to reload the files for each derived theme.
LS Version: 3.23.5
Best regards.
Rita
Last edit: 2 years 7 months ago by ritapas. Reason: fix
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
2 years 7 months ago #218711
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Webfonts in themes missing in extended (derived) themes
Try an absolute path to the font file.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: ritapas
The topic has been locked.
- ritapas
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 212
- Thank you received: 38
2 years 7 months ago #218712
by ritapas
Replied by ritapas on topic Webfonts in themes missing in extended (derived) themes
Hello, this is odd, since you don't need to do this when using other resources!
The topic has been locked.
- ritapas
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 212
- Thank you received: 38
2 years 7 months ago #218713
by ritapas
Replied by ritapas on topic Webfonts in themes missing in extended (derived) themes
Moreover, I'm not sure which absolute path I should use, since the page always points to a
path
Code:
/tmp/assets/e56e81b5/
path
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
2 years 7 months ago #218716
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Webfonts in themes missing in extended (derived) themes
You can bypass the assets manager.
The absolute path should be something like:
The absolute path should be something like:
Code:
https://example.com/limesurvey/upload/themes/survey/yourThemeName/files/OpenSans-Regular-webfont.woff
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.