Forum Discussion

Grevillea's avatar
Grevillea
Copper Contributor
Jun 10, 2024

How Does MS Word default display characteristics

I have a docx that contains the following two fragments 
 
<w:r>
    <w:rPr>
        <w:rFonts w:ascii="Times" w:hAnsi="Times"/>
        <w:b w:val="1"/>
        <w:bCs w:val="1"/>
        <w:sz w:val="24"/>
        <w:szCs w:val="24"/>
        <w:rtl w:val="0"/>
        <w:lang w:val="es-ES_tradnl"/>
    </w:rPr>
    <w:t>Bold Text 1</w:t>
</w:r>
.
.
.
<w:r>
    <w:rPr>
        <w:rFonts w:ascii="Times" w:hAnsi="Times"/>
        <w:b w:val="1"/>
        <w:bCs w:val="1"/>
        <w:rtl w:val="0"/>
    </w:rPr>
    <w:t>Bold Text 2</w:t>
</w:r>
 
Both "Bold Text 1" and "Bold Text 2" are displayed (and defined) as 12 Point text, yet both the sz and szCs tags are missing from the definition of "Bold Text 2"
 
I cant help thinking that MS Word implements a mechanism for defaulting tag values. Can anyone provide insight into this mechanism.
 
I realize I havnt provided much contextual information, and can provide this if required. But I cant help thinking that this is a general implmentation issue for MS Word.
 
Grevillea
  • Grevillea I have added some explanations to the xml code.  If there is no change from one paragraph to the next, the attributes are (often) not repeated.

            <w:b w:val="1"/> sets bold format for Latin text
            <w:bCs w:val="1"/> sets bold format for Compound Scripts
            <w:sz w:val="24"/> Sets font size to 24/2 = 12 pt for Latin Text
            <w:szCs w:val="24"/> Sets font size to 24/2 = 12 pt for Compound Scripts

Resources