FontStyles 类
定义
public ref class FontStyles abstract sealed
public static class FontStyles
type FontStyles = class
Public Class FontStyles
- 继承
-
FontStyles
示例
在下面的代码示例中,、 Normal Italic 和 Oblique 用于定义对象的字体样式 TextBlock 。In the following code example, Normal, Italic, and Oblique are used to define the font styles for the TextBlock objects.
<TextBlock FontStyle="Normal">Normal font style</TextBlock>
<TextBlock FontStyle="Italic">Italic font style</TextBlock>
<TextBlock FontStyle="Oblique">Oblique font style</TextBlock>
注解
字体样式指的是字体的倾斜度: normal、斜体和倾斜。A font style refers to the slant of a font: normal, italic, and oblique.
字形Font style | 描述Description |
---|---|
普通Normal | 正常或罗马字体中的字符是直立的。The characters in a normal, or roman, font are upright. |
斜体Italic | 斜体字体中的字符确实倾斜,并按设计方式出现。The characters in an italic font are truly slanted and appear as they were designed. |
ObliqueOblique | 倾斜字体中的字符以人为倾斜The characters in an oblique font are artificially slanted |
对于 Oblique ,通过对普通字体中的字符执行切变变换来实现倾斜度。For Oblique, the slant is achieved by performing a shear transformation on the characters from a normal font. 如果计算机或打印机上没有真正的斜体字体,则可以使用普通字体生成倾斜样式,并使用它来模拟斜体字体。When a true italic font is not available on a computer or printer, an oblique style can be generated from the normal font and used to simulate an italic font.
下图显示了 Palatino Linotype 字体的正常、斜体和倾斜字体样式。The following illustration shows the normal, italic, and oblique font styles for the Palatino Linotype font. 请注意,斜体字体样式具有比倾斜字体样式更具吸引力和视觉冲击力的外观,这只是通过倾斜文本的普通字体样式版本来创建。Notice how the italic font style has a more flowing and visually appealing appearance than the oblique font style, which is simply created by skewing the normal font style version of the text.
字体样式示例Example of font styles
属性
Italic | |
Normal | |
Oblique |