w:overflowPunct (Allow Punctuation to Overflow Text Boundary)
Allows certain punctuation characters to extend beyond the paragraph's text boundary to achieve better CJK line balancing.
Parent elements
Description
w:overflowPunct is a toggle property that permits small punctuation characters (such as periods, commas, and closing brackets) to overflow the right text boundary of a line rather than forcing a line break. This is common in East Asian typesetting to create more even-looking lines.
It is defined in ECMA-376 Part 1 §17.3.1.22.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:val |
ST_OnOff |
true, false, 1, 0, on, off |
Enables punctuation overflow. Omit to inherit. |
Examples
<w:p>
<w:pPr>
<w:overflowPunct/>
</w:pPr>
<w:r><w:t>句読点のオーバーフローを許可するサンプルテキスト。</w:t></w:r>
</w:p>
using DocumentFormat.OpenXml.Wordprocessing;
var para = new Paragraph(
new ParagraphProperties(
new OverflowPunctuation()
),
new Run(new Text("句読点のオーバーフローを許可するサンプルテキスト。"))
);
Notes
- Often used alongside
w:kinsokuandw:topLinePunctin East Asian document styles. - Only specific characters (typically half-width and full-width punctuation) qualify for overflow; the exact set is processor-defined.