/** * 思源黑体(Source Han Sans)字体定义 * 本地托管版本,支持 woff2/woff/otf 格式 */ /* 思源黑体 - 常规(Regular/Normal - 400) */ @font-face { font-family: 'Source Han Sans SC'; font-style: normal; font-weight: 400; font-display: swap; /* 快速显示文本,字体加载完成后替换 */ src: local('Source Han Sans SC Regular'), local('SourceHanSansSC-Regular'), url('/fonts/source-han-sans/SourceHanSansSC-Regular.otf') format('opentype'); } /* 思源黑体 - 中等(Medium - 500) */ @font-face { font-family: 'Source Han Sans SC'; font-style: normal; font-weight: 500; font-display: swap; src: local('Source Han Sans SC Medium'), local('SourceHanSansSC-Medium'), url('/fonts/source-han-sans/SourceHanSansSC-Medium.otf') format('opentype'); } /* 思源黑体 - 粗体(Bold - 700) */ @font-face { font-family: 'Source Han Sans SC'; font-style: normal; font-weight: 700; font-display: swap; src: local('Source Han Sans SC Bold'), local('SourceHanSansSC-Bold'), url('/fonts/source-han-sans/SourceHanSansSC-Bold.otf') format('opentype'); } /* 如果需要更多字重,可以继续添加: * - Light (300) * - ExtraLight (250) * - Heavy (900) */