SDL_FontCache icon indicating copy to clipboard operation
SDL_FontCache copied to clipboard

SDL_FontCache draws nothing if font was created while the window was hidden.

Open midn1 opened this issue 6 years ago • 1 comments

This took me a while to track down. Passing SDL_WINDOW_HIDDEN to SDL_CreateWindow and calling SDL_ShowWindow after FC_LoadFont seems to makes SDL_FontCache draw nothing, or at least seemingly. Or, in other words, the window must be not hidden when FC_LoadFont is called.

If this is intentional behaviour, then this should definitely be documented somewhere. Sorry if it is and I missed it.

midn1 avatar Mar 07 '20 16:03 midn1

Certainly not intended, but it may be unavoidable. I expected that a hidden window would still offer a valid off-screen rendering context, but that seems not to be the case!

Yes, this should be confirmed and documented.

grimfang4 avatar Mar 07 '20 18:03 grimfang4