In OpenGL ES 3, glTexImage2D cannot handle GL_BGRA format. SDL_ttf returns pixels in BGRA format (because it's the format used in FreeType2), so it needs to be converted to RGBA before passing to gfx_init_texture_with_pixels.