---
title: "font_face"

doc_type: static
doc_category: static
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/sline/filter/font-face'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/sline/filter/font-face.md'
---

# font_face


    为传入的字体对象生成 CSS `@font-face` 声明。

    



    
`font | font_face()` 返回一个 string。
    



    
## 必选参数

        
             `font` [`font`](https://developer.shopline.com/zh-hans-cn/docs/sline/object/font.md)：给定的 font 对象。
        
    





    
## 例子

        
            

            


            

            
<SlineExample path={'/'} objects={ 
    [""] 
}>
```sline
{{{ settings.sort_title_font | font_face() }}}
```
</SlineExample>
            
        
    
