Hello,
Welcome to Microsoft Q&A.
For system fonts which installed on the device (such as Segoe UI), a font family contains multiple fonts with different weights, which will be switched when calling TextBlock.FontWeight
.
For custom fonts, the application will calculate based on the current font-weight instead of switching to another font.
This means that the text weights displayed by the following two TextBlocks may be different (even if the font files are in the same directory):
<TextBlock FontFamily="ms-appdata:///Local/angsa.ttf#Angsana New" FontWeight="Bold" Text="Hello World"/>
<TextBlock FontFamily="ms-appdata:///Local/angsab.ttf#Angsana New" Text="Hello World"/>
Therefore, for custom fonts, it is recommended to distinguish them by file, and different font-weight refer to different font files.
In addition, FontFamily.Source
can be a path, but we cannot use ,
to separate multiple paths.
Thanks.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.