Skip to content

U+2E3A and two consecutive U+2014 should not be overhung #6735

Closed

Description

@chiefaccelerators

Description

To my knowledge, U+2E3A is used in Chinese typesetting only, which does not have punctuation overhang styling right now (#6582), so the hanging of this particular punctuation is really confusing. Plus, even if we bring it back, U+2E3A should not be overhung. Per clreq, hanging punctuation "helps to avoid moving characters or punctuation marks between lines and avoids inconsistency of space between the characters in different lines." The current hanging effect of U+2E3A defeats that purpose:

Image

Typst code:

#let ccwd = 12pt

// Set the text width to exact 30 Chinese characters.
#set page("a5", margin: (x: 50% - ccwd * 15))

#set text(
  lang: "zh",
  font: ("Source Han Serif SC"), // font converts 2 U+2014s to U+2E3A
  size: ccwd,
)

#set par(justify: true, first-line-indent: (amount: 2em, all: true))

// stripe background
#place(
  top + left,
	dx: ccwd,
  repeat(
      rect(width: ccwd, height: 6em, stroke: none, fill: rgb("#7092be70")),
			gap: ccwd,
			justify: false
    )
  )

#set text(overhang: false)
囗囗囗囗囗囗囗,囗囗囗囗囗囗囗囗。囗囗囗囗囗囗囗囗囗——囗囗囗囗 this is correct

#set text(overhang: true)
囗囗囗囗囗囗囗,囗囗囗囗囗囗囗囗。囗囗囗囗囗囗囗囗囗——囗囗囗囗 the grid is broken :(

Reproduction URL

No response

Operating system

macOS

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Aug 9, 2025
  2. YDX-2147483647 commented on Aug 9, 2025

    @YDX-2147483647
    Contributor

    This issue does not occur if we write the real U+2E3A TWO-EM DASH (⸺).
    It only happens for two consecutive U+2014 EM DASH (——).

    font: ("Source Han Serif SC"), // font converts 2 U+2014s to U+2E3A

    According to the official font readme SourceHanSerifReadMe.pdf, this is implemented using the OpenType GSUB feature.

    Image

    However, I think both <2014 2014> and <2E3A> should never be overhung, even if the font does not apply GSUB here (e.g., Kaiti). Therefore, I suggest changing the title.


    Relates-to: #261

    See also clreq-gap for typst:

    Image
  3. added
    text
    change request
    cjk
    and removed
    bug
    on Aug 9, 2025
  4. changed the title [-]U+2E3A should not be overhung[/-] [+]U+2E3A and two consecutive U+2014 should not be overhung[/+] on Aug 16, 2025
  5. ponte-vecchio commented on Nov 9, 2025

    @ponte-vecchio

    This issue does not occur if we write the real U+2E3A TWO-EM DASH (⸺). It only happens for two consecutive U+2014 EM DASH (——).

    font: ("Source Han Serif SC"), // font converts 2 U+2014s to U+2E3A

    According to the official font readme SourceHanSerifReadMe.pdf, this is implemented using the OpenType GSUB feature.
    Image

    However, I think both <2014 2014> and <2E3A> should never be overhung, even if the font does not apply GSUB here (e.g., Kaiti). Therefore, I suggest changing the title.

    Relates-to: #261

    Agreed. Korean also uses U+2014, U+2E3A, U+2E3B and these should never be overhung.

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

    change requestcjktext

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions