From b6d24040bfbe38fa27f20c00afd742071f002abd Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sun, 19 May 2019 10:51:20 +0200 Subject: [PATCH] font thinking --- src/lv_misc/lv_font.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/lv_misc/lv_font.h b/src/lv_misc/lv_font.h index e2fd43a2c..ef992a08f 100644 --- a/src/lv_misc/lv_font.h +++ b/src/lv_misc/lv_font.h @@ -102,6 +102,23 @@ typedef struct { /* First glyph ID (array index of `glyph_dsc`) for this range */ uint16_t glyph_id_start; + /* Format 0 tiny + * glyph_id = glyph_id_start + (codepoint - range_start) */ + + /* Format 0 full + * glyph_id = glyph_id_start + glyph_id_list[codepoint - range_start] */ + + /* Sparse tiny + * glyph_id = glyph_id_start + search(unicode_list, codepoint - range_start) */ + + /* Sparse full + * glyph_id = glyph_id_start + glyph_id_list[search(unicode_list, codepoint - range_start)] */ + + uint16_t * unicode_list; + + + + /* NULL: the range is mapped continuously from `glyph_id_start` * Else map the Unicode characters from `glyph_id_start` (relative to `range_start`)*/ uint16_t * unicode_list;