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. 什麼是默認字體系列?
- 2. Android中的默認字體系列是什麼?
- 3. 什麼是WPF MS Ribbon控件上使用的默認字體?
- 4. 如何設置WPF應用程序的默認字體?
- 5. 更改默認應用程序字體
- 6. 什麼是默認的HTML字體?
- 7. HTML中的默認字體是什麼
- 8. 什麼是jqplot默認系列顏色?
- 9. Android中應用欄文本的默認字體是什麼?
- 10. 什麼是jQueryMobile默認字體?
- 11. 什麼是MonoDevelop默認字體?
- 12. WPF/Silverlight企業應用程序體系結構..你做什麼?
- 13. 什麼是HTML中的默認字體系列,我該如何檢查?
- 14. 移動應用程序的web應用程序的體系結構是什麼?
- 15. 什麼是Android本機應用程序的默認用戶代理字符串?
- 16. C#WPF應用程序:什麼是「this」?
- 17. 什麼是Web應用程序的常用體系結構?
- 18. 已發佈的應用程序顯示默認系統字體而不是自定義字體
- 19. 什麼是Lift-JPA應用程序的良好體系結構?
- 20. 什麼是ASP.NET Web應用程序的推薦體系結構?
- 21. android - 應用程序體系結構什麼是最好的?
- 22. UITableViewCell樣式中使用的默認字體設置是什麼?
- 23. Eclipse在Mac OS X上使用的默認字體是什麼?
- 24. flex使用的默認字體是什麼?
- 25. iText包含什麼默認字體?
- 26. 在android應用程序中設置默認的字體大小
- 27. Django用戶認證系統的默認URL是什麼?
- 28. Rails:爲什麼不使用默認的應用程序佈局?
- 29. WPF什麼是WPF Extended ToolKit的ColorPicker的默認模板?
- 30. 指定爲CSS字體系列值是什麼是正確的:字體,字體或字體系列?
但是當我打開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