summaryrefslogtreecommitdiff
path: root/src/ui/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/text.h')
-rw-r--r--src/ui/text.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ui/text.h b/src/ui/text.h
index f165c5b4..ea58abb6 100644
--- a/src/ui/text.h
+++ b/src/ui/text.h
@@ -7,8 +7,9 @@
7 7
8enum iFontId { 8enum iFontId {
9 default_FontId, 9 default_FontId,
10 defaultMonospace_FontId,
10 regular_FontId, 11 regular_FontId,
11 monospace_FontId, 12 monospace_FontId,
12 monospaceSmall_FontId, 13 monospaceSmall_FontId,
13 medium_FontId, 14 medium_FontId,
14 italic_FontId, 15 italic_FontId,
@@ -16,11 +17,13 @@ enum iFontId {
16 mediumBold_FontId, 17 mediumBold_FontId,
17 largeBold_FontId, 18 largeBold_FontId,
18 hugeBold_FontId, 19 hugeBold_FontId,
20 defaultSymbols_FontId,
19 symbols_FontId, 21 symbols_FontId,
20 mediumSymbols_FontId, 22 mediumSymbols_FontId,
21 largeSymbols_FontId, 23 largeSymbols_FontId,
22 hugeSymbols_FontId, 24 hugeSymbols_FontId,
23 smallSymbols_FontId, 25 smallSymbols_FontId,
26 defaultEmoji_FontId,
24 emoji_FontId, 27 emoji_FontId,
25 mediumEmoji_FontId, 28 mediumEmoji_FontId,
26 largeEmoji_FontId, 29 largeEmoji_FontId,
@@ -28,11 +31,11 @@ enum iFontId {
28 smallEmoji_FontId, 31 smallEmoji_FontId,
29 max_FontId, 32 max_FontId,
30 /* Meta: */ 33 /* Meta: */
31 fromSymbolsToEmojiOffset_FontId = 5, 34 fromSymbolsToEmojiOffset_FontId = 6,
32 /* UI fonts: */ 35 /* UI fonts: */
33 uiLabel_FontId = default_FontId, 36 uiLabel_FontId = default_FontId,
34 uiShortcuts_FontId = default_FontId, 37 uiShortcuts_FontId = default_FontId,
35 uiInput_FontId = monospace_FontId, 38 uiInput_FontId = defaultMonospace_FontId,
36 /* Document fonts: */ 39 /* Document fonts: */
37 paragraph_FontId = regular_FontId, 40 paragraph_FontId = regular_FontId,
38 firstParagraph_FontId = medium_FontId, 41 firstParagraph_FontId = medium_FontId,
@@ -44,9 +47,14 @@ enum iFontId {
44 header3_FontId = medium_FontId, 47 header3_FontId = medium_FontId,
45}; 48};
46 49
50extern int gap_Text; /* affected by content font size */
51
47void init_Text (SDL_Renderer *); 52void init_Text (SDL_Renderer *);
48void deinit_Text (void); 53void deinit_Text (void);
49 54
55void setContentFontSize_Text (float fontSizeFactor); /* affects all except `default*` fonts */
56void resetFonts_Text (void);
57
50int lineHeight_Text (int fontId); 58int lineHeight_Text (int fontId);
51iInt2 measure_Text (int fontId, const char *text); 59iInt2 measure_Text (int fontId, const char *text);
52iInt2 measureRange_Text (int fontId, iRangecc text); 60iInt2 measureRange_Text (int fontId, iRangecc text);