Shopify Community
使用自定义字体时,无法正常显示自定义字体
简体中文
讨论
技术问答
peterzhong
August 3, 2022, 9:08am
1
code:
@font-face { font-family: Sanctuary; font-weight: 500; font-style: normal; src: url("{{ 'Sanctuary.ttf' | asset_url }}"); font-display: swap; } .announcement-bar__message.h5 { font-family: Sanctuary; }
在资产中:
截屏2022-08-03 17.04.33.png
538×586 35.2 KB
浏览器的终端中显示:
截屏2022-08-03 17.06.00.png
2614×502 163 KB
希望能得到帮助,是哪里发生问题。
peterzhong
August 8, 2022, 8:06am
2
发现是自定义模板中上传字体文件功能会导致上传的字体文件有问题。
现在的解决方案是将字体文件从设置中的文件上传。
Related topics
Topic
Replies
Views
Activity
Why isn't my custom font displaying correctly?
Store Design
7
45
December 29, 2021
Why isn't my custom font displaying correctly?
Store Design
troubleshooting
2
40
December 11, 2022
Custom font not working correctly in frontend
Technical Q&A
3
30
December 3, 2021
Why isn't my custom font displaying correctly on my website?
Technical Q&A
css
10
57
December 28, 2022
I added a new custom font but it's not displaying correctly
Store Design
header
,
customizations
,
landing-page
,
css
,
third-party-themes
4
89
May 20, 2025