summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-21 21:04:54 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-21 21:04:54 +0200
commitd7a4a193e219032e16bd8480de833dc064b35277 (patch)
treee800cea29ac4f7f8fe0f4d8111f21d30e330106c /src/ui
parentbe1140f2d3649663dc2ac5eb3a41612cd0470fa5 (diff)
Text: Added a 1.33x sized UI font
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/text.c33
-rw-r--r--src/ui/text.h5
2 files changed, 23 insertions, 15 deletions
diff --git a/src/ui/text.c b/src/ui/text.c
index e300e7c4..9f9d4396 100644
--- a/src/ui/text.c
+++ b/src/ui/text.c
@@ -257,12 +257,13 @@ static void initFonts_Text_(iText *d) {
257 float scaling; 257 float scaling;
258 int symbolsFont; 258 int symbolsFont;
259 } fontData[max_FontId] = { 259 } fontData[max_FontId] = {
260 { &fontSourceSansProRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, 260 { &fontSourceSansProRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId },
261 { &fontSourceSansProBold_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, 261 { &fontSourceSansProBold_Embedded, uiSize, 1.0f, defaultSymbols_FontId },
262 { &fontSourceSansProRegular_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId }, 262 { &fontSourceSansProRegular_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId },
263 { &fontSourceSansProBold_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId }, 263 { &fontSourceSansProBold_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId },
264 { &fontSourceSansProRegular_Embedded, uiSize * 1.666f, 1.0f, defaultLargeSymbols_FontId }, 264 { &fontSourceSansProRegular_Embedded, uiSize * 1.333f, 1.0f, defaultBigSymbols_FontId },
265 { &fontIosevkaTermExtended_Embedded, uiSize * 0.866f, 1.0f, defaultSymbols_FontId }, 265 { &fontSourceSansProRegular_Embedded, uiSize * 1.666f, 1.0f, defaultLargeSymbols_FontId },
266 { &fontIosevkaTermExtended_Embedded, uiSize * 0.866f, 1.0f, defaultSymbols_FontId },
266 { &fontSourceSansProRegular_Embedded, textSize, scaling, symbols_FontId }, 267 { &fontSourceSansProRegular_Embedded, textSize, scaling, symbols_FontId },
267 /* content fonts */ 268 /* content fonts */
268 { regularFont, textSize, scaling, symbols_FontId }, 269 { regularFont, textSize, scaling, symbols_FontId },
@@ -277,9 +278,10 @@ static void initFonts_Text_(iText *d) {
277 /* monospace content fonts */ 278 /* monospace content fonts */
278 { &fontIosevkaTermExtended_Embedded, textSize, 0.866f, symbols_FontId }, 279 { &fontIosevkaTermExtended_Embedded, textSize, 0.866f, symbols_FontId },
279 /* symbol fonts */ 280 /* symbol fonts */
280 { &fontSymbola_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, 281 { &fontSymbola_Embedded, uiSize, 1.0f, defaultSymbols_FontId },
281 { &fontSymbola_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId }, 282 { &fontSymbola_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId },
282 { &fontSymbola_Embedded, uiSize * 1.666f, 1.0f, defaultLargeSymbols_FontId }, 283 { &fontSymbola_Embedded, uiSize * 1.333f, 1.0f, defaultBigSymbols_FontId },
284 { &fontSymbola_Embedded, uiSize * 1.666f, 1.0f, defaultLargeSymbols_FontId },
283 { &fontSymbola_Embedded, textSize, 1.0f, symbols_FontId }, 285 { &fontSymbola_Embedded, textSize, 1.0f, symbols_FontId },
284 { &fontSymbola_Embedded, textSize * 1.200f, 1.0f, mediumSymbols_FontId }, 286 { &fontSymbola_Embedded, textSize * 1.200f, 1.0f, mediumSymbols_FontId },
285 { &fontSymbola_Embedded, textSize * 1.333f, 1.0f, bigSymbols_FontId }, 287 { &fontSymbola_Embedded, textSize * 1.333f, 1.0f, bigSymbols_FontId },
@@ -288,9 +290,10 @@ static void initFonts_Text_(iText *d) {
288 { &fontSymbola_Embedded, monoSize, 1.0f, monospaceSymbols_FontId }, 290 { &fontSymbola_Embedded, monoSize, 1.0f, monospaceSymbols_FontId },
289 { &fontSymbola_Embedded, smallMonoSize, 1.0f, monospaceSmallSymbols_FontId }, 291 { &fontSymbola_Embedded, smallMonoSize, 1.0f, monospaceSmallSymbols_FontId },
290 /* emoji fonts */ 292 /* emoji fonts */
291 { &fontNotoEmojiRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, 293 { &fontNotoEmojiRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId },
292 { &fontNotoEmojiRegular_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId }, 294 { &fontNotoEmojiRegular_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId },
293 { &fontNotoEmojiRegular_Embedded, uiSize * 1.666f, 1.0f, defaultLargeSymbols_FontId }, 295 { &fontNotoEmojiRegular_Embedded, uiSize * 1.333f, 1.0f, defaultBigSymbols_FontId },
296 { &fontNotoEmojiRegular_Embedded, uiSize * 1.666f, 1.0f, defaultLargeSymbols_FontId },
294 { &fontNotoEmojiRegular_Embedded, textSize, 1.0f, symbols_FontId }, 297 { &fontNotoEmojiRegular_Embedded, textSize, 1.0f, symbols_FontId },
295 { &fontNotoEmojiRegular_Embedded, textSize * 1.200f, 1.0f, mediumSymbols_FontId }, 298 { &fontNotoEmojiRegular_Embedded, textSize * 1.200f, 1.0f, mediumSymbols_FontId },
296 { &fontNotoEmojiRegular_Embedded, textSize * 1.333f, 1.0f, bigSymbols_FontId }, 299 { &fontNotoEmojiRegular_Embedded, textSize * 1.333f, 1.0f, bigSymbols_FontId },
@@ -299,7 +302,7 @@ static void initFonts_Text_(iText *d) {
299 { &fontNotoEmojiRegular_Embedded, monoSize, 1.0f, monospaceSymbols_FontId }, 302 { &fontNotoEmojiRegular_Embedded, monoSize, 1.0f, monospaceSymbols_FontId },
300 { &fontNotoEmojiRegular_Embedded, smallMonoSize, 1.0f, monospaceSmallSymbols_FontId }, 303 { &fontNotoEmojiRegular_Embedded, smallMonoSize, 1.0f, monospaceSmallSymbols_FontId },
301 /* japanese fonts */ 304 /* japanese fonts */
302 { &fontNotoSansJPRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, 305 { &fontNotoSansJPRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId },
303 { &fontNotoSansJPRegular_Embedded, smallMonoSize, 1.0f, monospaceSmallSymbols_FontId }, 306 { &fontNotoSansJPRegular_Embedded, smallMonoSize, 1.0f, monospaceSmallSymbols_FontId },
304 { &fontNotoSansJPRegular_Embedded, monoSize, 1.0f, monospaceSymbols_FontId }, 307 { &fontNotoSansJPRegular_Embedded, monoSize, 1.0f, monospaceSymbols_FontId },
305 { &fontNotoSansJPRegular_Embedded, textSize, 1.0f, symbols_FontId }, 308 { &fontNotoSansJPRegular_Embedded, textSize, 1.0f, symbols_FontId },
@@ -308,7 +311,7 @@ static void initFonts_Text_(iText *d) {
308 { &fontNotoSansJPRegular_Embedded, textSize * 1.666f, 1.0f, largeSymbols_FontId }, 311 { &fontNotoSansJPRegular_Embedded, textSize * 1.666f, 1.0f, largeSymbols_FontId },
309 { &fontNotoSansJPRegular_Embedded, textSize * 2.000f, 1.0f, hugeSymbols_FontId }, 312 { &fontNotoSansJPRegular_Embedded, textSize * 2.000f, 1.0f, hugeSymbols_FontId },
310 /* korean fonts */ 313 /* korean fonts */
311 { &fontNanumGothicRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, 314 { &fontNanumGothicRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId },
312 { &fontNanumGothicRegular_Embedded, smallMonoSize, 1.0f, monospaceSmallSymbols_FontId }, 315 { &fontNanumGothicRegular_Embedded, smallMonoSize, 1.0f, monospaceSmallSymbols_FontId },
313 { &fontNanumGothicRegular_Embedded, monoSize, 1.0f, monospaceSymbols_FontId }, 316 { &fontNanumGothicRegular_Embedded, monoSize, 1.0f, monospaceSymbols_FontId },
314 { &fontNanumGothicRegular_Embedded, textSize, 1.0f, symbols_FontId }, 317 { &fontNanumGothicRegular_Embedded, textSize, 1.0f, symbols_FontId },
@@ -334,6 +337,7 @@ static void initFonts_Text_(iText *d) {
334 the other sizes. */ 337 the other sizes. */
335 font_Text_(default_FontId)->japaneseFont = defaultJapanese_FontId; 338 font_Text_(default_FontId)->japaneseFont = defaultJapanese_FontId;
336 font_Text_(defaultMedium_FontId)->japaneseFont = defaultJapanese_FontId; 339 font_Text_(defaultMedium_FontId)->japaneseFont = defaultJapanese_FontId;
340 font_Text_(defaultBig_FontId)->japaneseFont = defaultJapanese_FontId;
337 font_Text_(defaultLarge_FontId)->japaneseFont = defaultJapanese_FontId; 341 font_Text_(defaultLarge_FontId)->japaneseFont = defaultJapanese_FontId;
338 font_Text_(defaultMonospace_FontId)->japaneseFont = defaultJapanese_FontId; 342 font_Text_(defaultMonospace_FontId)->japaneseFont = defaultJapanese_FontId;
339 font_Text_(monospaceSmall_FontId)->japaneseFont = monospaceSmallJapanese_FontId; 343 font_Text_(monospaceSmall_FontId)->japaneseFont = monospaceSmallJapanese_FontId;
@@ -347,6 +351,7 @@ static void initFonts_Text_(iText *d) {
347 /* Korean script. */ { 351 /* Korean script. */ {
348 font_Text_(default_FontId)->koreanFont = defaultKorean_FontId; 352 font_Text_(default_FontId)->koreanFont = defaultKorean_FontId;
349 font_Text_(defaultMedium_FontId)->koreanFont = defaultKorean_FontId; 353 font_Text_(defaultMedium_FontId)->koreanFont = defaultKorean_FontId;
354 font_Text_(defaultBig_FontId)->koreanFont = defaultKorean_FontId;
350 font_Text_(defaultLarge_FontId)->koreanFont = defaultKorean_FontId; 355 font_Text_(defaultLarge_FontId)->koreanFont = defaultKorean_FontId;
351 font_Text_(defaultMonospace_FontId)->koreanFont = defaultKorean_FontId; 356 font_Text_(defaultMonospace_FontId)->koreanFont = defaultKorean_FontId;
352 font_Text_(monospaceSmall_FontId)->koreanFont = monospaceSmallKorean_FontId; 357 font_Text_(monospaceSmall_FontId)->koreanFont = monospaceSmallKorean_FontId;
diff --git a/src/ui/text.h b/src/ui/text.h
index 217bdd13..fd8f8da2 100644
--- a/src/ui/text.h
+++ b/src/ui/text.h
@@ -34,6 +34,7 @@ enum iFontId {
34 defaultBold_FontId, 34 defaultBold_FontId,
35 defaultMedium_FontId, 35 defaultMedium_FontId,
36 defaultMediumBold_FontId, 36 defaultMediumBold_FontId,
37 defaultBig_FontId,
37 defaultLarge_FontId, 38 defaultLarge_FontId,
38 defaultMonospace_FontId, 39 defaultMonospace_FontId,
39 defaultContentSized_FontId, 40 defaultContentSized_FontId,
@@ -52,6 +53,7 @@ enum iFontId {
52 /* symbol fonts */ 53 /* symbol fonts */
53 defaultSymbols_FontId, 54 defaultSymbols_FontId,
54 defaultMediumSymbols_FontId, 55 defaultMediumSymbols_FontId,
56 defaultBigSymbols_FontId,
55 defaultLargeSymbols_FontId, 57 defaultLargeSymbols_FontId,
56 symbols_FontId, 58 symbols_FontId,
57 mediumSymbols_FontId, 59 mediumSymbols_FontId,
@@ -63,6 +65,7 @@ enum iFontId {
63 /* emoji fonts */ 65 /* emoji fonts */
64 defaultEmoji_FontId, 66 defaultEmoji_FontId,
65 defaultMediumEmoji_FontId, 67 defaultMediumEmoji_FontId,
68 defaultBigEmoji_FontId,
66 defaultLargeEmoji_FontId, 69 defaultLargeEmoji_FontId,
67 emoji_FontId, 70 emoji_FontId,
68 mediumEmoji_FontId, 71 mediumEmoji_FontId,
@@ -92,7 +95,7 @@ enum iFontId {
92 max_FontId, 95 max_FontId,
93 96
94 /* Meta: */ 97 /* Meta: */
95 fromSymbolsToEmojiOffset_FontId = 10, 98 fromSymbolsToEmojiOffset_FontId = 11,
96 mask_FontId = 0xffff, 99 mask_FontId = 0xffff,
97 alwaysVariableFlag_FontId = 0x10000, 100 alwaysVariableFlag_FontId = 0x10000,
98 101