1
0
Fork 0
forked from len0rd/rockbox

Revert "internals: Support characters beyond the first unicode plane (WIP)"

This reverts commit d05c59f35b.
This commit is contained in:
Solomon Peachy 2025-08-20 16:09:49 -04:00
parent d05c59f35b
commit 84504c7471
44 changed files with 335 additions and 480 deletions

View file

@ -21,25 +21,24 @@
#ifndef _FONT_CACHE_H_
#define _FONT_CACHE_H_
#include <stdbool.h>
#include "config.h"
#include "lru.h"
/*******************************************************************************
*
*
******************************************************************************/
struct font_cache
{
struct lru _lru;
unsigned int _size;
unsigned int _capacity;
ucschar_t _prev_char_code;
int _size;
int _capacity;
int _prev_char_code;
int _prev_result;
short *_index; /* index of lru handles in char_code order */
};
struct font_cache_entry
{
ucschar_t _char_code;
unsigned short _char_code;
unsigned char width;
unsigned char bitmap[1]; /* place holder */
};
@ -56,7 +55,7 @@ void font_cache_create(
* Note: With cache_only this can return NULL, which otherwise never happens */
struct font_cache_entry* font_cache_get(
struct font_cache* fcache,
ucschar_t char_code,
unsigned short char_code,
bool cache_only,
void (*callback) (struct font_cache_entry* p, void *callback_data),
void *callback_data);