Liu Jian Mao Cao
<!-- 使用完整字符集 -->
<link rel="stylesheet" href="/api/css?family=windfonts-ljmc&weight=regular&version=full" />
<!-- 使用轻量中文字符集 -->
<link rel="stylesheet" href="/api/css?family=windfonts-ljmc&weight=regular&version=zh-common" />
<style>
body {
font-family: 'windfonts-ljmc', sans-serif;
}
</style>/* 使用完整字符集 */
@import url('/api/css?family=windfonts-ljmc&weight=regular&version=full');
/* 使用轻量中文字符集 */
@import url('/api/css?family=windfonts-ljmc&weight=regular&version=zh-common');
.my-text {
font-family: 'windfonts-ljmc', sans-serif;
}npm install @windfonts/chinese-fontsimport { loadFont } from '@windfonts/chinese-fonts';
// 加载当前选择的字重(推荐使用 zh-common 子集)
loadFont('Ljmc-Regular', { subset: 'zh-common' });
// 在组件中使用
const MyComponent = () => (
<div style={{ fontFamily: 'windfonts-ljmc' }}>
你的文本内容
</div>
);