erik-larsen / emscripten-sdl2-ogles2

C++/SDL2/OpenGLES2 samples running in the browser via Emscripten
MIT License
29 stars 10 forks source link

blurry ttf text #15

Open Narkhos opened 1 year ago

Narkhos commented 1 year ago

Hi,

Thank you for these great examples!

I encounter some strange issue with the ttf font example. As long as I don't compile it myself, it's fine, but after recompile it with the build-all.bat, I end up with a distorded text like that: image

I was thinking that it was an issue in the last version of emscripten and tried several builds with different versions but the problem keep showing up.

The issue appear on 2 differents computers (both on windows 11), on edge, firefox and chrome.

I tried changing the font for some other one and the problem is the same.

In the other hand, the txf font example seems to display properly.

Do you have any idea of what's appening?

Narkhos commented 1 year ago

I could make it work properly by downgrade embeded sdl_ttf in emscripten, the issue seems to be on their side or, maybe in the 2.20.2 release of sdl_ttf. I Opened an issue on emscripten repository, lets wait for a response on the subject : https://github.com/emscripten-core/emscripten/issues/19547

erik-larsen commented 2 weeks ago

Sorry for the late reply, and thanks for tracking that down to sdl_ttf. It looks like a byte padding issue to me.