Swap emoji and unicode glyphs for Tabler components so icons inherit currentColor and font-size and render consistently across platforms. - add src/components/doc-icons.ts to resolve doc-entry frontmatter icon keys to components; frontmatter now stores semantic keys - replace the align-*.png assets with TbOutlineAlign* icons - render RevealManager action SVGs as components instead of injected innerHTML strings - carry completion icons via an optional CompletionItem.icon field
1.0 KiB
1.0 KiB
tag, icon, title
| tag | icon | title |
|---|---|---|
| md-font | font | 字体组件 |
设置整个文档的字体和文字颜色,支持 Google Fonts、emfont 和系统本地字体三种来源。
语法: :md-font[字体名]{选项}
Google 字体:
:md-font[Noto Sans SC]{source="google"}
Emfont 字体:
:md-font[Source Han Serif]{source="emfont" weight="700"}
本地字体(默认):
:md-font[STSong]
设置文字颜色:
:md-font[Noto Sans SC]{source="google" color="#1a1a2e"}
:md-font[Noto Sans SC]{source="google" weight="700" color="crimson"}
字体和颜色将应用到整个文档卡片。
属性
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
source |
google | emfont | local |
local |
字体来源 |
weight |
string | "400" |
字体粗细 |
color |
string | — | 文字颜色(CSS 颜色值,如 #ff00dd、rgb(255,0,0)) |
使用场景
用于切换文档的显示字体和文字颜色,适配不同风格需求。