Recently, I have been studying the theme of
vitepressand I am planning to switch my blog fromhugotovitepress(because the code blocks invitepresslook better than those inhugo).
When writing the theme, I found that the custom font setting font-weight I added does not take effect, but it works in hugo.
Finally, I tried one style after another using F12, and found that vitepress's body has the following styles:
text-rendering: optimizeLegibility;
direction: ltr;
font-synthesis: style;
-webkit-font-smoothing: antialiased;
The problem lies in font-synthesis: style;, which should be changed to weight.