-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
bugSomething isn't workingSomething isn't workingcjkChinese, Japanese, Korean typography.Chinese, Japanese, Korean typography.textText layout, shaping, internationalization, etc.Text layout, shaping, internationalization, etc.
Description
Description
I'm not sure if this is a bug or a feature that haven't been implemented. In #954, I see that CJK right puncts appearing at line start are compressed:
However, I found that there're some cases these puncts are not compressed when they appear at paragraph start:
This causes the start of the paragraphs to look like misaligned.
Related: #276
Typst code:
#let ccwd = 12pt
// Set the text width to exact 32 Chinese characters.
#set page("iso-b5", margin: (x: 50% - ccwd * 16))
#set text(
lang: "zh",
font: ("Source Han Serif"),
size: ccwd,
overhang: false,
)
#set par(justify: true, first-line-indent: 2em)
// stripe background
#place(
top + left,
repeat(
stack(
dir: ltr,
rect(width: ccwd, height: 24em, stroke: none, fill: rgb("#7092be70")),
rect(width: ccwd, height: 24em, stroke: none)
)
)
)
first paragraph no indent
囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗
(囗囗囗囗)囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗
(囗囗囗囗)囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗ijk囗囗囗囗囗囗囗囗囗囗囗囗
(囗囗囗囗)囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗xyz囗囗囗囗囗囗囗囗囗囗囗囗
“囗囗囗囗”囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗
“囗囗囗囗”囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗ijk囗囗囗囗囗囗囗囗囗囗囗囗
“囗囗囗囗”囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗囗xyz囗囗囗囗囗囗囗囗囗囗囗囗Use Case
This is a common case in CJK typesetting.
HK-SHAO and kands-code
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcjkChinese, Japanese, Korean typography.Chinese, Japanese, Korean typography.textText layout, shaping, internationalization, etc.Text layout, shaping, internationalization, etc.

