summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ui/text.c19
-rw-r--r--src/ui/text.h13
2 files changed, 24 insertions, 8 deletions
diff --git a/src/ui/text.c b/src/ui/text.c
index a48d0e0e..1e714320 100644
--- a/src/ui/text.c
+++ b/src/ui/text.c
@@ -167,33 +167,41 @@ static void initFonts_Text_(iText *d) {
167 { &fontSourceSansProRegular_Embedded, fontSize_UI, defaultSymbols_FontId }, 167 { &fontSourceSansProRegular_Embedded, fontSize_UI, defaultSymbols_FontId },
168 { &fontSourceSansProRegular_Embedded, fontSize_UI * 1.125f, defaultMediumSymbols_FontId }, 168 { &fontSourceSansProRegular_Embedded, fontSize_UI * 1.125f, defaultMediumSymbols_FontId },
169 { &fontFiraMonoRegular_Embedded, fontSize_UI * 0.866f, defaultSymbols_FontId }, 169 { &fontFiraMonoRegular_Embedded, fontSize_UI * 0.866f, defaultSymbols_FontId },
170 /* content fonts */
170 { &fontNunitoRegular_Embedded, textSize, symbols_FontId }, 171 { &fontNunitoRegular_Embedded, textSize, symbols_FontId },
171 { &fontFiraMonoRegular_Embedded, monoSize, smallSymbols_FontId }, 172 { &fontFiraMonoRegular_Embedded, monoSize, smallSymbols_FontId },
172 { &fontFiraMonoRegular_Embedded, monoSize * 0.750f, smallSymbols_FontId }, 173 { &fontFiraMonoRegular_Embedded, monoSize * 0.750f, smallSymbols_FontId },
173 { &fontNunitoRegular_Embedded, textSize * 1.333f, mediumSymbols_FontId }, 174 { &fontNunitoRegular_Embedded, textSize * 1.200f, mediumSymbols_FontId },
175 { &fontNunitoRegular_Embedded, textSize * 1.333f, bigSymbols_FontId },
174 { &fontNunitoLightItalic_Embedded, textSize, symbols_FontId }, 176 { &fontNunitoLightItalic_Embedded, textSize, symbols_FontId },
175 { &fontNunitoExtraBold_Embedded, textSize, symbols_FontId }, 177 { &fontNunitoExtraBold_Embedded, textSize, symbols_FontId },
176 { &fontNunitoExtraBold_Embedded, textSize * 1.333f, mediumSymbols_FontId }, 178 { &fontNunitoExtraBold_Embedded, textSize * 1.333f, mediumSymbols_FontId },
177 { &fontNunitoExtraBold_Embedded, textSize * 1.666f, largeSymbols_FontId }, 179 { &fontNunitoExtraBold_Embedded, textSize * 1.666f, largeSymbols_FontId },
178 { &fontNunitoExtraBold_Embedded, textSize * 2.000f, hugeSymbols_FontId }, 180 { &fontNunitoExtraBold_Embedded, textSize * 2.000f, hugeSymbols_FontId },
179 { &fontNunitoExtraLight_Embedded, textSize * 1.666f, largeSymbols_FontId }, 181 { &fontNunitoExtraLight_Embedded, textSize * 1.666f, largeSymbols_FontId },
182 /* symbol fonts */
180 { &fontSymbola_Embedded, fontSize_UI, defaultSymbols_FontId }, 183 { &fontSymbola_Embedded, fontSize_UI, defaultSymbols_FontId },
181 { &fontSymbola_Embedded, fontSize_UI * 1.125f, defaultMediumSymbols_FontId }, 184 { &fontSymbola_Embedded, fontSize_UI * 1.125f, defaultMediumSymbols_FontId },
182 { &fontSymbola_Embedded, textSize, symbols_FontId }, 185 { &fontSymbola_Embedded, textSize, symbols_FontId },
183 { &fontSymbola_Embedded, textSize * 1.333f, mediumSymbols_FontId }, 186 { &fontSymbola_Embedded, textSize * 1.200f, mediumSymbols_FontId },
187 { &fontSymbola_Embedded, textSize * 1.333f, bigSymbols_FontId },
184 { &fontSymbola_Embedded, textSize * 1.666f, largeSymbols_FontId }, 188 { &fontSymbola_Embedded, textSize * 1.666f, largeSymbols_FontId },
185 { &fontSymbola_Embedded, textSize * 2.000f, hugeSymbols_FontId }, 189 { &fontSymbola_Embedded, textSize * 2.000f, hugeSymbols_FontId },
186 { &fontSymbola_Embedded, textSize * 0.866f, smallSymbols_FontId }, 190 { &fontSymbola_Embedded, textSize * 0.866f, smallSymbols_FontId },
191 /* emoji fonts */
187 { &fontNotoEmojiRegular_Embedded, fontSize_UI, defaultSymbols_FontId }, 192 { &fontNotoEmojiRegular_Embedded, fontSize_UI, defaultSymbols_FontId },
188 { &fontNotoEmojiRegular_Embedded, fontSize_UI * 1.125f, defaultMediumSymbols_FontId }, 193 { &fontNotoEmojiRegular_Embedded, fontSize_UI * 1.125f, defaultMediumSymbols_FontId },
189 { &fontNotoEmojiRegular_Embedded, textSize, symbols_FontId }, 194 { &fontNotoEmojiRegular_Embedded, textSize, symbols_FontId },
190 { &fontNotoEmojiRegular_Embedded, textSize * 1.333f, mediumSymbols_FontId }, 195 { &fontNotoEmojiRegular_Embedded, textSize * 1.200f, mediumSymbols_FontId },
196 { &fontNotoEmojiRegular_Embedded, textSize * 1.333f, bigSymbols_FontId },
191 { &fontNotoEmojiRegular_Embedded, textSize * 1.666f, largeSymbols_FontId }, 197 { &fontNotoEmojiRegular_Embedded, textSize * 1.666f, largeSymbols_FontId },
192 { &fontNotoEmojiRegular_Embedded, textSize * 2.000f, hugeSymbols_FontId }, 198 { &fontNotoEmojiRegular_Embedded, textSize * 2.000f, hugeSymbols_FontId },
193 { &fontNotoEmojiRegular_Embedded, textSize * 0.866f, smallSymbols_FontId }, 199 { &fontNotoEmojiRegular_Embedded, textSize * 0.866f, smallSymbols_FontId },
200 /* japanese fonts */
194 { &fontKosugiMaruRegular_Embedded, textSize * 0.666f, smallSymbols_FontId }, 201 { &fontKosugiMaruRegular_Embedded, textSize * 0.666f, smallSymbols_FontId },
195 { &fontKosugiMaruRegular_Embedded, textSize, symbols_FontId }, 202 { &fontKosugiMaruRegular_Embedded, textSize, symbols_FontId },
196 { &fontKosugiMaruRegular_Embedded, textSize * 1.333f, mediumSymbols_FontId }, 203 { &fontKosugiMaruRegular_Embedded, textSize * 1.200f, mediumSymbols_FontId },
204 { &fontKosugiMaruRegular_Embedded, textSize * 1.333f, bigSymbols_FontId },
197 { &fontKosugiMaruRegular_Embedded, textSize * 1.666f, largeSymbols_FontId }, 205 { &fontKosugiMaruRegular_Embedded, textSize * 1.666f, largeSymbols_FontId },
198 { &fontKosugiMaruRegular_Embedded, textSize * 2.000f, hugeSymbols_FontId }, 206 { &fontKosugiMaruRegular_Embedded, textSize * 2.000f, hugeSymbols_FontId },
199 }; 207 };
@@ -214,7 +222,8 @@ static void initFonts_Text_(iText *d) {
214 font_Text_(monospace_FontId)->japaneseFont = smallJapanese_FontId; 222 font_Text_(monospace_FontId)->japaneseFont = smallJapanese_FontId;
215 font_Text_(monospaceSmall_FontId)->japaneseFont = smallJapanese_FontId; 223 font_Text_(monospaceSmall_FontId)->japaneseFont = smallJapanese_FontId;
216 font_Text_(medium_FontId)->japaneseFont = mediumJapanese_FontId; 224 font_Text_(medium_FontId)->japaneseFont = mediumJapanese_FontId;
217 font_Text_(mediumBold_FontId)->japaneseFont = mediumJapanese_FontId; 225 font_Text_(big_FontId)->japaneseFont = bigJapanese_FontId;
226 font_Text_(bigBold_FontId)->japaneseFont = bigJapanese_FontId;
218 font_Text_(largeBold_FontId)->japaneseFont = largeJapanese_FontId; 227 font_Text_(largeBold_FontId)->japaneseFont = largeJapanese_FontId;
219 font_Text_(largeLight_FontId)->japaneseFont = largeJapanese_FontId; 228 font_Text_(largeLight_FontId)->japaneseFont = largeJapanese_FontId;
220 font_Text_(hugeBold_FontId)->japaneseFont = hugeJapanese_FontId; 229 font_Text_(hugeBold_FontId)->japaneseFont = hugeJapanese_FontId;
diff --git a/src/ui/text.h b/src/ui/text.h
index 9a22620f..116aab2c 100644
--- a/src/ui/text.h
+++ b/src/ui/text.h
@@ -27,17 +27,21 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
27 27
28#include <SDL_render.h> 28#include <SDL_render.h>
29 29
30/* Size names: regular (1x) -> medium (1.2x) -> big (1.33x) -> large (1.67x) -> huge (2x) */
31
30enum iFontId { 32enum iFontId {
31 default_FontId, 33 default_FontId,
32 defaultMedium_FontId, 34 defaultMedium_FontId,
33 defaultMonospace_FontId, 35 defaultMonospace_FontId,
36 /* content fonts */
34 regular_FontId, 37 regular_FontId,
35 monospace_FontId, 38 monospace_FontId,
36 monospaceSmall_FontId, 39 monospaceSmall_FontId,
37 medium_FontId, 40 medium_FontId,
41 big_FontId,
38 italic_FontId, 42 italic_FontId,
39 bold_FontId, 43 bold_FontId,
40 mediumBold_FontId, 44 bigBold_FontId,
41 largeBold_FontId, 45 largeBold_FontId,
42 hugeBold_FontId, 46 hugeBold_FontId,
43 largeLight_FontId, 47 largeLight_FontId,
@@ -46,6 +50,7 @@ enum iFontId {
46 defaultMediumSymbols_FontId, 50 defaultMediumSymbols_FontId,
47 symbols_FontId, 51 symbols_FontId,
48 mediumSymbols_FontId, 52 mediumSymbols_FontId,
53 bigSymbols_FontId,
49 largeSymbols_FontId, 54 largeSymbols_FontId,
50 hugeSymbols_FontId, 55 hugeSymbols_FontId,
51 smallSymbols_FontId, 56 smallSymbols_FontId,
@@ -54,6 +59,7 @@ enum iFontId {
54 defaultMediumEmoji_FontId, 59 defaultMediumEmoji_FontId,
55 emoji_FontId, 60 emoji_FontId,
56 mediumEmoji_FontId, 61 mediumEmoji_FontId,
62 bigEmoji_FontId,
57 largeEmoji_FontId, 63 largeEmoji_FontId,
58 hugeEmoji_FontId, 64 hugeEmoji_FontId,
59 smallEmoji_FontId, 65 smallEmoji_FontId,
@@ -61,12 +67,13 @@ enum iFontId {
61 smallJapanese_FontId, 67 smallJapanese_FontId,
62 regularJapanese_FontId, 68 regularJapanese_FontId,
63 mediumJapanese_FontId, 69 mediumJapanese_FontId,
70 bigJapanese_FontId,
64 largeJapanese_FontId, 71 largeJapanese_FontId,
65 hugeJapanese_FontId, 72 hugeJapanese_FontId,
66 max_FontId, 73 max_FontId,
67 74
68 /* Meta: */ 75 /* Meta: */
69 fromSymbolsToEmojiOffset_FontId = 7, 76 fromSymbolsToEmojiOffset_FontId = 8,
70 77
71 /* UI fonts: */ 78 /* UI fonts: */
72 uiLabel_FontId = default_FontId, 79 uiLabel_FontId = default_FontId,
@@ -81,7 +88,7 @@ enum iFontId {
81 quote_FontId = italic_FontId, 88 quote_FontId = italic_FontId,
82 heading1_FontId = hugeBold_FontId, 89 heading1_FontId = hugeBold_FontId,
83 heading2_FontId = largeBold_FontId, 90 heading2_FontId = largeBold_FontId,
84 heading3_FontId = medium_FontId, 91 heading3_FontId = big_FontId,
85 banner_FontId = largeLight_FontId, 92 banner_FontId = largeLight_FontId,
86}; 93};
87 94