Use a custom font

0

Hello, I have a code that, although it does not give a compilation error, is not working:

LPCSTR szFontFile = "Myfont-Regular.ttf";

AddFontResourceEx(
 TEXT("Myfont-Regular.ttf"),        // font file name
 FR_PRIVATE,        // font characteristics
 NULL);

cout << "TESTE"; // to verify if the font is beeing used
cin >> x;

RemoveFontResourceExA(
  TEXT("Myfont-Regular.ttf"),
  FR_PRIVATE,
  NULL);

Is there anything I'm missing? The source is working because I already tested it with other languages.
I use GCC to compile on windows

    
asked by anonymous 26.06.2018 / 20:49

0 answers