■ 윈도우즈 10 버전에서 윈도우즈 11 버전의 Segoe UI Variable 폰트를 사용하는 방법을 보여준다.
▶ MainWindow.xaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<Window x:Class="TestProject.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="800" Height="600" Title="TestProject"> <Window.Resources> <FontFamily x:Key="SegoeUIVariableFontFamilyKey">pack://application:,,,/FONT/#Segoe UI Variable</FontFamily> </Window.Resources> <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> <TextBlock Name="textBlock1" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="맑은 고딕" FontWeight="Light" FontStretch="Expanded" FontSize="24" Text="맑은 고딕 : 0123456789" /> <TextBlock Name="textBlock2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 20 0 0" FontFamily="{StaticResource SegoeUIVariableFontFamilyKey}" FontWeight="Light" FontStretch="Expanded" FontSize="24" Text="Segoe UI Variable : 0123456789" /> </StackPanel> </Window> |