Skip to content

Chinese rendering error #5900

Open
Open

Description

@What410802

Description

When I compile the attached file with the latest Tinymist in VSCode (LF, UTF-8) on Debian Bookworm, some characters cannot be displayed correctly under some conditions. However, the corresponding font files (both "Kaiti" and "Kaiti_GB2312") are without problems.
The problem occurs with both Typst (CLI) and Tinymist, and while adjusting the arrangement of "有" and "理" and other chars, the appearance of the problem can vary.

Containing just following lines can lead to the bug:

有理

Image
Image
Image
Image
(The end.)

Reproduction URL

No response

Operating system

Linux

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Feb 19, 2025
  2. What410802 commented on Feb 19, 2025

    @What410802
    Author

    There is no such problem when doing so in the official online editor, but the default font is different.

  3. hongjr03 commented on Feb 20, 2025

    @hongjr03
    Contributor

    I don't see a set rule for setting fonts in the screenshot, so I'm guessing this could be a fallback issue. See https://typst-doc-cn.github.io/guide/FAQ/strange-fonts.html

  4. What410802 commented on Feb 21, 2025

    @What410802
    Author

    This problem seems to happen only on some of the systems. I tested the same input (the only 3 characters, without setting font fallbacks) on Ubuntu, but it generated a normal output pdf where every character is displayed correctly.
    Both are tested with the latest release 0.13.0.

  5. wdscxsj commented on Feb 22, 2025

    @wdscxsj

    @What410802 Hi, what's the font previewer in the second screenshot? It looks snappy. Thanks.

  6. What410802 commented on Feb 22, 2025

    @What410802
    Author

    @What410802 Hi, what's the font previewer in the second screenshot? It looks snappy. Thanks.

    It's KFontView in KDE.

  7. added
    text
    cjk
    on Feb 25, 2025
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