gpt4 book ai didi

c# - Segoe SemiBold 字体在 Windows Phone 应用程序中不起作用

转载 作者:太空宇宙 更新时间:2023-11-03 15:32:13 25 4
gpt4 key购买 nike

在我们的应用程序中,我们使用普通、粗体和半粗体类型的 Segoe UI 字体。在设计器中,所有这 3 种看起来都与预期不同,但在设备(或模拟器)上,半粗体字体无法正常工作,它看起来与粗体相同。

我也尝试过使用“Segoe UI SemiBold”字体而不是“Segoe UI”,但结果是一样的。

代码如下:

<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" >
<TextBlock Margin="5" Text="Hello World!" FontFamily="Segoe UI" FontSize="30" />
<TextBlock Margin="5" Text="Hello World!" FontFamily="Segoe UI SemiBold" FontSize="30" FontWeight="SemiBold"/>
<TextBlock Margin="5" Text="Hello World!" FontFamily="Segoe UI Bold" FontSize="30" FontWeight="Bold" />
</StackPanel>

另外,附上设计器和模拟器的屏幕截图。 Designer Screenshot Simulator Scrrnshot

在设计器中,我们可以看到所有 3 种字体之间的区别,而在模拟器中,半粗体和粗体看起来很相似。

最佳答案

设置字体系列不理想。首选的方法是设置 FontWeight

关于c# - Segoe SemiBold 字体在 Windows Phone 应用程序中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33411256/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com