Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7180

Displaying Text with SDL_ttf without font file hard code

$
0
0

I have code in C LANGUAGE to display text on screen using SDL_ttf library in linux.

TTF_Font *font;      font = TTF_OpenFont("FreeSans.ttf", 20);

But in this I don't want to give file name as hard coded or file path. so when I execute this programme on other Linux machine it should run fine. I don't want to keep always this font file with my executable.

Is there any way to write portable code for TTF_OpenFont ?or i can use something else that can solve my problem ?


Viewing all articles
Browse latest Browse all 7180

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>