A standard fontScheme xml file that Word can use to set the theme font looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<a:fontScheme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Test">
<a:majorFont>
<a:latin typeface="DIN-Bold"/>
<a:ea typeface=""/>
<a:cs typeface=""/>
</a:majorFont>
<a:minorFont>
<a:latin typeface="DIN-Regular"/>
<a:ea typeface=""/>
<a:cs typeface=""/>
</a:minorFont>
</a:fontScheme>
But I would like to specify one major font and two minor fonts. Just adding another minorFont block breaks, so does adding another 'a:latin' tag.
I can't seem to find source docs for what tags are allowed. Any ideas?
Having multiple minorFont elements is not supported by Word and it is also not specified by the underlying Office Open XML standard (ISO/IEC 29500).
Section § 5.1.4.1.18 of part 4 of the specification defines the format of the font scheme part:
The font scheme consists of a pair of major and minor fonts for which to use in a document. The major font corresponds well with the heading areas of a document, and the minor font corresponds well with the normal text or paragraph areas.
The corresponding schema definition can be found at the same location. You can see that the number of occurrences for majorFont and minorFont are limited to 1:
<complexType name="CT_FontScheme">
<sequence>
<element name="majorFont" type="CT_FontCollection" minOccurs="1" maxOccurs="1"/>
<element name="minorFont" type="CT_FontCollection" minOccurs="1" maxOccurs="1"/>
<element name="extLst" type="CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="name" type="xsd:string" use="required"/>
</complexType>
The same restrictions hold for the a:latin element (see sections § 5.1.4.1.24 and § 5.1.4.1.25)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With