From d7a4a193e219032e16bd8480de833dc064b35277 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 21 Feb 2021 21:04:54 +0200 Subject: Text: Added a 1.33x sized UI font --- src/ui/text.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'src/ui/text.c') 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) { float scaling; int symbolsFont; } fontData[max_FontId] = { - { &fontSourceSansProRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, - { &fontSourceSansProBold_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, - { &fontSourceSansProRegular_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId }, - { &fontSourceSansProBold_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId }, - { &fontSourceSansProRegular_Embedded, uiSize * 1.666f, 1.0f, defaultLargeSymbols_FontId }, - { &fontIosevkaTermExtended_Embedded, uiSize * 0.866f, 1.0f, defaultSymbols_FontId }, + { &fontSourceSansProRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, + { &fontSourceSansProBold_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, + { &fontSourceSansProRegular_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId }, + { &fontSourceSansProBold_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId }, + { &fontSourceSansProRegular_Embedded, uiSize * 1.333f, 1.0f, defaultBigSymbols_FontId }, + { &fontSourceSansProRegular_Embedded, uiSize * 1.666f, 1.0f, defaultLargeSymbols_FontId }, + { &fontIosevkaTermExtended_Embedded, uiSize * 0.866f, 1.0f, defaultSymbols_FontId }, { &fontSourceSansProRegular_Embedded, textSize, scaling, symbols_FontId }, /* content fonts */ { regularFont, textSize, scaling, symbols_FontId }, @@ -277,9 +278,10 @@ static void initFonts_Text_(iText *d) { /* monospace content fonts */ { &fontIosevkaTermExtended_Embedded, textSize, 0.866f, symbols_FontId }, /* symbol fonts */ - { &fontSymbola_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, - { &fontSymbola_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId }, - { &fontSymbola_Embedded, uiSize * 1.666f, 1.0f, defaultLargeSymbols_FontId }, + { &fontSymbola_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, + { &fontSymbola_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId }, + { &fontSymbola_Embedded, uiSize * 1.333f, 1.0f, defaultBigSymbols_FontId }, + { &fontSymbola_Embedded, uiSize * 1.666f, 1.0f, defaultLargeSymbols_FontId }, { &fontSymbola_Embedded, textSize, 1.0f, symbols_FontId }, { &fontSymbola_Embedded, textSize * 1.200f, 1.0f, mediumSymbols_FontId }, { &fontSymbola_Embedded, textSize * 1.333f, 1.0f, bigSymbols_FontId }, @@ -288,9 +290,10 @@ static void initFonts_Text_(iText *d) { { &fontSymbola_Embedded, monoSize, 1.0f, monospaceSymbols_FontId }, { &fontSymbola_Embedded, smallMonoSize, 1.0f, monospaceSmallSymbols_FontId }, /* emoji fonts */ - { &fontNotoEmojiRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, - { &fontNotoEmojiRegular_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId }, - { &fontNotoEmojiRegular_Embedded, uiSize * 1.666f, 1.0f, defaultLargeSymbols_FontId }, + { &fontNotoEmojiRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, + { &fontNotoEmojiRegular_Embedded, uiSize * 1.125f, 1.0f, defaultMediumSymbols_FontId }, + { &fontNotoEmojiRegular_Embedded, uiSize * 1.333f, 1.0f, defaultBigSymbols_FontId }, + { &fontNotoEmojiRegular_Embedded, uiSize * 1.666f, 1.0f, defaultLargeSymbols_FontId }, { &fontNotoEmojiRegular_Embedded, textSize, 1.0f, symbols_FontId }, { &fontNotoEmojiRegular_Embedded, textSize * 1.200f, 1.0f, mediumSymbols_FontId }, { &fontNotoEmojiRegular_Embedded, textSize * 1.333f, 1.0f, bigSymbols_FontId }, @@ -299,7 +302,7 @@ static void initFonts_Text_(iText *d) { { &fontNotoEmojiRegular_Embedded, monoSize, 1.0f, monospaceSymbols_FontId }, { &fontNotoEmojiRegular_Embedded, smallMonoSize, 1.0f, monospaceSmallSymbols_FontId }, /* japanese fonts */ - { &fontNotoSansJPRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, + { &fontNotoSansJPRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, { &fontNotoSansJPRegular_Embedded, smallMonoSize, 1.0f, monospaceSmallSymbols_FontId }, { &fontNotoSansJPRegular_Embedded, monoSize, 1.0f, monospaceSymbols_FontId }, { &fontNotoSansJPRegular_Embedded, textSize, 1.0f, symbols_FontId }, @@ -308,7 +311,7 @@ static void initFonts_Text_(iText *d) { { &fontNotoSansJPRegular_Embedded, textSize * 1.666f, 1.0f, largeSymbols_FontId }, { &fontNotoSansJPRegular_Embedded, textSize * 2.000f, 1.0f, hugeSymbols_FontId }, /* korean fonts */ - { &fontNanumGothicRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, + { &fontNanumGothicRegular_Embedded, uiSize, 1.0f, defaultSymbols_FontId }, { &fontNanumGothicRegular_Embedded, smallMonoSize, 1.0f, monospaceSmallSymbols_FontId }, { &fontNanumGothicRegular_Embedded, monoSize, 1.0f, monospaceSymbols_FontId }, { &fontNanumGothicRegular_Embedded, textSize, 1.0f, symbols_FontId }, @@ -334,6 +337,7 @@ static void initFonts_Text_(iText *d) { the other sizes. */ font_Text_(default_FontId)->japaneseFont = defaultJapanese_FontId; font_Text_(defaultMedium_FontId)->japaneseFont = defaultJapanese_FontId; + font_Text_(defaultBig_FontId)->japaneseFont = defaultJapanese_FontId; font_Text_(defaultLarge_FontId)->japaneseFont = defaultJapanese_FontId; font_Text_(defaultMonospace_FontId)->japaneseFont = defaultJapanese_FontId; font_Text_(monospaceSmall_FontId)->japaneseFont = monospaceSmallJapanese_FontId; @@ -347,6 +351,7 @@ static void initFonts_Text_(iText *d) { /* Korean script. */ { font_Text_(default_FontId)->koreanFont = defaultKorean_FontId; font_Text_(defaultMedium_FontId)->koreanFont = defaultKorean_FontId; + font_Text_(defaultBig_FontId)->koreanFont = defaultKorean_FontId; font_Text_(defaultLarge_FontId)->koreanFont = defaultKorean_FontId; font_Text_(defaultMonospace_FontId)->koreanFont = defaultKorean_FontId; font_Text_(monospaceSmall_FontId)->koreanFont = monospaceSmallKorean_FontId; -- cgit v1.2.3