I have some basics set up in my game but I came to a point where I want to include font rendering (initially for debug output to the screen).
Looking at various tutorials and the SDL_ttf library I require clarification on something. The SDL_ttf will give you an SDL_Surface which you can then create a texture from to allow for hardware rendering. The whole process though requires a font file loading.
My main question is - Is it safe to leave the font file open until the font is no longer needed?
I saw a tutorial which closed the font file immediately after creating the SDL_Texture. My thoughts were if this was used for frequently updated text e.g. a frame rate counter, this would be highly inefficient and it would be better to hold the font file open (assuming there is no negative impact).
And the follow up from this would be if the font file is held open, would it be locked so no other font could use it?