Ryan Malloy 68e8d3c4c4 Add TTF font support, network tools, and logging capabilities
TTF Font Support:
- Bundle 7 IBM PC fonts from Ultimate Oldschool PC Font Pack (CC BY-SA 4.0)
- Add fonts.py module with resolve_font() for host/Docker path handling
- Add fonts_list() MCP tool for font discovery
- Extend launch() with TTF parameters (output, ttf_font, ttf_ptsize, etc.)
- Mount fonts at /fonts in Docker container for TTF rendering

Network Tools:
- Add port_list() to show configured serial/parallel ports
- Add port_status() to check port connectivity
- Add modem_dial()/modem_hangup() for BBS dial-out
- Extend launch() with serial1/serial2/ipx parameters

Logging Tools:
- Add logging_status/enable/disable for DOSBox-X debug logging
- Add logging_category() for selective category control
- Add log_capture()/log_clear() for log retrieval

Code quality improvements:
- Use contextlib.suppress instead of try-except-pass
- Fix variable naming (VIDEO_BASE -> video_base)
- Apply ruff formatting throughout
2026-01-28 12:00:40 -07:00

1.4 KiB

Bundled DOS Fonts

These TrueType fonts are from The Ultimate Oldschool PC Font Pack by VileR (int10h.org).

Included Fonts

Font Description Best For
Px437_IBM_VGA_8x16.ttf Classic IBM VGA 8x16 Standard DOS text (80x25)
Px437_IBM_VGA_9x16.ttf IBM VGA 9x16 (wider) Better readability
Px437_IBM_EGA_8x14.ttf IBM EGA 8x14 80x25 with smaller font
Px437_IBM_CGA.ttf IBM CGA 40-column mode, retro look
Px437_IBM_MDA.ttf IBM MDA (Monochrome) Word processing style
PxPlus_IBM_VGA_8x16.ttf VGA 8x16 + Unicode Extended character support
PxPlus_IBM_VGA_9x16.ttf VGA 9x16 + Unicode Extended + better readability

Font Naming Convention

  • Px437_ - Strict CP437 encoding (original DOS character set)
  • PxPlus_ - Extended Unicode with full CP437 + additional characters

Usage in DOSBox-X

from dosbox_mcp.tools import launch

# Use bundled IBM VGA font
launch(
    binary_path="/dos/RIPTERM.EXE",
    output="ttf",
    ttf_font="Px437_IBM_VGA_9x16",  # Font name without .ttf
    ttf_ptsize=20,
)

License

These fonts are licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).

See LICENSE.TXT for full license text.

Attribution: