Add Chinese text rendering support
Extend the bitmap font pipeline with the Chinese Joker glyph subset and encode supported UTF-8 text for Tonc TTE. Move the affine map clear of the expanded font, add a compile-time VRAM overlap guard, and cover every custom glyph with host tests.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @file chinese_text.h
|
||||
* @brief UTF-8 conversion helpers for the extended TTE font.
|
||||
*/
|
||||
#ifndef CHINESE_TEXT_H
|
||||
#define CHINESE_TEXT_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/**
|
||||
* @brief Map supported UTF-8 Chinese text to valid UTF-8 sequences for custom TTE glyphs.
|
||||
*
|
||||
* ASCII bytes, including TTE formatting tags, are copied unchanged. Unsupported Unicode
|
||||
* characters are replaced with '?'. Custom glyph IDs are emitted as UTF-8 because Tonc TTE
|
||||
* decodes every byte above 0x7F as part of a UTF-8 sequence.
|
||||
*
|
||||
* @return Number of encoded bytes, excluding the null terminator.
|
||||
*/
|
||||
size_t chinese_text_encode(const char* utf8, char* output, size_t output_size);
|
||||
|
||||
#endif // CHINESE_TEXT_H
|
||||
Reference in New Issue
Block a user