Skip to content

Some smart quotes render incorrectly with CJK #8191

Open

Description

@Elecleus

Description

Just as the example code:

#set text(
  font: "Noto Serif CJK SC",
  lang: "zh",
  region: "cn",
)

#grid(
  columns: 2,
  column-gutter: 1em,
  row-gutter: 2em,
)[
  双括号、不相连\ 
  double quote, not connected:
][
  我能 "吞下" 玻璃而不伤身体
][
  双括号、相连\ 
  double quote, connected:
][
  我能"吞下"玻璃而不伤身体
][
  单括号、不相连\ 
  single quote, not connected:
][
  我能 '吞下' 玻璃而不伤身体
][
  单括号、相连\ 
  single quote, connected:
][
  我能'吞下'玻璃而不伤身体
]

compile result:

Image

This picture should show the problem :)

Operating system

Linux

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Apr 29, 2026
  2. added
    text
    cjk
    on Apr 29, 2026
  3. YDX-2147483647 commented on Apr 29, 2026

    @YDX-2147483647
    Contributor

    I agree that 我能'吞下'玻璃而不伤身体 is rendered wrongly, but I don't think it's necessary to use the smart quote feature for Chinese texts.

    Chinese characters are input with IMEs (Input Method Editors, 输入法).
    As a result, dumb quotes (" and ') are actually more difficult to input than curved quotes (“” and ‘’).
    A workaround for controlling widths of quotation marks even relies on this fact.

    (I'm not sure about J and K, though.)

  4. Elecleus commented on Apr 30, 2026

    @Elecleus
    Author

    I agree that 我能'吞下'玻璃而不伤身体 is rendered wrongly, but I don't think it's necessary to use the smart quote feature for Chinese texts.

    Chinese characters are input with IMEs (Input Method Editors, 输入法). As a result, dumb quotes (" and ') are actually more difficult to input than curved quotes (“” and ‘’). A workaround for controlling widths of quotation marks even relies on this fact.

    (I'm not sure about J and K, though.)

    I agree with you. But I have to note that in some copied text, book or something, dumb quote may be the default.

    Using regex and global replace may be a good idea :)

  5. YDX-2147483647 commented on May 30, 2026

    @YDX-2147483647
    Contributor

    smart single quote renders wrongly with CJK

    The word single can be deleted because some double quotes don't work either.

    See the last ":

    "掌柜说,'还欠钱呢!'到了端午又说'还欠钱呢!'到中秋可是没有说。"
    Image

    https://gap.zhtyp.top/#some-smart-quotes-among-chinese-texts-are-wrong

  6. changed the title [-]smart single quote renders wrongly with CJK[/-] [+]Some smart quotes render incorrectly with CJK[/+] on Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcjktext

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions