您的位置:首页 > 产品设计 > UI/UE

wpf使用truetype字体ttf

2017-09-10 23:42 239 查看
查了半天都是语焉不详,这篇算是稍微详细点的:http://www.cnblogs.com/junhengml/p/6878933.html

要先查找到字体的字库名称,才能使用:

<Window.Resources>
<Style TargetType="TextBlock">
<Setter Property="Width" Value="46"/>
<Setter Property="Height" Value="89"/>
<Setter Property="FontSize" Value="48"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="TextElement.FontFamily" Value="Resources/#LcdD"/>
</Style>

</Window.Resources>


LcdD 是字库的名称,这点得弄清楚。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: