Helion-Engine / Helion

A modern fast paced Doom FPS engine
GNU General Public License v3.0
86 stars 9 forks source link

Update SixLabors.ImageSharp to latest stable release version #580

Closed lemming104 closed 2 months ago

lemming104 commented 2 months ago

In this change, I'm updating Helion onto a stable release version of the SixLabors.ImageSharp.Drawing library that is used for some image conversions (JPEG/PNG loading) and console font rendering. It is currently using a very old pre-1.0 beta of this library.

This involved reworking a couple of image loading/conversion methods, as well as the TTF font conversion method used to generate fonts for the IWAD picker, IWAD error splash screen, and console.

This eliminates the offset math and magic-number vertical/horizontal padding applied to the font graphics, and doesn't seem to clip pixels off the rendered characters or lose the descenders on letters like 'g'.

I verified that this produces reasonable results on default settings on my 1920x1080 resolution monitor; the console, IWAD picker, and "can't find an IWAD" error screen (which uses both a converted TTF font and a converted JPEG) all look good to me. If there are other cases I need to test, please let me know which ones and how, as I'm not fully versed in all the ways Helion might load these types of resources.

nstlaurent commented 2 months ago

This looks great, thank you!