Firefox font rendering issues

Im developing a personal project that uses the comic sans font(and some other microsoft fonts) in combination with a lack of anti-aliasing in order to make the text look like a really old website. While it works fine on windows with smooth font edges turned off, it looks jagged on Linux Mint XFCE and the spacing is incorrect, breaking certain parts of the page.
Here’s just an example I whipped up.

Figure 1: What the page is supposed to look like.

Figure 2: What the page looks like on Linux Mint + taskbar for comparison. Notice how the text is closer to the image than on windows

Both of these screenshots are from the same html file and are both running on firefox.

I included the taskbar because i set the system font to tahoma. The fonts work well in most places, but are broken in others, especially firefox. I’ve tried several solutions such as messing with about:config, creating a fonts.conf file, and even trying alternative fonts such as comic relief. No luck. I’m not sure what the problem is but if anyone has any advice please let me know!

The particular distro im using is Linux Mint 22.3 x86_64