You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Option to have raw, unchanged, surpriseless, uniform CJK full-width punctuation width #7643
cjkChinese, Japanese, Korean typography.feature requestNew feature or requesttextRelated to the text category, which is all about text handling, shaping, etc.
A beautiful, predictable, uniform matrix of glyphs with one single, static, constant width.
I doubt this. Modern Chinese (I don't know much about J/K) texts contain non-square characters like 2026 and AI. By letting these widths constant, we give up a large number of adjustment opportunities, making it more difficult to adjust lines and prevent widows/orphans, which may worsen the overall layout.
(Also, your examples ( 。。 and 。?) are rare in real world.)
Yes, and my good old solution is \xeCJKsetup{PunctStyle=plain,RubberPunctSkip=false,CJKglue=\strut\hskip 0pt,CJKecglue=\strut\hskip 0.22em plus 200pt} which spreads all glue stretching duty to script-switching points so I still keep uniform natural width of all Hanzi/Kanji/Hanja + Hiragana + Katakana + full-width punctuation marks. To me, the matrix is paramount. (I am not familiar with Hangeul typesetting choices.)
examples ( 。。 and 。?) are rare in real world.)
Yes, this is an easy demo for behavior comparison. Real world uses include: 他说:「真巧啊(真的吗???),你也来了。」 (He said: "What a coincidence (really???), you came, too.").
I get the point that 7643 might have sophisticated chemistry with #6582. Should we first determine punctuation natural width then overhang at line-end, or should we first determine overhang then opportunistically inflate punctuation width? It will be a hard decision. I personally believe that punctuation natural width should be decided early, before Knuth-Plass searching for minimal badness.
I understand that the primary concern of #6582 is about overhang behavior. This issue 7643, on the other hand, concerns a behavior that can make problems independently without interaction with overhang. So I am not convinced that the "overhang" concept is large enough to cover this behavior. For single-line paragraphs, punctuation width problem surely occurs independently without overhang happening. In conclusion, my argument is that this issue suggests adding an option to treat all (or some particular?) full-width punctuation marks with the same width policy (without touching break policy or wrap policy) already being applied to Hanzi/Kanji/Hanja + Hiragana + Katakana, before justify/overhang computations.
But you did remind me that punctuation width policy coverage might need better fine-grained tweaking, so I got a better idea:
cjkChinese, Japanese, Korean typography.feature requestNew feature or requesttextRelated to the text category, which is all about text handling, shaping, etc.
Activity
YDX-2147483647 commentedon Jan 2, 2026
I doubt this. Modern Chinese (I don't know much about J/K) texts contain non-square characters like 2026 and AI. By letting these widths constant, we give up a large number of adjustment opportunities, making it more difficult to adjust lines and prevent widows/orphans, which may worsen the overall layout.
(Also, your examples (
。。and。?) are rare in real world.)With that said, I agree that it would be good if this can be customized.
Perhaps the API can be merged with
overhang, as proposed in #261 / #6582. (#261 is a general issue, and #6582 is specific to Chinese.)See also https://gap.zhtyp.top/#customize-overhang
Another workaround
Select a
text.regionother than the default (CN).(For Typst v0.14.2)
neruthes commentedon Jan 2, 2026
Yes, and my good old solution is
\xeCJKsetup{PunctStyle=plain,RubberPunctSkip=false,CJKglue=\strut\hskip 0pt,CJKecglue=\strut\hskip 0.22em plus 200pt}which spreads all glue stretching duty to script-switching points so I still keep uniform natural width of all Hanzi/Kanji/Hanja + Hiragana + Katakana + full-width punctuation marks. To me, the matrix is paramount. (I am not familiar with Hangeul typesetting choices.)Yes, this is an easy demo for behavior comparison. Real world uses include:
他说:「真巧啊(真的吗???),你也来了。」(He said: "What a coincidence (really???), you came, too.").I get the point that 7643 might have sophisticated chemistry with #6582. Should we first determine punctuation natural width then overhang at line-end, or should we first determine overhang then opportunistically inflate punctuation width? It will be a hard decision. I personally believe that punctuation natural width should be decided early, before Knuth-Plass searching for minimal badness.
I understand that the primary concern of #6582 is about overhang behavior. This issue 7643, on the other hand, concerns a behavior that can make problems independently without interaction with overhang. So I am not convinced that the "overhang" concept is large enough to cover this behavior. For single-line paragraphs, punctuation width problem surely occurs independently without overhang happening. In conclusion, my argument is that this issue suggests adding an option to treat all (or some particular?) full-width punctuation marks with the same width policy (without touching break policy or wrap policy) already being applied to Hanzi/Kanji/Hanja + Hiragana + Katakana, before justify/overhang computations.
But you did remind me that punctuation width policy coverage might need better fine-grained tweaking, so I got a better idea:
The
cjk-punct-widthparameter may also accept a map of punctuation width policy names, so a user may selectively have some raw and some other auto.A nice trick worth recommending to other users. I personally prefer the 3rd quadrant.
docs: Regular minor updates
neruthes commentedon Mar 1, 2026
Latest workaround: