From a3d56f967643ac77847dcc1669eca5144d736056 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 29 Oct 2020 14:10:31 +0200 Subject: Added a large UI font --- src/ui/text.c | 5 +++++ src/ui/text.h | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ui/text.c b/src/ui/text.c index 4b3a5a10..2ceadb75 100644 --- a/src/ui/text.c +++ b/src/ui/text.c @@ -209,6 +209,7 @@ static void initFonts_Text_(iText *d) { } fontData[max_FontId] = { { &fontSourceSansProRegular_Embedded, fontSize_UI, 1.0f, defaultSymbols_FontId }, { &fontSourceSansProRegular_Embedded, fontSize_UI * 1.125f, 1.0f, defaultMediumSymbols_FontId }, + { &fontSourceSansProRegular_Embedded, fontSize_UI * 1.666f, 1.0f, defaultLargeSymbols_FontId }, { &fontFiraMonoRegular_Embedded, fontSize_UI * 0.866f, 1.0f, defaultSymbols_FontId }, /* content fonts */ { regularFont, textSize, scaling, symbols_FontId }, @@ -223,6 +224,7 @@ static void initFonts_Text_(iText *d) { /* symbol fonts */ { &fontSymbola_Embedded, fontSize_UI, 1.0f, defaultSymbols_FontId }, { &fontSymbola_Embedded, fontSize_UI * 1.125f, 1.0f, defaultMediumSymbols_FontId }, + { &fontSymbola_Embedded, fontSize_UI * 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 }, @@ -233,6 +235,7 @@ static void initFonts_Text_(iText *d) { /* emoji fonts */ { &fontNotoEmojiRegular_Embedded, fontSize_UI, 1.0f, defaultSymbols_FontId }, { &fontNotoEmojiRegular_Embedded, fontSize_UI * 1.125f, 1.0f, defaultMediumSymbols_FontId }, + { &fontNotoEmojiRegular_Embedded, fontSize_UI * 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 }, @@ -275,6 +278,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_(defaultLarge_FontId)->japaneseFont = defaultJapanese_FontId; font_Text_(defaultMonospace_FontId)->japaneseFont = defaultJapanese_FontId; font_Text_(monospaceSmall_FontId)->japaneseFont = monospaceSmallJapanese_FontId; font_Text_(monospace_FontId)->japaneseFont = monospaceJapanese_FontId; @@ -287,6 +291,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_(defaultLarge_FontId)->koreanFont = defaultKorean_FontId; font_Text_(defaultMonospace_FontId)->koreanFont = defaultKorean_FontId; font_Text_(monospaceSmall_FontId)->koreanFont = monospaceSmallKorean_FontId; font_Text_(monospace_FontId)->koreanFont = monospaceKorean_FontId; diff --git a/src/ui/text.h b/src/ui/text.h index 35f48528..3dd949d9 100644 --- a/src/ui/text.h +++ b/src/ui/text.h @@ -32,6 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ enum iFontId { default_FontId, defaultMedium_FontId, + defaultLarge_FontId, defaultMonospace_FontId, /* content fonts */ regular_FontId, @@ -46,6 +47,7 @@ enum iFontId { /* symbol fonts */ defaultSymbols_FontId, defaultMediumSymbols_FontId, + defaultLargeSymbols_FontId, symbols_FontId, mediumSymbols_FontId, bigSymbols_FontId, @@ -56,6 +58,7 @@ enum iFontId { /* emoji fonts */ defaultEmoji_FontId, defaultMediumEmoji_FontId, + defaultLargeEmoji_FontId, emoji_FontId, mediumEmoji_FontId, bigEmoji_FontId, @@ -84,10 +87,11 @@ enum iFontId { max_FontId, /* Meta: */ - fromSymbolsToEmojiOffset_FontId = 9, + fromSymbolsToEmojiOffset_FontId = 10, /* UI fonts: */ uiLabel_FontId = default_FontId, + uiLabelLarge_FontId = defaultLarge_FontId, uiShortcuts_FontId = default_FontId, uiInput_FontId = defaultMonospace_FontId, uiContent_FontId = defaultMedium_FontId, -- cgit v1.2.3