diff options
Diffstat (limited to 'src/ui/text.h')
-rw-r--r-- | src/ui/text.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/ui/text.h b/src/ui/text.h index 044ddd32..1bb60e8b 100644 --- a/src/ui/text.h +++ b/src/ui/text.h | |||
@@ -68,11 +68,14 @@ enum iFontId { | |||
68 | monospace_FontId, | 68 | monospace_FontId, |
69 | /* extra content fonts */ | 69 | /* extra content fonts */ |
70 | defaultContentSized_FontId, /* UI font but sized to regular_FontId */ | 70 | defaultContentSized_FontId, /* UI font but sized to regular_FontId */ |
71 | regularMonospace_FontId, | ||
72 | /* symbols and scripts */ | 71 | /* symbols and scripts */ |
73 | symbols_FontId, | 72 | userSymbols_FontId, |
74 | emoji_FontId = symbols_FontId + max_FontSize, | 73 | iosevka_FontId = userSymbols_FontId + max_FontSize, |
75 | japanese_FontId = emoji_FontId + max_FontSize, | 74 | symbols_FontId = iosevka_FontId + max_FontSize, |
75 | symbols2_FontId = symbols_FontId + max_FontSize, | ||
76 | smolEmoji_FontId = symbols2_FontId + max_FontSize, | ||
77 | notoEmoji_FontId = smolEmoji_FontId + max_FontSize, | ||
78 | japanese_FontId = notoEmoji_FontId + max_FontSize, | ||
76 | chineseSimplified_FontId = japanese_FontId + max_FontSize, | 79 | chineseSimplified_FontId = japanese_FontId + max_FontSize, |
77 | korean_FontId = chineseSimplified_FontId + max_FontSize, | 80 | korean_FontId = chineseSimplified_FontId + max_FontSize, |
78 | arabic_FontId = korean_FontId + max_FontSize, | 81 | arabic_FontId = korean_FontId + max_FontSize, |
@@ -91,7 +94,7 @@ enum iFontId { | |||
91 | uiInput_FontId = defaultMedium_FontId, | 94 | uiInput_FontId = defaultMedium_FontId, |
92 | uiContent_FontId = defaultMedium_FontId, | 95 | uiContent_FontId = defaultMedium_FontId, |
93 | uiContentBold_FontId = defaultMediumBold_FontId, | 96 | uiContentBold_FontId = defaultMediumBold_FontId, |
94 | uiContentSymbols_FontId = symbols_FontId + uiMedium_FontSize, | 97 | uiContentSymbols_FontId = symbols_FontId + uiMedium_FontSize, |
95 | /* Document fonts: */ | 98 | /* Document fonts: */ |
96 | paragraph_FontId = regular_FontId, | 99 | paragraph_FontId = regular_FontId, |
97 | firstParagraph_FontId = medium_FontId, | 100 | firstParagraph_FontId = medium_FontId, |
@@ -102,6 +105,7 @@ enum iFontId { | |||
102 | heading2_FontId = largeBold_FontId, | 105 | heading2_FontId = largeBold_FontId, |
103 | heading3_FontId = big_FontId, | 106 | heading3_FontId = big_FontId, |
104 | banner_FontId = largeLight_FontId, | 107 | banner_FontId = largeLight_FontId, |
108 | regularMonospace_FontId = iosevka_FontId + contentRegular_FontSize | ||
105 | }; | 109 | }; |
106 | 110 | ||
107 | iLocalDef iBool isJapanese_FontId(enum iFontId id) { | 111 | iLocalDef iBool isJapanese_FontId(enum iFontId id) { |
@@ -124,6 +128,8 @@ extern int gap_Text; /* affected by content font size */ | |||
124 | void init_Text (SDL_Renderer *); | 128 | void init_Text (SDL_Renderer *); |
125 | void deinit_Text (void); | 129 | void deinit_Text (void); |
126 | 130 | ||
131 | void loadUserFonts_Text (void); /* based on Prefs */ | ||
132 | |||
127 | void setContentFont_Text (enum iTextFont font); | 133 | void setContentFont_Text (enum iTextFont font); |
128 | void setHeadingFont_Text (enum iTextFont font); | 134 | void setHeadingFont_Text (enum iTextFont font); |
129 | void setContentFontSize_Text (float fontSizeFactor); /* affects all except `default*` fonts */ | 135 | void setContentFontSize_Text (float fontSizeFactor); /* affects all except `default*` fonts */ |