码迷,mamicode.com
首页 > Windows程序 > 详细

wpf使用truetype字体ttf

时间:2017-09-11 00:52:51      阅读:387      评论:0      收藏:0      [点我收藏+]

标签:target   www.   tar   value   get   div   查找   sources   字体   

查了半天都是语焉不详,这篇算是稍微详细点的: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 是字库的名称,这点得弄清楚。

 

wpf使用truetype字体ttf

标签:target   www.   tar   value   get   div   查找   sources   字体   

原文地址:http://www.cnblogs.com/macleo/p/7502935.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!