as it so often is, it's time to do crimes against typography with pixel fonts

I need to copy a font off my windows 98 machine to my Raspberry Pi's framebuffer application.

obviously the way to do this is to just render out every character the font supports to bitmaps and then import those as spritesheet

based on file metadata, I've been trying to do this since April, and I think every time I've opened a text editor to write the simple python script I need, someone has messaged me on discord

fine I'll close discord and just be offline for an hour

and someone walks into my bedroom asking about help finding a cable

okay I generated it

and the part from April is wrong, and I need to fix it on Windows 98. DAMN IT

I'm glad Pillow now has .get_flattened_data to match .getdata, especially since neither of them do what I want, and have never done what I want

future foone:

it's Image.tobytes() that you want

okay I have the font imported and a very simple (no wrapping or newline handling) text engine:
THIS IS THE WRONG FONT (SIZE)
I've extracted MS Sans Serif 10 point. I need MS Sans Serif 8 point.
every day is a good day to pull out Visual C++ 6.0!
just kidding, I've already crashed the OS in that screenshot. The cursor switched to the text cursor and is stuck that way, you can't click anything

oh no, I need unicode support
in windows 98

I need unicows

oh good there's an open source replacement, OpenCow:
https://opencow.sourceforge.net/
Opencow

I do not recall how you do ASCII/Unicode dual-use source code. There's some macro you gotta wrap around your string literals, I seem to remember
MSLU: Develop Unicode Applications for Windows 9x Platforms with the Microsoft Layer for Unicode

the secret macro is _T("foobar") which'll do nothing in ASCII mode, but if _UNICODE is defined, it turns "foobar" into "unicode", by which they mean UCS-2
I copy-pasted UNICOWS.DLL into C:\WINDOWS\SYSTEM which of course crashed Explorer, because Windows 98
I still don't have UNICOWS.LIB and it may be a pain to get it
I think I can maybe get it from the Windows XP Platform SDK? Lets see if I can still get to it on a Windows 98 system.
oh goody you have to install everything and win98 can't run the MSIs
I do not currently have a local XP VM
okay it won't work. I think the API I'm using is not supported on win9x. I could check the docs but they pretend XP was the first windows
@foone Rendering each letter might be insufficient. Because of kerning and hinting. Might need every glyph pair instead. For non-monospace fonts at least.