20 if (
strcmp(family,
"default") == 0)
34 if (fileSize <=
sizeof(
font_t))
132 if (
string ==
NULL || length == 0)
139 for (
uint64_t i = 0; i < length; ++i)
uint64_t font_width(const font_t *font, const char *string, uint64_t length)
int16_t font_kerning_offset(const font_t *font, char firstChar, char secondChar)
void font_free(font_t *font)
font_t * font_new(display_t *disp, const char *family, const char *weight, uint64_t size)
uint64_t font_height(const font_t *font)
font_t * font_default(display_t *disp)
theme_t * theme_global_get(void)
Get the global theme.
uint64_t close(fd_t fd)
System call for closing files.
uint64_t seek(fd_t fd, int64_t offset, seek_origin_t origin)
System call for changing the file offset.
fd_t openf(const char *_RESTRICT format,...)
Wrapper for opening files with a formatted path.
uint64_t read(fd_t fd, void *buffer, uint64_t count)
System call for reading from files.
static void list_remove(list_t *list, list_entry_t *entry)
Removes a list entry from its current list.
static void list_push(list_t *list, list_entry_t *entry)
Pushes an entry to the end of the list.
static void list_entry_init(list_entry_t *entry)
Initializes a list entry.
#define NULL
Pointer error value.
#define ERR
Integer error value.
__UINT64_TYPE__ fd_t
A file descriptor.
_PUBLIC void * malloc(size_t size)
_PUBLIC void free(void *ptr)
_PUBLIC int strcmp(const char *s1, const char *s2)
Opaque display structure.
grf_kern_entry_t entries[]
uint32_t glyphOffsets[256]
uint32_t kernOffsets[256]
char defaultFont[MAX_PATH]
_PUBLIC int mtx_lock(mtx_t *mtx)
_PUBLIC int mtx_unlock(mtx_t *mtx)