【问题标题】:Microsoft Office 2016 Font theme xml structureMicrosoft Office 2016 字体主题 xml 结构
【发布时间】:2016-07-13 15:28:12
【问题描述】:

Word 可以用来设置主题字体的标准 fontScheme xml 文件如下所示:

<?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>

但我想指定一种主要字体和两种次要字体。只需添加另一个 minorFont 块中断,添加另一个 'a:latin' 标记也是如此。

我似乎无法找到允许使用哪些标签的源文档。有什么想法吗?

【问题讨论】:

  • 不支持。您能否详细说明您要实现的目标是什么?

标签: xml fonts ms-word ms-office


【解决方案1】:

Word 不支持具有多个 minorFont 元素,基础 Office Open XML 标准 (ISO/IEC 29500) 也未指定它。

规范part 4 的第 5.1.4.1.18 节定义了字体方案部分的格式:

字体方案由一对在文档中使用的主要和次要字体组成。主要字体与文档的标题区域相对应,次要字体与普通文本或段落区域相对应。

可以在同一位置找到相应的架构定义。可以看到majorFont和minorFont的出现次数限制为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>

a:latin 元素具有相同的限制(请参阅第 5.1.4.1.24 节和第 5.1.4.1.25 节)

【讨论】:

  • 这就是我所担心的。 +1 指出我找不到的标准。谢谢!
猜你喜欢
  • 2016-09-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-09-15
  • 2013-03-16
相关资源
最近更新 更多