EasyGUI
gui_text.h
1 
6 /*
7  * Copyright (c) 2019 Tilen MAJERLE
8  *
9  * Permission is hereby granted, free of charge, to any person
10  * obtaining a copy of this software and associated documentation
11  * files (the "Software"), to deal in the Software without restriction,
12  * including without limitation the rights to use, copy, modify, merge,
13  * publish, distribute, sublicense, and/or sell copies of the Software,
14  * and to permit persons to whom the Software is furnished to do so,
15  * subject to the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be
18  * included in all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
23  * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27  * OTHER DEALINGS IN THE SOFTWARE.
28  *
29  * This file is part of EasyGUI library.
30  *
31  * Author: Tilen Majerle <tilen@majerle.eu>
32  */
33 #ifndef GUI_HDR_TEXT_H
34 #define GUI_HDR_TEXT_H
35 
36 /* C++ detection */
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 #include "gui_utils.h"
42 
50 const gui_font_char_t * gui_text_getchardesc(const gui_font_t* font, uint32_t ch);
51 void gui_text_getcharsize(const gui_font_t* font, uint32_t ch, gui_dim_t* width, gui_dim_t* height);
54 
59 /* C++ detection */
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif /* GUI_HDR_TEXT_H */
GUI FONT character information.
Definition: gui_defs.h:461
void gui_text_getcharsize(const gui_font_t *font, uint32_t ch, gui_dim_t *width, gui_dim_t *height)
Get width and height of specific character for specific font.
Definition: gui_text.c:69
gui_font_charentry_t * gui_text_getcharentry(const gui_font_t *font, const gui_font_char_t *c)
Get character entry generated in memory for fast drawing.
Definition: gui_text.c:89
gui_font_charentry_t * gui_text_createcharentry(const gui_font_t *font, const gui_font_char_t *c)
Create new entry for character map and put it to linked list of known entries.
Definition: gui_text.c:109
FONT structure for writing usage.
Definition: gui_defs.h:473
Char temporary entry stored in RAM for faster copy with blending operations.
Definition: gui_defs.h:491
const gui_font_char_t * gui_text_getchardesc(const gui_font_t *font, uint32_t ch)
Get character descriptor from specific character and font.
Definition: gui_text.c:48
int16_t gui_dim_t
Definition: gui_defs.h:211