Summary
Update the framebuffer text rendering system to properly handle UTF-8 encoded Unicode text.
Description
Modify the framebuffer console to decode UTF-8 byte sequences and render Unicode characters using the new Unicode-capable font system.
Current State
fb_putchar() treats all input as single-byte ASCII
- Text rendering assumes 1 byte = 1 character
- Console buffer stores only ASCII characters
Tasks
Implementation Details
Update src/kernel/framebuffer.c:
- Modify
console_cell_t to store uint32_t codepoint instead of char ch
- Add UTF-8 decoder state to handle incomplete sequences
- Update
write_char() to call new Unicode font system
- Handle width calculation for characters (most are single-width)
Key Functions to Update
fb_putchar(int c) - Add UTF-8 decoding
write_char(int c) - Change to write_codepoint(uint32_t cp)
draw_cell() - Use Unicode glyph lookup
- Console buffer management functions
Success Criteria
Dependencies
Priority
High - Core Unicode rendering functionality
Summary
Update the framebuffer text rendering system to properly handle UTF-8 encoded Unicode text.
Description
Modify the framebuffer console to decode UTF-8 byte sequences and render Unicode characters using the new Unicode-capable font system.
Current State
fb_putchar()treats all input as single-byte ASCIITasks
fb_putchar()to handle UTF-8 byte sequencesImplementation Details
Update
src/kernel/framebuffer.c:console_cell_tto storeuint32_t codepointinstead ofchar chwrite_char()to call new Unicode font systemKey Functions to Update
fb_putchar(int c)- Add UTF-8 decodingwrite_char(int c)- Change towrite_codepoint(uint32_t cp)draw_cell()- Use Unicode glyph lookupSuccess Criteria
Dependencies
Priority
High - Core Unicode rendering functionality