通过 assets 存储库将自定义字体添加到我的主题

这是一个很好的发现,但您不希望像这样在 CSS 中使用路径,而应使用资源名称作为变量来引用文件:

@font-face {
   font-family: supply-light;
   src: url($supply-light);
}

这在 Include assets (e.g. images, fonts) in themes and components 中有介绍

8 个赞