Commit graph

4 commits

Author SHA1 Message Date
fbb1cce5c3 Add TrueType font support via stb_truetype.h
Integrate stb_truetype.h to rasterize TTF glyphs into 1-bit .FNT v3
format consumed by Win3.x display drivers. Key implementation detail:
.FNT bitmaps use column-major byte order (all rows of byte-column 0
first, then byte-column 1, etc.), not row-major.

New API: wdrvLoadFontTtf(path, pointSize) loads any TTF at any size.
Demo 7 renders Liberation Sans/Serif/Mono at 16/20/24pt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 00:38:16 -06:00
e8a7812233 Add loadable font support: .FON/.FNT loading with v2→v3 conversion
Load Windows 3.x .FON (NE resource containers) and raw .FNT font files
for use with ExtTextOut. Multiple fonts can be active simultaneously.
All available .FON files contain v2 fonts but VBESVGA.DRV requires v3
in 386 protected mode, so the loader converts on load.

- Add NE resource table structures (NeResourceTypeT, NeResourceEntryT)
- Add WdrvFontT opaque type with load/unload API
- Implement buildFontFromFnt() v2→v3 converter
- Implement wdrvLoadFontFon() NE resource parser
- Move font from per-driver to global singleton (wdrvLoadFontBuiltin)
- Add WdrvFontT parameter to wdrvExtTextOut (NULL = built-in)
- Add Demo 6: Courier, Sans Serif, System fonts side by side
- Copy fon/*.FON to bin/ during build

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 23:04:30 -06:00
847db7586b Add README.md and expand code comments across all source files
Add comprehensive README covering architecture, API usage, build
instructions, tested drivers, binary patching details, and DGROUP
layout. Expand file header comments in all library sources and headers
to document module responsibilities, data flow, and key constraints.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 18:46:05 -06:00
628ef231b9 Initial commit. 2026-02-21 18:01:54 -06:00