From d7df8fc7440298331d77a93fb920383ea70e57b4 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 13 Jun 2024 16:40:32 -0500 Subject: [PATCH] add characters --- src/gui/about.cpp | 2 +- src/gui/settings.cpp | 235 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 234 insertions(+), 3 deletions(-) diff --git a/src/gui/about.cpp b/src/gui/about.cpp index e032ea9c7..a187e9d77 100644 --- a/src/gui/about.cpp +++ b/src/gui/about.cpp @@ -67,7 +67,7 @@ const char* aboutLine[]={ "tildearrow", "", _N("-- localization/translation team --"), - "Español: ThaCuber, tildearrow", + "Español: CrimsonZN, ThaCuber, tildearrow", "Հայերեն: Eknous", "한국어: Heemin, leejh20", "Nederlands: Lunathir", diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 111249162..ce2262f2c 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -6436,7 +6436,223 @@ void FurnaceGUI::applyUISettings(bool updateFonts) { // set to 800 for now due to problems with unifont - static const ImWchar upTo800[]={0x20,0x7e,0xa0,0x800,0}; + static const ImWchar upTo800[]={ + // base + 0x20,0x7e,0xa0,0x800, + // for "Display characters" and language choices + 0x107, 0x107, + 0x10d, 0x10d, + 0x131, 0x131, + 0x142, 0x142, + 0x15f, 0x15f, + 0x17c, 0x17c, + 0x420, 0x420, + 0x423, 0x423, + 0x430, 0x430, + 0x431, 0x431, + 0x432, 0x432, + 0x433, 0x433, + 0x435, 0x435, + 0x437, 0x437, + 0x438, 0x438, + 0x439, 0x439, + 0x43a, 0x43a, + 0x43b, 0x43b, + 0x43c, 0x43c, + 0x43d, 0x43d, + 0x43e, 0x43e, + 0x43f, 0x43f, + 0x440, 0x440, + 0x441, 0x441, + 0x442, 0x442, + 0x443, 0x443, + 0x446, 0x446, + 0x447, 0x447, + 0x448, 0x448, + 0x449, 0x449, + 0x44b, 0x44b, + 0x44c, 0x44c, + 0x44d, 0x44d, + 0x44f, 0x44f, + 0x456, 0x456, + 0x457, 0x457, + 0x540, 0x540, + 0x561, 0x561, + 0x565, 0x565, + 0x575, 0x575, + 0x576, 0x576, + 0x580, 0x580, + 0xe17, 0xe17, + 0xe22, 0xe22, + 0xe44, 0xe44, + 0x3001, 0x3001, + 0x3002, 0x3002, + 0x3042, 0x3042, + 0x3044, 0x3044, + 0x3048, 0x3048, + 0x304c, 0x304c, + 0x304f, 0x304f, + 0x3053, 0x3053, + 0x3055, 0x3055, + 0x3059, 0x3059, + 0x3060, 0x3060, + 0x3066, 0x3066, + 0x3067, 0x3067, + 0x306a, 0x306a, + 0x306b, 0x306b, + 0x306e, 0x306e, + 0x306f, 0x306f, + 0x307e, 0x307e, + 0x307f, 0x307f, + 0x308a, 0x308a, + 0x308b, 0x308b, + 0x308c, 0x308c, + 0x30a2, 0x30a2, + 0x30a3, 0x30a3, + 0x30a4, 0x30a4, + 0x30a9, 0x30a9, + 0x30aa, 0x30aa, + 0x30af, 0x30af, + 0x30b0, 0x30b0, + 0x30b7, 0x30b7, + 0x30b9, 0x30b9, + 0x30c0, 0x30c0, + 0x30c3, 0x30c3, + 0x30c8, 0x30c8, + 0x30ca, 0x30ca, + 0x30d5, 0x30d5, + 0x30d7, 0x30d7, + 0x30df, 0x30df, + 0x30e1, 0x30e1, + 0x30e2, 0x30e2, + 0x30e7, 0x30e7, + 0x30e9, 0x30e9, + 0x30ea, 0x30ea, + 0x30f3, 0x30f3, + 0x4e00, 0x4e00, + 0x4e2a, 0x4e2a, + 0x4e34, 0x4e34, + 0x4e4b, 0x4e4b, + 0x4f53, 0x4f53, + 0x4f60, 0x4f60, + 0x4fdd, 0x4fdd, + 0x500b, 0x500b, + 0x518d, 0x518d, + 0x51b3, 0x51b3, + 0x5206, 0x5206, + 0x5207, 0x5207, + 0x524d, 0x524d, + 0x52a0, 0x52a0, + 0x52a8, 0x52a8, + 0x52d5, 0x52d5, + 0x5341, 0x5341, + 0x5408, 0x5408, + 0x540e, 0x540e, + 0x542f, 0x542f, + 0x555f, 0x555f, + 0x5728, 0x5728, + 0x5834, 0x5834, + 0x591f, 0x591f, + 0x5920, 0x5920, + 0x5b57, 0x5b57, + 0x5b58, 0x5b58, + 0x5b9a, 0x5b9a, + 0x5b9e, 0x5b9e, + 0x5b9f, 0x5b9f, + 0x5be6, 0x5be6, + 0x6001, 0x6001, + 0x614b, 0x614b, + 0x65b9, 0x65b9, + 0x65e5, 0x65e5, + 0x65f6, 0x65f6, + 0x662f, 0x662f, + 0x663e, 0x663e, + 0x6642, 0x6642, + 0x66ff, 0x66ff, + 0x6709, 0x6709, + 0x672c, 0x672c, + 0x6848, 0x6848, + 0x6b64, 0x6b64, + 0x6c7a, 0x6c7a, + 0x73b0, 0x73b0, + 0x73fe, 0x73fe, + 0x7684, 0x7684, + 0x786e, 0x786e, + 0x78ba, 0x78ba, + 0x7b56, 0x7b56, + 0x81e8, 0x81e8, + 0x88c5, 0x88c5, + 0x89e3, 0x89e3, + 0x8a2d, 0x8a2d, + 0x8a9e, 0x8a9e, + 0x8acb, 0x8acb, + 0x8bbe, 0x8bbe, + 0x8bf7, 0x8bf7, + 0x8db3, 0x8db3, + 0x8f09, 0x8f09, + 0x8f7d, 0x8f7d, + 0x8fd9, 0x8fd9, + 0x9019, 0x9019, + 0x986f, 0x986f, + 0x9ad4, 0x9ad4, + 0xac00, 0xac00, + 0xacbd, 0xacbd, + 0xad6c, 0xad6c, + 0xad6d, 0xad6d, + 0xadf8, 0xadf8, + 0xae00, 0xae00, + 0xae4c, 0xae4c, + 0xaf34, 0xaf34, + 0xb2c8, 0xb2c8, + 0xb2e4, 0xb2e4, + 0xb3d9, 0xb3d9, + 0xb420, 0xb420, + 0xb54c, 0xb54c, + 0xb77c, 0xb77c, + 0xb798, 0xb798, + 0xb824, 0xb824, + 0xb8e8, 0xb8e8, + 0xb97c, 0xb97c, + 0xb9ac, 0xb9ac, + 0xb9cc, 0xb9cc, + 0xba54, 0xba54, + 0xba74, 0xba74, + 0xbaa8, 0xbaa8, + 0xbd84, 0xbd84, + 0xc120, 0xc120, + 0xc124, 0xc124, + 0xc158, 0xc158, + 0xc194, 0xc194, + 0xc2a4, 0xc2a4, + 0xc2dc, 0xc2dc, + 0xc2ed, 0xc2ed, + 0xc544, 0xc544, + 0xc57c, 0xc57c, + 0xc5b4, 0xc5b4, + 0xc5d0, 0xc5d0, + 0xc624, 0xc624, + 0xc635, 0xc635, + 0xc6a9, 0xc6a9, + 0xc6b0, 0xc6b0, + 0xc740, 0xc740, + 0xc744, 0xc744, + 0xc774, 0xc774, + 0xc784, 0xc784, + 0xc785, 0xc785, + 0xc791, 0xc791, + 0xc801, 0xc801, + 0xc815, 0xc815, + 0xc9c0, 0xc9c0, + 0xcda9, 0xcda9, + 0xd0dd, 0xd0dd, + 0xd2c0, 0xd2c0, + 0xd53d, 0xd53d, + 0xd558, 0xd558, + 0xd55c, 0xd55c, + 0xd569, 0xd569, + 0xd574, 0xd574, + 0xd604, 0xd604, + }; ImFontGlyphRangesBuilder range; ImVector outRange; @@ -6614,11 +6830,26 @@ void FurnaceGUI::applyUISettings(bool updateFonts) { } // 0x39B = Λ - static const ImWchar bigFontRange[]={0x20,0xFF,0x39b,0x39b,0}; + // Հայերեն + // 한국어 + // Русский + // č + // ไทย + static const ImWchar bigFontRange[]={0x20,0xFF,0x39b,0x39b,0x10d,0x10d,0x420,0x420,0x423,0x423,0x430,0x430,0x438,0x438,0x439,0x439,0x43a,0x43a,0x43d,0x43d,0x440,0x440,0x441,0x441,0x443,0x443,0x44c,0x44c,0x457,0x457,0x540,0x540,0x561,0x561,0x565,0x565,0x575,0x575,0x576,0x576,0x580,0x580,0xe17,0xe17,0xe22,0xe22,0xe44,0xe44,0x65e5,0x65e5,0x672c,0x672c,0x8a9e,0x8a9e,0xad6d,0xad6d,0xc5b4,0xc5b4,0xd55c,0xd55c,0}; if ((bigFont=addFontZlib(font_plexSans_compressed_data,font_plexSans_compressed_size,MAX(1,40*dpiScale),&fontConfB,bigFontRange))==NULL) { logE("could not load big UI font!"); } + fontConfB.MergeMode=true; + if ((bigFont=addFontZlib(font_plexSansJP_compressed_data,font_plexSansJP_compressed_size,MAX(1,40*dpiScale),&fontConfB,bigFontRange))==NULL) { + logE("could not load big UI font (japanese)!"); + } + if ((bigFont=addFontZlib(font_plexSansKR_compressed_data,font_plexSansKR_compressed_size,MAX(1,40*dpiScale),&fontConfB,bigFontRange))==NULL) { + logE("could not load big UI font (korean)!"); + } + if ((bigFont=addFontZlib(font_unifont_compressed_data,font_unifont_compressed_size,MAX(1,40*dpiScale),&fontConfB,bigFontRange))==NULL) { + logE("could not load big UI font (fallback)!"); + } if (settings.mainFontSize==settings.headFontSize && settings.headFont<5 && builtinFont[settings.headFont]==builtinFont[settings.mainFont]) { logD("using main font for header font.");