ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
src/web/common/font.c
Go to the documentation of this file.
1#include "font.h"
2#include <ascii-chat/font.h>
5
6/* Browser terminal rendering reads the embedded font directly from WASM memory. */
7const unsigned char *get_font_default_ptr(int selection) {
8 bool matrix = selection == 0 ? GET_OPTION(matrix_rain) : selection == 2;
10}
11
12unsigned int get_font_default_size(int selection) {
13 bool matrix = selection == 0 ? GET_OPTION(matrix_rain) : selection == 2;
14 return (unsigned int)(matrix ? g_font_matrix_resurrected_size : g_font_default_size);
15}
#define GET_OPTION(field)
Safely get a specific option field (lock-free read).
Definition options.h:1336
Font resolution and bundled font data.
const size_t g_font_matrix_resurrected_size
const unsigned char g_font_matrix_resurrected[]
const size_t g_font_default_size
const unsigned char g_font_default[]
⚙️ Unified options parsing system for ascii-chat with builder pattern and lock-free access
unsigned int get_font_default_size(int selection)
const unsigned char * get_font_default_ptr(int selection)