FontNumeralAlignment 枚举

定义

描述 Typography 对象的数字对齐方式。Describes the numeral alignment for a Typography object.

public enum class FontNumeralAlignment
public enum FontNumeralAlignment
type FontNumeralAlignment = 
Public Enum FontNumeralAlignment
继承
FontNumeralAlignment

字段

Normal 0

使用默认数字对齐方式。Default numeral alignment is used.

Proportional 1

使用比例宽度对齐方式。Proportional width alignment is used.

Tabular 2

使用表格对齐方式。Tabular alignment is used.

示例

下面的代码示例演示如何使用Typography对象的属性定义 Miramonte 字体的比例和表格数字。The following code example shows how to define proportional and tabular figures for the Miramonte font, using properties of the Typography object.

<TextBlock FontFamily="Miramonte">
  <Run Typography.NumeralAlignment="Proportional">114,131</Run>
</TextBlock>
<TextBlock FontFamily="Miramonte">
  <Run Typography.NumeralAlignment="Tabular">114,131</Run>
</TextBlock>

注解

OpenType 字体支持比例和表格格式的功能, 可在使用数字时控制宽度的对齐方式。OpenType fonts support a proportional and tabular figure feature to control the alignment of widths when using numerals. 比例数字将每个数字视为具有不同的宽度-"1" 比 "5" 窄。Proportional figures treat each numeral as having a different width - "1" is narrower than "5". 表格式数字被视为宽度相等的数字,因此它们可垂直对齐,从而增强财务类型信息的可读性。Tabular figures are treated as equal-width numerals so that they align vertically, which increases the readability of financial type information.

以下文本使用 Miramonte 字体显示第一列中的两个表格式数字。The following text displays two proportional figures in the first column using the Miramonte font. 请注意数字“5”和“1”之间的宽度差异。Note the difference in width between the numerals "5" and "1". 第二列显示相同的两个数值,并通过使用表格式数字功能调整其宽度。The second column shows the same two numeric values with the widths adjusted by using the tabular figure feature.

使用 OpenType 比例 & 表格数字的文本Text using OpenType proportional & tabular figures
比例和选项卡式图示例Example of proportional and tabbed figures

备注

大多数 OpenType 字体只公开了可用的全部 OpenType 功能的子集。Most OpenType fonts expose only a subset of the total OpenType features available. 如果指定的字体不支持特定功能, 则改用默认标志符号。If a specified font does not support a particular feature, the default glyphs are used instead.

适用于