代码之家  ›  专栏  ›  技术社区  ›  Craig

我怎样才能得到一个UWP手机应用程序来尊重fontfamily?

  •  0
  • Craig  · 技术社区  · 7 年前

    我有一个简单的uwp应用程序,main.xaml中包含以下内容:

    <Grid>
        <Border Background="Black">
            <TextBlock
                x:Name="bob"
                FontFamily="Segoe UI Mono"
                FontSize="12"
                Foreground="White"
                Text=“Whatever”
                />
        </Border>
    </Grid>
    

    作为桌面应用程序,文本将显示在所选字体系列中。但是在电话模拟器中,fontfamily被完全忽略。

    有没有办法让Windows Phone尊重FontFamily的选择?我是否需要在应用程序本身中显式包含字体?

    1 回复  |  直到 7 年前
        1
  •  2
  •   lindexi    7 年前

    enter image description here

        <TextBlock Margin="10,100,10,10"
                   FontFamily="Font/And Love St.ttf#And Love st"
                   Text="Lov ms" ></TextBlock> 
    

    blog