Skip to content

CJK-latin glues stretch only before latin characters #6062

Closed

Description

@okumuralab

Description

When paragraphs are justified, glues between CJK and latin characters stretch only before latin characters. They should equally stretch.

#set par(justify: true)
#box(width:4em)[第1回だ。]

Image

Reproduction URL

No response

Operating system

macOS

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Mar 15, 2025
  2. added
    cjk
    on Mar 15, 2025
  3. sjfhsjfh commented on Mar 23, 2025

    @sjfhsjfh

    According to #701 the preferred option is to stretch the spaces in the line, so I guess a possible workaround would be adding spaces before and after 1:

    #set par(justify: true)
    #box(width:4em)[第 1 回だ。]
  4. added
    text
    on Mar 24, 2025
  5. okumuralab commented on Apr 18, 2025

    @okumuralab
    Author

    The ideal spacing between CJK and Latin characters is typically around 0.25em, which is narrower than the standard space between words. It's common practice not to use a full word space (U+0020) in these cases.

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