简体   繁体   English

通过输入表单更改字体粗细值时出现奇怪的字体行为

[英]Strange font behaviour when changing font-weight values through an input form

I'm trying to achieve a sort-of-Microsoft Word control panel, which allows you to edit and format text.我正在尝试实现一种类似于 Microsoft Word 的控制面板,它允许您编辑和格式化文本。 It works but it's not smooth at all.它有效,但根本不流畅。 When I change the font-weight or the font-style of the element, the font quickly changes to the browser's default one before loading the selected one.当我更改元素的font-weightfont-style时,字体会在加载所选字体之前快速更改为浏览器的默认字体。 Is there a way to at least improve this performance?有没有办法至少提高这种性能?

图片

maybe the font-weight you set at this moment doesn't exist for that font family.也许您此时设置的字体粗细对该字体系列不存在。

Did you try with other font?您是否尝试过使用其他字体?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM