32
A
回答
38
“默认”字体是当前操作系统的当前系统字体。 Tahoma是Windows XP的默认系统字体,在Vista上,Windows 7是Segoe UI。
3
在Windows 8上,似乎后备字体是Segoe UI,具有0.9基线和1.2行间距。
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:clr="clr-namespace:System;assembly=mscorlib">
<Page.Resources>
<clr:String x:Key="someText">The quick brown fox, ABCD, 1234567890, /@#</clr:String>
<SolidColorBrush x:Key="lightColor">#bbbbbb</SolidColorBrush>
<SolidColorBrush x:Key="darkColor">#000000</SolidColorBrush>
<FontFamily x:Key="default">non existent font</FontFamily>
<FontFamily x:Key="segoe">Segoe UI</FontFamily>
<FontFamily x:Key="segoe_base" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/composite-font"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib"
Baseline="0.9"
LineSpacing="1.2">
<FontFamily.FamilyNames>
<s:String x:Key="en-US" >Baseline Segoe UI</s:String>
</FontFamily.FamilyNames>
<FontFamily.FamilyMaps>
<FontFamilyMap Target="Segoe UI" />
</FontFamily.FamilyMaps>
</FontFamily>
</Page.Resources>
<StackPanel Margin="10" Width="250">
<TextBlock TextWrapping="Wrap">Segoe UI with a baseline of 0.9 and line spacing of 1.2 lines up with the default font</TextBlock>
<Grid Margin="5">
<TextBlock Foreground="{StaticResource darkColor}" TextWrapping="Wrap" FontSize="20" FontFamily="{StaticResource default}" Text="{StaticResource someText}"/>
<TextBlock Foreground="{StaticResource lightColor}" TextWrapping="Wrap" FontSize="20" FontFamily="{StaticResource segoe_base}" Text="{StaticResource someText}"/>
</Grid>
<TextBlock Margin="0,10,0,0" TextWrapping="Wrap">Segoe UI with the default baseline and line spacing does not line up with the default font</TextBlock>
<Grid Margin="5">
<TextBlock Foreground="{StaticResource darkColor}" TextWrapping="Wrap" FontSize="20" FontFamily="{StaticResource default}" Text="{StaticResource someText}"/>
<TextBlock Foreground="{StaticResource lightColor}" TextWrapping="Wrap" FontSize="20" FontFamily="{StaticResource segoe}" Text="{StaticResource someText}"/>
</Grid>
</StackPanel>
</Page>
+1
值得一提的是,该字体系列来自'SystemFonts.MessageFontFamily'静态属性。所以如果你需要在应用程序的某个地方使用它 - 你应该从那里读取它,而不是自己构建新的FontFamily实例。 – torvin 2017-05-18 03:52:22
相关问题
- 1. Android中的默认字体系列是什么?
- 2. 如何设置WPF应用程序的默认字体?
- 3. 更改默认应用程序字体
- 4. Android中应用栏文本的默认字体是什么?
- 5. 移动应用程序的web应用程序的体系结构是什么?
- 6. 什么是Web应用程序的常用体系结构?
- 7. 什么是ASP.NET Web应用程序的推荐体系结构?
- 8. 什么是Lift-JPA应用程序的良好体系结构?
- 9. Eclipse在Mac OS X上使用的默认字体是什么?
- 10. flex使用的默认字体是什么?
- 11. UITableViewCell样式中使用的默认字体设置是什么?
- 12. iText包含什么默认字体?
- 13. 在android应用程序中设置默认的字体大小
- 14. Django用户认证系统的默认URL是什么?
- 15. Rails:为什么不使用默认的应用程序布局?
- 16. 什么是默认的反应导入
- 17. R的plot()中的默认字体是什么?
- 18. 什么是ASP.net使用的默认序列化HttpRuntime.Cache
- 19. Django字段的默认值是什么?
- 20. 字符的默认值是什么?
- 21. 什么是默认的VB6字符集?
- 22. 更改书法默认字体不在应用程序类
- 23. Rails中has_many关系的默认顺序是什么?
- 24. Android联系人应用程序中联系人的默认帐户类型/名称是什么?
- 25. Android中的默认字体特征是什么?
- 26. 什么是属性表和页面的默认字体?
- 27. 什么是Visual Studio 2013中的默认字体
- 28. 配置tinymce-rails默认使用不同的字体系列
- 29. 默认应用程序
- 30. Web2py默认应用程序
但是当我打开MS Word中的默认字体为“宋体” .. – 2010-11-10 06:48:53
这是默认的字体,你* *类型,但与UI的不是字体(即在Word的菜单和按钮中使用的字体)。 – bitbonk 2010-11-10 06:57:31
Windows 8的任何想法? – 2014-08-30 18:34:25