3

Is there any way to use the default system font with SDL_TFF, without writing platform-specific code? Currently I just use one of the GNU FreeFont's, but I would like to be able to use the default system font.

orlp
  • 112,504
  • 36
  • 218
  • 315

1 Answers1

1

Well, what is "default system font"? I think all modern OSes allow users to customise fonts, so you need to query it somehow, if you want to use exactly that. If you don't want to write platform-specific code and want to avoid non-portable assumptions, then providing your own fonts is a correct thing to do.

Cat Plus Plus
  • 125,936
  • 27
  • 200
  • 224
  • 5
    Default font means something like API call "getSystemDefaultFont". I wondered about it too because I want my app in one file, not using external font file. – Andrei Nikolaenko Dec 10 '20 at 12:45