kirklin/unocss-preset-chinese

Western glyphs for Chinese punctuation marks

xfq opened this issue · 0 comments

xfq commented

Describe the bug

Since the code points of the curved quotation marks are shared by Chinese and Western scripts, according to the generated CSS, the quotation marks are displayed as Western quotation marks, because Western fonts (like Helvetica Neue) are put before Chinese fonts, which do not conform to the Chinese layout requirements. Dashes, ellipses, and middle dots have the same problem.

The clreq project solves this by using the unicode-range CSS descriptor: https://github.com/w3c/clreq/blob/gh-pages/local.css

Reproduction

https://stackblitz.com/edit/vitejs-vite-c1fe5y?file=playground%2Findex.html

System Info

System:
    OS: macOS 12.6.8
  Binaries:
    Node: 18.15.0 - ~/.asdf/installs/nodejs/18.15.0/bin/node
    npm: 9.5.0 - ~/.asdf/plugins/nodejs/shims/npm
  Browsers:
    Chrome: 116.0.5845.110
    Chrome Canary: 118.0.5976.0
    Edge: 116.0.1938.62
    Firefox: 116.0
    Firefox Developer Edition: 117.0
    Safari: 16.6
    Safari Technology Preview: 16.4


### Validations

- [X] Follow our [Code of Conduct](https://github.com/kirklin/.github/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guide](https://github.com/kirklin/contribute).
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- [X] The provided reproduction is a [minimal reproducible](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.