w:szCs (Font Size — Complex Script)
Specifies the font size for complex-script characters in a run, in half-points.
Parent elements
Description
w:szCs specifies the font size for complex-script text (Arabic, Hebrew, etc.) in a run. The value is expressed in half-points (i.e. divide by 2 to get points). It is the complex-script counterpart of w:sz.
It is defined in ECMA-376 Part 1 §17.3.2.38.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:val |
ST_HpsMeasure |
Non-negative integer in half-points (e.g. 24 = 12 pt, 28 = 14 pt) |
Font size for complex-script text. |
Examples
<!-- 14 pt Latin text, 16 pt Arabic text in the same run -->
<w:r>
<w:rPr>
<w:sz w:val="28"/>
<w:szCs w:val="32"/>
<w:rtl/>
</w:rPr>
<w:t>مرحبا بالعالم</w:t>
</w:r>
using DocumentFormat.OpenXml.Wordprocessing;
var run = new Run(
new RunProperties(
new FontSize { Val = "28" }, // 14 pt for Latin
new FontSizeComplexScript { Val = "32" }, // 16 pt for complex script
new RightToLeftText()
),
new Text("مرحبا بالعالم")
);
Notes
- Value is in half-points:
24= 12 pt,28= 14 pt,32= 16 pt. - When
w:szCsis omitted, the complex-script font size falls back tow:sz. - The complex-script font is specified via
w:rFonts w:cs.