How is font determined with no font declaration?

Connor Shore 186 Reputation points
2021-08-12T16:50:40.253+00:00

Hello, I have a question regarding how the font is determined in the document.xml file. In the word template there is a content control checkbox with a Wingdings checkmark as the marker. After the checkbox is just simple test with the font Trebuchet MS (Body). Our product is an engine that will generate templates made in office to different formats (docx, pdf, html, etc) with data applied. The issue we are facing is that the text following the checkboxes is not Trebuchet MS (Body) font but is Wingdings. When inspecing the document.xml of the attached template, the content control sets the font of the checkbox to Wingdings 2, however when the <w:r> element for the text "Yes" after the checkbox appears, there is no font declaration for it, its just simply text, implying that the "Yes" will use Wingdings font as well. My question is how is the font Trebuchet MS (Body) being applied to the text "Yes" in the provided template without a specific font declaration.

Thank you.

Template link: https://windwardstudios.box.com/s/rb7j3wd5znyssekop5pxbfvlrxe21fs0

122799-fonttemplate-document.xml

Note: I've attached a link to the full docx template as well as the document.xml file for that specific template. Let me know if anything else is needed.

Microsoft 365 and Office Open Specifications
{count} votes

Accepted answer
  1. Hung-Chun Yu 981 Reputation points Microsoft Employee Moderator
    2021-08-13T22:53:24.25+00:00

    Hi @Connor Shore

    When there is no font declaration, Word defaults to the use Theme Font. If you exam word\theme\theme1.xml, you noticed the body (aka minorFont) is showing "Trebuchet MS"

            <a:minorFont>  
                <a:latin typeface="Trebuchet MS" panose="020B0603020202020204"/>  
                <a:ea typeface=""/>  
    

    Via UI from Word, On the Design tab, expand Fonts Dropdown List, Customize Font, Body Font shows "Trebuchet MS"


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.