craigary / nobelium

A static blog build on top of Notion and NextJS, deployed on Vercel.
https://nobelium.js.org
MIT License
3k stars 1.97k forks source link

Characters are not in serif after setting it in config file #299

Closed ice-Yaya closed 1 year ago

ice-Yaya commented 1 year ago

Description of the bug

Expected behavior

Both CHN and ENG characters should display in serif

Reproduction

  1. Type both CHN & ENG characters in title, summary, tag and post content
  2. Publish the post
  3. Use different browsers to check

Screenshots

↓ Refer to orange arrows for behaviours in Arc and Edge

CleanShot 2023-03-28 at 22 58 32@2x

CleanShot 2023-03-28 at 21 37 53@2x

↓ Refer to blue arrows for behaviours in Safari

CleanShot 2023-03-28 at 23 00 31@2x

Additional context

Nil

Software versions

SilentDepth commented 1 year ago

The font family (serif or sans-serif) of the post content should now follow the config.

However I cannot find a solid solution to handle CJK fonts when you are not using the corresponding site language. It’s difficult to handle such cases due to the complexity of the CJK font world. For now I’ll just keep the current behavior (let your system decide the font). Wish one day we’ll have a better fix.