Commit graph

12 commits

Author SHA1 Message Date
Clownacy
fe76fe6dea Big scary messy unfinished font overhaul
This is currently hardcoded to 640x480 English builds.

What I've done is temporarily gutted the FreeType2 font renderer, and
instead introduced a system where the font is read from a
pre-rendered font atlas. This allows me to get 100% accurate font
rendering to Windows XP... because I literally created these atlases
with Windows XP.

So not only does this eliminate the issue of FreeType producing
misshapen glyphs, but it also works around the copyright issue
regarding bundling the Courier New and MS Gothic fonts with CSE2.

You see, font files can be copyrighted like any old software, however
typefaces have a lot less protection - they're basically fair-game.
IANAL, of course - look it up yourself.

I don't really want to throw away the FreeType font system since I
spent a ton of time working on it, it allows you to use other font
files, and I'll probably wind up needing it for CSE2EX. I guess I'll
just have to find some way to either have the two systems coexist, or
make it so one or the other can be selected at compile-time.
2020-09-17 15:02:36 +01:00
Clownacy
988f1128dd Convert a bunch of ints to size_t
ints are dumb - only use them when you have to
2020-09-10 17:36:21 +01:00
Clownacy
ebb96ad239 Cleanup 2020-04-22 01:50:31 +01:00
Clownacy
6bdb406940 Also consistency with enhanced branch 2020-04-22 00:14:08 +01:00
Clownacy
f006508232 Sanity check 2020-04-22 00:13:54 +01:00
Clownacy
6a00057469 Do not stream bitmaps
Again - Wii U SD card IO is terrible, so load the whole file at
once instead.
2020-04-21 23:57:07 +01:00
Clownacy
d0b20316de Don't do -Iexternal
It pollutes the #include space.
2020-03-31 14:26:24 +01:00
Clownacy
27d82e9762 Set STB_IMAGE_STATIC
Reduce global namespace clutter.

...Man, I wish other single-header-file libs had an option like this
- this is a big part of why the new miniaudio backend's been causing
so many problems lately.
2020-03-05 00:04:47 +00:00
Clownacy
f127010848 Use stb_image's file API
Streams data, instead of reading the whole file into memory.
2020-01-27 15:07:08 +00:00
Clownacy
1cffacb72e Added DecodeBitmapFromFile 2020-01-27 00:30:54 +00:00
Clownacy
2ef48bea8a Change DecodeBitmap to use unsigned ints
Why would an image decoder ever return a _negative_ image
width/height?
2020-01-26 23:59:04 +00:00
Clownacy
cf8977207e Stop using SDL for .bmp decoding
Now it uses stb_image instead
2020-01-26 19:47:50 +00:00