|
PatchworkOS
|
Go to the source code of this file.
Typedefs | |
| typedef struct font | font_t |
Functions | |
| font_t * | font_default (display_t *disp) |
| font_t * | font_new (display_t *disp, const char *family, const char *weight, uint64_t size) |
| void | font_free (font_t *font) |
| int16_t | font_kerning_offset (const font_t *font, char firstChar, char secondChar) |
| uint64_t | font_width (const font_t *font, const char *string, uint64_t length) |
| uint64_t | font_height (const font_t *font) |
Definition at line 7 of file font.c.
References display_t::defaultFont, mtx_lock(), mtx_unlock(), and display_t::mutex.
Referenced by draw_string(), draw_text(), and draw_text_multiline().
| void font_free | ( | font_t * | font | ) |
Definition at line 91 of file font.c.
References font_t::disp, font_t::entry, display_t::fonts, free(), list_remove(), mtx_lock(), mtx_unlock(), and display_t::mutex.
Referenced by display_free(), display_new(), main(), procedure(), terminal_new(), and terminal_procedure().
Definition at line 158 of file font.c.
References font_t::grf, and grf_t::height.
Referenced by side_panel_draw(), terminal_char_pos(), terminal_char_rect(), terminal_pixel_height(), and terminal_scroll().
Definition at line 99 of file font.c.
References grf_kern_block_t::amount, grf_t::buffer, grf_kern_block_t::entries, font_t::grf, GRF_NONE, grf_t::kernOffsets, NULL, grf_kern_entry_t::offsetX, and grf_kern_entry_t::secondChar.
Referenced by draw_string(), draw_text(), draw_text_multiline(), and font_width().
Definition at line 17 of file font.c.
References close(), theme_t::defaultFont, font_t::disp, font_t::entry, ERR, file, display_t::fonts, theme_t::fontsDir, free(), grf_t::glyphOffsets, font_t::grf, GRF_MAGIC, GRF_NONE, grf_t::kernOffsets, list_entry_init(), list_push(), grf_t::magic, malloc(), mtx_lock(), mtx_unlock(), display_t::mutex, NULL, openf(), read(), seek(), SEEK_END, SEEK_SET, strcmp(), theme, and theme_global_get().
Referenced by display_new(), main(), procedure(), and terminal_new().
Definition at line 130 of file font.c.
References grf_glyph_t::advanceX, grf_t::buffer, font_kerning_offset(), grf_t::glyphOffsets, font_t::grf, GRF_NONE, and NULL.
Referenced by draw_calculate_aligned_text_pos(), draw_string(), draw_text(), draw_text_multiline(), start_tetris_draw(), terminal_char_pos(), terminal_char_rect(), and terminal_pixel_width().