Skip to content
New issue

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

怎样才能渲染粗体字呢? #52

Closed
River-2024 opened this issue Jan 6, 2022 · 1 comment
Closed

怎样才能渲染粗体字呢? #52

River-2024 opened this issue Jan 6, 2022 · 1 comment
Labels

Comments

@River-2024
Copy link

常规字体渲染成鸿蒙黑体,粗体字依然是微软雅黑,请问作者应该如何解决呢?

QQ截图20220107054011

@F9y4ng
Copy link
Owner

F9y4ng commented Jan 7, 2022

  • 判断脚本是否成功的渲染的当前网站的字体,建议最好使用 华文行楷、华文琥珀、方正姚体 这类字形变动较大的字体进行测试。如图:
    test

  • 其次,你需要排除其他脚本的干扰,例如某脚本也对页面字体进行了定义,而且强制优先级,这样会产生结果干扰。

  • 再次,某些字体由于一些特殊原因会造成字体重写问题,比如OPPOSans

  • 最后,珍惜生命、远离百毒。很少能在大厂代码中见到滥用!important优先级的案例,百毒那是前无古人后无来者

@F9y4ng F9y4ng closed this as completed Jan 7, 2022
@F9y4ng F9y4ng added 使用建议(Suggest) 给予使用建议 新手启航(Guide) 新手教程 labels Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants