none
DOCX inheritance of w:asciiTheme RRS feed

  • Question

  • Hi all;

    According to 17.3.2.26 (rFonts):

    If this attribute is not present, the default value is to leave the formatting applied at previous level in the style hierarchy. If this attribute is never applied in the style hierarchy, then the text shall be displayed in the font specified by the ascii attribute.

    Except it doesn't appear to work that way. Take a look at www.windward.net/temp/fonts.docx. The first paragraph is:

    			<w:r w:rsidRPr="008C0D1C">
    				<w:rPr>
    					<w:rFonts w:ascii="Baskerville Old Face" w:hAnsi="Baskerville Old Face"/>
    				</w:rPr>
    				<w:t>This is arial</w:t>
    			</w:r>
    

    And the style is:

    	<w:style w:type="paragraph" w:default="1" w:styleId="Normal">
    		<w:name w:val="Normal"/>
    		<w:qFormat/>
    		<w:rsid w:val="005D74F0"/>
    		<w:rPr>
    			<w:rFonts w:asciiTheme="minorBidi" w:hAnsiTheme="minorBidi"/>
    		</w:rPr>
    	</w:style>
    

    Where minorBidi is Arial. According to the spec the text should be displayed as Arial. But it is displayed as Old Baskerville. Am I missing something?

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Monday, March 4, 2013 8:28 PM

Answers

  • Hi Dave,

    1) in "This is arial", it does appear like the font should be Arial, not Baskerville if the asciiTheme setting in Normal style (being minorBidi) overrides the ascii=Baskerville attribute in the run, but I think what has happened is that the following verbiage in 17.3.2.26  rFonts (Run Fonts):

    "If the asciiTheme attribute is also specified, then this attribute shall be ignored and that
    value shall be used instead."

    is being misinterpreted as meaning, "if the asciiTheme attribute is also specified *anywhere*..." but is really intended to mean, "if the asciiTheme attribute is also specified *in the run properties*...".  When you interpret using the latter, then Word's behavior makes sense. 

    2) in "This is red", you are saying that the themefontLang | w:val=en-US means that any latin text should use the font specified by the en-US language element in the theme font's list.  But I think what is really the case, is that the minorBidi value used in the Normal style, eventually does map us to ar-SA.  The themefontLang | w:val=en-US tells Word what language to use to *spell and grammar check* the run, if requested. 

    from 17.15.1.88:

    "val (Latin Language)  Specifies the language which shall be used to check spelling and grammar (if requested) when processing the contents of this run which use Latin characters, as determined by the Unicode character values of the run content."

    Does that make sense?

    Tom

    Tuesday, March 19, 2013 11:53 PM
    Moderator
  • Hi Dave,

    We're still refining what needs to be addressed in the standard but the part (2) description that I gave is correct in that the Normal style (marked as w:default="1") was applied and the rFonts element's w:asciiTheme="minorBidi" would be applied by Word.  That lead to the ar-Ar or "Arab" script and the use of Arial.  This is according to the standard in the general sense, i.e. the hierarchy is described properly.  However, there are a couple of pieces in which there are possible gaps or need for clarification.  That's what we're looking at now. 

    As for what I said about the w:lang and w:themeFontLang val and its definition wrt the "spelling and grammar checking", it's not clear if this is correct in the standard.  We're also looking into that.  But definitely, minorBidi theme points to the w:bidi attribute of the themeFontLang element and this is the key in your example.

    Tom

    Tuesday, April 16, 2013 7:30 PM
    Moderator

