From e763f58aa7513de3fae4fa1a86a3bf979fabc184 Mon Sep 17 00:00:00 2001 From: rb-union Date: Fri, 22 Dec 2023 16:10:28 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=20=E8=A1=A5=E5=85=85=E9=83=A8?= =?UTF-8?q?=E5=88=862=E5=AD=97=E7=AC=A6=E5=AE=BD=E5=BA=A6=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E9=9B=86=20(#284)"=20(#321)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9a953404724b36f80fd102b9adf77736f52445eb. 终端用于等宽字体的展示,对部分制表符等字符映射了宽度. 部分字符等宽字体未设置字形将fallback到其它字体, 切换系统字体(例如Unifont)后可区分显示字符. GB18030的字体在GB18030编码下可正常展示. Bug: https://pms.uniontech.com/task-view-272385.html --- .../terminalwidget/lib/konsole_wcwidth.cpp | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/3rdparty/terminalwidget/lib/konsole_wcwidth.cpp b/3rdparty/terminalwidget/lib/konsole_wcwidth.cpp index 9d1c67339..40797cc0e 100644 --- a/3rdparty/terminalwidget/lib/konsole_wcwidth.cpp +++ b/3rdparty/terminalwidget/lib/konsole_wcwidth.cpp @@ -83,33 +83,6 @@ static constexpr const Range LUT_2[] = { {0x01f9b0,0x01f9b9},{0x01f9c0,0x01f9c2},{0x01f9d0,0x01f9ff},{0x020000,0x02fffd},{0x030000,0x03fffd}, }; -//由于LUT_2字符集涵盖的内容少了,对该集合进行补充,如下 -static constexpr const Range LUT_2_NEW[] = { - {0x0002ca,0x0002cb},{0x001100,0x00115f},{0x002016,0x002016},{0x002025,0x002025},{0x002035,0x002035},{0x00203b,0x00203b},{0x002103,0x002103},{0x002109,0x002109}, - {0x002160,0x00216b},{0x002170,0x002179},{0x002190,0x002193},{0x002196,0x002199},{0x002208,0x002208},{0x00220f,0x00220f},{0x002211,0x002211},{0x002215,0x002215}, - {0x00221a,0x00221a},{0x00221d,0x002220},{0x002223,0x002223},{0x002225,0x002225},{0x002227,0x00222b},{0x00222e,0x00222e},{0x002234,0x002237},{0x00223d,0x00223d}, - {0x002248,0x002248},{0x00224c,0x00224c},{0x002252,0x002252},{0x002260,0x002261},{0x002264,0x002267},{0x00226e,0x00226f},{0x002295,0x002295},{0x002299,0x002299}, - {0x0022a5,0x0022a5},{0x0022bf,0x0022bf},{0x002312,0x002312},{0x00231a,0x00231b},{0x002329,0x00232a},{0x0023e9,0x0023ec},{0x0023f0,0x0023f0},{0x0023f3,0x0023f3}, - {0x002460,0x002469},{0x002474,0x00249b},{0x002550,0x002573},{0x002581,0x00258f},{0x002593,0x002595},{0x0025a0,0x0025a1},{0x0025b2,0x0025b3},{0x0025bc,0x0025bd}, - {0x0025c6,0x0025c7},{0x0025cb,0x0025cb},{0x0025ce,0x0025cf},{0x0025e2,0x0025e5},{0x0025fd,0x0025fe},{0x002605,0x002606},{0x002609,0x002609},{0x002614,0x002615}, - {0x002640,0x002640},{0x002642,0x002642},{0x002648,0x002653},{0x00267f,0x00267f},{0x002693,0x002693},{0x0026a1,0x0026a1},{0x0026aa,0x0026ab},{0x0026bd,0x0026be}, - {0x0026c4,0x0026c5},{0x0026ce,0x0026ce},{0x0026d4,0x0026d4},{0x0026ea,0x0026ea},{0x0026f2,0x0026f3},{0x0026f5,0x0026f5},{0x0026fa,0x0026fa},{0x0026fd,0x0026fd}, - {0x002705,0x002705},{0x00270a,0x00270b},{0x002728,0x002728},{0x00274c,0x00274c},{0x00274e,0x00274e},{0x002753,0x002755},{0x002757,0x002757},{0x002795,0x002797}, - {0x0027b0,0x0027b0},{0x0027bf,0x0027bf},{0x002b1b,0x002b1c},{0x002b50,0x002b50},{0x002b55,0x002b55},{0x002e80,0x002e99},{0x002e9b,0x002ef3},{0x002f00,0x002fd5}, - {0x002ff0,0x002ffb},{0x003000,0x003029},{0x00302e,0x00303e},{0x003041,0x003096},{0x00309b,0x0030ff},{0x003105,0x00312f},{0x003131,0x00318e},{0x003190,0x0031ba}, - {0x0031c0,0x0031e3},{0x0031f0,0x00321e},{0x003220,0x003247},{0x003250,0x0032fe},{0x003300,0x004dbf},{0x004e00,0x00a48c},{0x00a490,0x00a4c6},{0x00a960,0x00a97c}, - {0x00ac00,0x00d7a3},{0x00e1b7,0x00e1ba},{0x00e1bc,0x00e1bc},{0x00e1be,0x00e1be},{0x00e1cc,0x00e1cd},{0x00e200,0x00e206},{0x00e208,0x00e213},{0x00e215,0x00e223}, - {0x00e225,0x00e225},{0x00e768,0x00e76b},{0x00e76d,0x00e770},{0x00e772,0x00e78b},{0x00e78d,0x00e7ad},{0x00e7af,0x00e7b0},{0x00e7f6,0x00e7ff},{0x00e816,0x00e818}, - {0x00e81e,0x00e81e},{0x00e826,0x00e826},{0x00e82b,0x00e82c},{0x00e831,0x00e832},{0x00e83b,0x00e83b},{0x00e843,0x00e843},{0x00e854,0x00e855},{0x00e864,0x00e864}, - {0x00f900,0x00faff},{0x00fe10,0x00fe19},{0x00fe30,0x00fe52},{0x00fe54,0x00fe66},{0x00fe68,0x00fe6b},{0x00ff01,0x00ff60},{0x00ffe0,0x00ffe6},{0x00fffd,0x00fffd}, - {0x016fe0,0x016fe1},{0x017000,0x0187f1},{0x018800,0x018af2},{0x01b000,0x01b11e},{0x01b170,0x01b2fb},{0x01f004,0x01f004},{0x01f0cf,0x01f0cf},{0x01f18e,0x01f18e}, - {0x01f191,0x01f19a},{0x01f1e6,0x01f202},{0x01f210,0x01f23b},{0x01f240,0x01f248},{0x01f250,0x01f251},{0x01f260,0x01f265},{0x01f300,0x01f320},{0x01f32d,0x01f335}, - {0x01f337,0x01f37c},{0x01f37e,0x01f393},{0x01f3a0,0x01f3ca},{0x01f3cf,0x01f3d3},{0x01f3e0,0x01f3f0},{0x01f3f4,0x01f3f4},{0x01f3f8,0x01f43e},{0x01f440,0x01f440}, - {0x01f442,0x01f4fc},{0x01f4ff,0x01f53d},{0x01f54b,0x01f54e},{0x01f550,0x01f567},{0x01f57a,0x01f57a},{0x01f595,0x01f596},{0x01f5a4,0x01f5a4},{0x01f5fb,0x01f64f}, - {0x01f680,0x01f6c5},{0x01f6cc,0x01f6cc},{0x01f6d0,0x01f6d2},{0x01f6eb,0x01f6ec},{0x01f6f4,0x01f6f9},{0x01f910,0x01f93e},{0x01f940,0x01f970},{0x01f973,0x01f976}, - {0x01f97a,0x01f97a},{0x01f97c,0x01f9a2},{0x01f9b0,0x01f9b9},{0x01f9c0,0x01f9c2},{0x01f9d0,0x01f9ff},{0x020000,0x02fffd},{0x030000,0x03fffd}, -}; - // GB18030字体特定字符宽度 static constexpr const Range LUT_2_GB18030[] = { {0x000007, 0x000007}, {0x00000d, 0x00000d}, {0x00001b, 0x00001b}, {0x000020, 0x000020}, {0x000024, 0x000024}, @@ -209,8 +182,7 @@ static constexpr const Range LUT_0[] = { static constexpr const RangeLut RANGE_LUT_LIST[] = { {-1, LUT_NONPRINTABLE, 1}, // size is the range vector count. -// { 2, LUT_2 , 109}, - { 2, LUT_2_NEW , 183}, + { 2, LUT_2 , 109}, { 0, LUT_0 , 325}, { 1, nullptr , 1}, };