diff options
Diffstat (limited to 'src/ui/text.h')
-rw-r--r-- | src/ui/text.h | 14 |
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 | ||
8 | enum iFontId { | 8 | enum 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 | ||
50 | extern int gap_Text; /* affected by content font size */ | ||
51 | |||
47 | void init_Text (SDL_Renderer *); | 52 | void init_Text (SDL_Renderer *); |
48 | void deinit_Text (void); | 53 | void deinit_Text (void); |
49 | 54 | ||
55 | void setContentFontSize_Text (float fontSizeFactor); /* affects all except `default*` fonts */ | ||
56 | void resetFonts_Text (void); | ||
57 | |||
50 | int lineHeight_Text (int fontId); | 58 | int lineHeight_Text (int fontId); |
51 | iInt2 measure_Text (int fontId, const char *text); | 59 | iInt2 measure_Text (int fontId, const char *text); |
52 | iInt2 measureRange_Text (int fontId, iRangecc text); | 60 | iInt2 measureRange_Text (int fontId, iRangecc text); |