---
title: "font"

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

# font


    字体选择器设置中的字体。

    你可以在 HTML 资源或样式标签中使用 `font` object 来将字体设置应用于主题 CSS。



## 属性

    <div>
    

        
<ObjectProperty
    name="fallback_families"
    types={[<Mdx>string</Mdx>]}
>
<ObjectSummary>
备用字体族。


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="family"
    types={[<Mdx>string</Mdx>]}
>
<ObjectSummary>
首选字体族的名称。


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="style"
    types={[<Mdx>string</Mdx>]}
>
<ObjectSummary>
字体的样式。


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="system"
    types={[<Mdx>boolean</Mdx>]}
>
<ObjectSummary>
字体是否为系统字体。
- `true`：是系统字体。
- `false`：不是系统字体。


</ObjectSummary>
</ObjectProperty>
        
<ObjectProperty
    name="weight"
    types={[<Mdx>string</Mdx>]}
>
<ObjectSummary>
字体的粗细。


</ObjectSummary>
</ObjectProperty>
        
    
    </div>



    
## 例子

        
            

            以下示例用于设置主题全局配置中排序栏标题的字体粗细和样式。

            

            
<SlineExample path={''} objects={ 
    [""] 
}>
```sline
--sort-title-font-weight: {{settings.sort_title_font.weight}};
--sort-title-font-style: {{settings.sort_title_font.style}};
```
</SlineExample>
            
        
    
