dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.08k stars 1.17k forks source link

in App.xmal add FontFamily can't usable #2709

Closed mzy666888 closed 4 years ago

mzy666888 commented 4 years ago

in mainwindow.xaml use like this:

<Border
            Grid.Row="1"
            Grid.Column="0"
            Margin="3"
            Background="{StaticResource BootstrapCyan}">
            <TextBlock
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                FontFamily="{StaticResource 'Digital-7 Mono'}"
                FontSize="40"
                Foreground="White"
                Text="{Binding One}" />
</Border>

Actual behavior:

Expected behavior: but it's not usable. image

when I use WPF(.net framework),the code as the same. It's usable.

image

Minimal repro:

mzy666888 commented 4 years ago

image

setting font file attribute as like up。it's can usable.

like this before, I set font file attribute :copy output directory : copy if newer.