All replies

  • Hi Dave,

    Thanks for the question, one of the Open Specifications team will respond to work with you shortly. 

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

    Monday, March 4, 2013 8:51 PM
    Moderator
  • Dave,

    I'll look into this for you.  Question: maybe I'm reading this incorrectly but it looks like what the description of the ascii attribute in 17.3.2.26 is saying is that if the attribute *is* present, it should be applied.  Which it is, right?  Can you help me understand what you're saying is wrong here? 

    Tom

    Tuesday, March 5, 2013 8:47 AM
    Moderator
  • Ok, I think I have a better handle on this.  The "This is arial" line should be displayed as Baskerville Old" and the "This is red." line should be displayed as Arial. 

    bidi maps to "sa-Ar" in settings.xml:

        <w:themeFontLang w:val="en-US" w:bidi="ar-SA"/>

    and therefore, minorBidi maps to the minor language "Arab" which is specified as using "Arial" in theme1.xml:

            <a:fontScheme name="Office">
    ...
                <a:minorFont>
    ...
                    <a:font script="Arab" typeface="Arial"/>

    When I view this in Word (2013), "This is red." shows up in Arial:

    The other line ("This is arial") shows up in Baskerville Old.

    Let me know if I've missed something. If you still see Baskerville Old for "This is red." then we need to look at default settings or some override or something.

    Tom

     
    Friday, March 15, 2013 7:43 PM
    Moderator
  • Hi Tom;

    What I think is incorrect (probably in the spec) is it says that the asciiTheme setting is applied if it exists at any level in the hierarchy. And that the ascii setting is only used if the asciiTheme setting is not specified at any level. For the text "This is Arial" (which is Baskerville), it has ascii="Baskerville Old Face" in document.xml and w:asciiTheme="minorBidi" for the Normal style in styles.xml.

    According to 17.3.2.26 shouldn't the w:asciiTheme="minorBidi" in styles.xml define the font as asciiTheme at any level overrides ascii at any level?

    On the "This is red" text, I thought the lang setting was used for the range of the text. So ar-SA would be used for any Arabic or Hebrew text. But that latin text would use the w:val='en-US' setting. From your comment is it correct to say that any theme set to an Ascii/HAnsi/EastEaia/Bidi named theme then uses the locale from the lang setting? If so, is this all documented somewhere because there may be other facets to this we also have to take into account.

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Sunday, March 17, 2013 1:11 PM
  • Hi Dave,

    1) in "This is arial", it does appear like the font should be Arial, not Baskerville if the asciiTheme setting in Normal style (being minorBidi) overrides the ascii=Baskerville attribute in the run, but I think what has happened is that the following verbiage in 17.3.2.26  rFonts (Run Fonts):

    "If the asciiTheme attribute is also specified, then this attribute shall be ignored and that
    value shall be used instead."

    is being misinterpreted as meaning, "if the asciiTheme attribute is also specified *anywhere*..." but is really intended to mean, "if the asciiTheme attribute is also specified *in the run properties*...".  When you interpret using the latter, then Word's behavior makes sense. 

    2) in "This is red", you are saying that the themefontLang | w:val=en-US means that any latin text should use the font specified by the en-US language element in the theme font's list.  But I think what is really the case, is that the minorBidi value used in the Normal style, eventually does map us to ar-SA.  The themefontLang | w:val=en-US tells Word what language to use to *spell and grammar check* the run, if requested. 

    from 17.15.1.88:

    "val (Latin Language)  Specifies the language which shall be used to check spelling and grammar (if requested) when processing the contents of this run which use Latin characters, as determined by the Unicode character values of the run content."

    Does that make sense?

    Tom

    Tuesday, March 19, 2013 11:53 PM
    Moderator
  • Hi;

    I think you're right that that is what is happening. But in that case I think the documentation is clearly wrong and needs to be fixed (or "clarified").

    For part (1) what's going on is pretty straightforward. But for part (2) could you get from the Word group exactly how this works?

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Wednesday, March 20, 2013 12:31 AM
  • Will do.  I'll let you know on part 2.

    Tom

    Thursday, March 21, 2013 12:03 AM
    Moderator
  • Hi Dave,

    We're still refining what needs to be addressed in the standard but the part (2) description that I gave is correct in that the Normal style (marked as w:default="1") was applied and the rFonts element's w:asciiTheme="minorBidi" would be applied by Word.  That lead to the ar-Ar or "Arab" script and the use of Arial.  This is according to the standard in the general sense, i.e. the hierarchy is described properly.  However, there are a couple of pieces in which there are possible gaps or need for clarification.  That's what we're looking at now. 

    As for what I said about the w:lang and w:themeFontLang val and its definition wrt the "spelling and grammar checking", it's not clear if this is correct in the standard.  We're also looking into that.  But definitely, minorBidi theme points to the w:bidi attribute of the themeFontLang element and this is the key in your example.

    Tom

    Tuesday, April 16, 2013 7:30 PM
    Moderator
  • Ok, thanks. Can you update here when you learn more?

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Tuesday, April 16, 2013 9:25 PM
  • Yes, when we get a better sense of what needs to be clarified I'll post something.  It may not be the finished wording but at least some idea of what, if anything, should be changed so that implementers reading here will understand it better.  For now, at least you know what Word does in this specific situation. 

    Tom

    Tuesday, April 16, 2013 9:48 PM
    Moderator