Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

unicode: Support diacritic marks > 0xffff (disabled for now)

* Terminating record of the max unicode codepoint (0x10ffff)
* Add in Arabic diacritic marks in the 0x10efa..10efff range

This is currently disasbled due to it effectively doubling the
size of our diacritic table. The diacritics added are unlikely
to be seen in practice as they are used only in some formal
Quaranic contexts. If we identify other diacritic marks above
0xffff, then we can turn this code on.

Change-Id: I50c2eace18c70be6fe7199fccab190e7da401089

+16 -2
+16 -2
firmware/common/diacritic.c
··· 34 34 /* Each diac_range_ struct defines a Unicode range that begins with 35 35 * N diacritic characters, and continues with non-diacritic characters up to the 36 36 * base of the next item in the array, [info] packs RTL status and the count of 37 - * diacritic chars after [base]. RTL occupies the MSB and CNT the (7) lower bits 37 + * diacritic chars after [base]. RTL occupies the MSB and CNT the remaining bits 38 38 */ 39 + 40 + #ifdef UNICODE32 41 + //#define DIAC_UCSCHAR 42 + #endif 39 43 40 44 struct diac_range 41 45 { 42 - uint16_t base; /* Not ucschar_t until we need >16b */ 46 + #if defined(DIAC_UCSCHAR) 47 + ucschar_t base; 48 + #else 49 + uint16_t base; 50 + #endif 43 51 uint16_t info; /* [RTL:1 CNT:15] */ 44 52 }; 45 53 ··· 192 200 DIAC_RANGE_ENTRY(0xfe20, 0xfe30, 0), /* v1.0 - v8.0 */ 193 201 DIAC_RANGE_ENTRY(0xfe70, 0xfe70, 1), 194 202 DIAC_RANGE_ENTRY(0xff00, 0xff00, 0), 203 + /* Final entry is a terminator */ 204 + #if defined(UNICODE32) && defined(DIAC_UCSCHAR) 205 + DIAC_RANGE_ENTRY(0x010efa, 0x010f00, 1), /* v15.0 - v17.0 */ 206 + DIAC_RANGE_ENTRY(0x10ffff, 0xffff, 0), 207 + #else 195 208 DIAC_RANGE_ENTRY(0xffff, 0xffff, 0), 209 + #endif 196 210 }; 197 211 198 212 #define MRU_MAX_LEN 32