libsdl-org / sdl12-compat

An SDL-1.2 compatibility layer that uses SDL 2.0 behind the scenes.
Other
193 stars 40 forks source link

Maelstrom text rendering squished #274

Closed slouken closed 1 year ago

slouken commented 1 year ago

It looks like there's a bug with bitmap font rendering in sdl12-compat.

Demonstrated using Maelstrom 3.0.6:

image
slouken commented 1 year ago

I'm looking into it.

slouken commented 1 year ago

Hah!

    /* !!! FIXME: this isn't strictly correct, but SDL2 doesn't support
       !!! FIXME:  surfaces smaller than 8 bits, and this lets at
       !!! FIXME:  least one game function correctly. */
    if (depth < 8) {
        if (WantDebugLogging) {
            SDL20_Log("This app is creating an %d-bit SDL_Surface, but we are bumping it to 8-bits. If you see rendering issues, please report them!", depth);
        }
        depth = 8;
    }
slouken commented 1 year ago

Maelstrom is creating a 1-bpp surface for font rendering

slouken commented 1 year ago

Fixed!