We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MDN: https://developer.mozilla.org/en-US/docs/Web/API/CSS_Font_Loading_API
CSS Font Loading和css的@font-face所作功能一致,在javascript中加载字体可以更精确控制其加载状态,并用在canvas等场景中。
@font-face
创建字体对象。
const font1 = new FontFace( 'f1', `url(https://fonts.gstatic.com/s/kodemono/v1/A2BYn5pb0QgtVEPFnlYOnYLweZGZuA.woff2) format('woff2')`, { weight: '800' } ); font1.load(); document.fonts.add(font1);
第三个参数描述符和css @font-face的属性font-style等是一样的作用,用于精确匹配字体源的。
font-style
示例:https://taoliujun.github.io/example/web-api/CSS_Font_Loading_API/index.html
The text was updated successfully, but these errors were encountered:
字体的学问可不少,拜读相关文章:https://fonts.google.com/knowledge
Sorry, something went wrong.
No branches or pull requests
CSS Font Loading
CSS Font Loading和css的
@font-face
所作功能一致,在javascript中加载字体可以更精确控制其加载状态,并用在canvas等场景中。接口
FontFace
创建字体对象。
示例
示例:https://taoliujun.github.io/example/web-api/CSS_Font_Loading_API/index.html
The text was updated successfully, but these errors were encountered: