Use otf/ tff for font in WinUI

youki 1,021 Reputation points
2022-06-17T19:29:57.743+00:00

Is it possible to use these files for fonts in C++.
I've tried the c# examples but it doesn't seem to work?!

https://stackoverflow.com/questions/70371593/how-do-i-change-the-default-font-of-my-winui-application

Windows development | Windows App SDK
Developer technologies | C++
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 90,686 Reputation points
    2022-06-17T20:22:37.957+00:00

    This works for me with a random .ttf :
    In App.xaml :

     <FontFamily x:Key="ContentControlThemeFontFamily">/Assets/Quirlycues.ttf#Quirlycues</FontFamily>  
    

    Result : the default font is changed on controls with Quirlycues font=>

    212575-customfont.jpg


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.