How can I get a UWP Phone app to respect FontFamily?

74 Views Asked by At

I have a trivial UWP app with the following included in main.xaml:

<Grid>
    <Border Background="Black">
        <TextBlock
            x:Name="bob"
            FontFamily="Segoe UI Mono"
            FontSize="12"
            Foreground="White"
            Text=“Whatever”
            />
    </Border>
</Grid>

As a desktop app, the text appears in the chosen font family. But in a phone emulator, the FontFamily is ignored completely.

Is there a way for Windows Phone to respect the FontFamily selection? Do I need to explicitly include my font in the app itself?

1

There are 1 best solutions below

2
On BEST ANSWER

I think your phone may lose this font.

Try to add the font to your solution.

Add a folder called Font

And you should add the font file to Font folder like this picture.

enter image description here

You should change your code.

    <TextBlock Margin="10,100,10,10"
               FontFamily="Font/And Love St.ttf#And Love st"
               Text="Lov ms" ></TextBlock> 

If you can see Chinese that I suggest you can see my blog.