Summary
Convert existing BDF font files to support Unicode codepoints and implement a Unicode-aware font rendering system.
Description
Replace the current ASCII-only font system with a Unicode-capable system that can load and render glyphs from the existing Terminus BDF font files.
Current State
- Font system supports only 256 ASCII characters
- Uses hardcoded glyph definitions in
src/kernel/fonts.c
- BDF Unicode font files exist in
fonts/ directory but are unused
Tasks
Implementation Details
Update include/kernel/fonts.h:
typedef struct {
uint32_t codepoint;
uint8_t width;
uint8_t height;
uint8_t *bitmap;
} unicode_glyph_t;
typedef struct {
size_t glyph_count;
unicode_glyph_t *glyphs;
// Hash table or tree for fast codepoint lookup
} unicode_font_t;
Files to Modify
src/kernel/fonts.c - Font loading and glyph lookup
include/kernel/fonts.h - Font data structures
src/kernel/framebuffer.c - Update glyph rendering calls
Success Criteria
Dependencies
Priority
High - Required for Unicode text display
Summary
Convert existing BDF font files to support Unicode codepoints and implement a Unicode-aware font rendering system.
Description
Replace the current ASCII-only font system with a Unicode-capable system that can load and render glyphs from the existing Terminus BDF font files.
Current State
src/kernel/fonts.cfonts/directory but are unusedTasks
fonts/ter-u16*.bdffilesfont_glyph(uint8_t ascii)withfont_glyph(uint32_t codepoint)Implementation Details
Update
include/kernel/fonts.h:Files to Modify
src/kernel/fonts.c- Font loading and glyph lookupinclude/kernel/fonts.h- Font data structuressrc/kernel/framebuffer.c- Update glyph rendering callsSuccess Criteria
Dependencies
Priority
High - Required for Unicode text display