libretro / nxengine-libretro

Port of NxEngine to the libretro API. NXEngine is a Cave Story game engine clone
85 stars 89 forks source link

Adding diacritics support #64

Closed leomontenegro6 closed 4 years ago

leomontenegro6 commented 4 years ago

This pull request allow usage of all the diacritics already existing in Libretro's bitmap font.

Originally, lr-nxengine can use only the first 128 characters of the game font, which has a total of 256 characters. Any attempts of using the characters of the other half of the font renders a blank space. You can see the font characters in the image below:

Captura de tela de 2019-04-25 11-16-54

Since all diacritics are in the other half of the font, none of them are exhibited. This pull request basically increase the character font usage limit from 128 to 256 characters, thus solving the problem.

However, there are some caveats on this: Whenever any character of the other half of the font is used, it uses a wrong font color. If you use white color, it changes to green instead. And if you use shadowed white color, the character disappears. To solve this, I had to deactivate the usage of both green and blue colors, drawing back to white / shadowed colors. Apart from that, everything seems to be working.