From b21b4c8776393f57f2c8fc15f06d7b90b952556f Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Fri, 15 Nov 2019 19:06:35 +0100 Subject: [PATCH] Update nerdfonts symbol codepoints for the updated version with no PUA (#5595) * Update nerdfonts symbol codepoints for the updated version with no PUA conflicts Should no longer stomp on Arabic & CJK PUA stuff. --- frontend/apps/reader/modules/readerfooter.lua | 30 +++++++++---------- frontend/ui/widget/touchmenu.lua | 24 +++++++-------- resources/fonts | 2 +- spec/unit/readerfooter_spec.lua | 10 +++---- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/frontend/apps/reader/modules/readerfooter.lua b/frontend/apps/reader/modules/readerfooter.lua index 114f9e3a8..f19b2ad03 100644 --- a/frontend/apps/reader/modules/readerfooter.lua +++ b/frontend/apps/reader/modules/readerfooter.lua @@ -52,13 +52,13 @@ local symbol_prefix = { icons = { time = "⌚", pages_left = "⇒", - battery = "", + battery = "", percentage = "⤠", book_time_to_read = "⏳", chapter_time_to_read = "⤻", frontlight = "☼", - mem_usage = "", - wifi_status = "直", + mem_usage = "", + wifi_status = "", } } local PROGRESS_BAR_STYLE_THICK_DEFAULT_HEIGHT = 7 @@ -89,30 +89,30 @@ local footerTextGeneratorMap = { -- If we're using icons, use fancy variable icons if symbol_type == "icons" then if powerd:isCharging() then - prefix = "" + prefix = "" else if batt_lvl >= 100 then - prefix = "" + prefix = "" elseif batt_lvl >= 90 then - prefix = "" + prefix = "" elseif batt_lvl >= 80 then - prefix = "" + prefix = "" elseif batt_lvl >= 70 then - prefix = "" + prefix = "" elseif batt_lvl >= 60 then - prefix = "" + prefix = "" elseif batt_lvl >= 50 then - prefix = "" + prefix = "" elseif batt_lvl >= 40 then - prefix = "" + prefix = "" elseif batt_lvl >= 30 then - prefix = "" + prefix = "" elseif batt_lvl >= 20 then - prefix = "" + prefix = "" elseif batt_lvl >= 10 then - prefix = "" + prefix = "" else - prefix = "" + prefix = "" end end return prefix .. batt_lvl .. "%" diff --git a/frontend/ui/widget/touchmenu.lua b/frontend/ui/widget/touchmenu.lua index dd74eefb5..cc0a23bdf 100644 --- a/frontend/ui/widget/touchmenu.lua +++ b/frontend/ui/widget/touchmenu.lua @@ -611,30 +611,30 @@ function TouchMenu:updateItems() local batt_lvl = powerd:getCapacity() time_info_txt = time_info_txt .. " ⌁" if powerd:isCharging() then - time_info_txt = time_info_txt .. "" + time_info_txt = time_info_txt .. "" else if batt_lvl >= 100 then - time_info_txt = time_info_txt .. "" + time_info_txt = time_info_txt .. "" elseif batt_lvl >= 90 then - time_info_txt = time_info_txt .. "" + time_info_txt = time_info_txt .. "" elseif batt_lvl >= 80 then - time_info_txt = time_info_txt .. "" + time_info_txt = time_info_txt .. "" elseif batt_lvl >= 70 then - time_info_txt = time_info_txt .. "" + time_info_txt = time_info_txt .. "" elseif batt_lvl >= 60 then - time_info_txt = time_info_txt .. "" + time_info_txt = time_info_txt .. "" elseif batt_lvl >= 50 then - time_info_txt = time_info_txt .. "" + time_info_txt = time_info_txt .. "" elseif batt_lvl >= 40 then - time_info_txt = time_info_txt .. "" + time_info_txt = time_info_txt .. "" elseif batt_lvl >= 30 then - time_info_txt = time_info_txt .. "" + time_info_txt = time_info_txt .. "" elseif batt_lvl >= 20 then - time_info_txt = time_info_txt .. "" + time_info_txt = time_info_txt .. "" elseif batt_lvl >= 10 then - time_info_txt = time_info_txt .. "" + time_info_txt = time_info_txt .. "" else - time_info_txt = time_info_txt .. "" + time_info_txt = time_info_txt .. "" end end time_info_txt = time_info_txt .. batt_lvl .. "%" diff --git a/resources/fonts b/resources/fonts index fa96f653b..63e7df0af 160000 --- a/resources/fonts +++ b/resources/fonts @@ -1 +1 @@ -Subproject commit fa96f653b0ffc11a2402a97b66e27819cb524e9d +Subproject commit 63e7df0afe4df9804eb43a70def122814495cb7e diff --git a/spec/unit/readerfooter_spec.lua b/spec/unit/readerfooter_spec.lua index 8ccd64576..4e2d50bd2 100644 --- a/spec/unit/readerfooter_spec.lua +++ b/spec/unit/readerfooter_spec.lua @@ -164,7 +164,7 @@ describe("Readerfooter module", function() local timeinfo = footer.textGeneratorMap.time(footer) local page_count = readerui.document:getPageCount() -- stats has not been initialized here, so we get na TB and TC - assert.are.same('1 / '..page_count..' | '..timeinfo..' | ⇒ 0 | 0% | ⤠ 0% | ⏳ na | ⤻ na', + assert.are.same('1 / '..page_count..' | '..timeinfo..' | ⇒ 0 | 0% | ⤠ 0% | ⏳ na | ⤻ na', footer.footer_text.text) end) @@ -179,7 +179,7 @@ describe("Readerfooter module", function() local footer = readerui.view.footer readerui.view.footer:updateFooter() local timeinfo = readerui.view.footer.textGeneratorMap.time(footer) - assert.are.same('1 / 2 | '..timeinfo..' | ⇒ 1 | 0% | ⤠ 50% | ⏳ na | ⤻ na', + assert.are.same('1 / 2 | '..timeinfo..' | ⇒ 1 | 0% | ⤠ 50% | ⏳ na | ⤻ na', readerui.view.footer.footer_text.text) end) @@ -197,7 +197,7 @@ describe("Readerfooter module", function() footer:resetLayout() footer:updateFooter() local timeinfo = footer.textGeneratorMap.time(footer) - assert.are.same('1 / 2 | '..timeinfo..' | ⇒ 1 | 0% | ⤠ 50% | ⏳ na | ⤻ na', + assert.are.same('1 / 2 | '..timeinfo..' | ⇒ 1 | 0% | ⤠ 50% | ⏳ na | ⤻ na', footer.footer_text.text) -- disable show all at once, page progress should be on the first @@ -214,10 +214,10 @@ describe("Readerfooter module", function() -- disable page left, battery should follow tapFooterMenu(fake_menu, "Pages left in chapter".." (⇒)") - assert.are.same('0%', footer.footer_text.text) + assert.are.same('0%', footer.footer_text.text) -- disable battery, percentage should follow - tapFooterMenu(fake_menu, "Battery status".." ()") + tapFooterMenu(fake_menu, "Battery status".." ()") assert.are.same('⤠ 50%', footer.footer_text.text) -- disable percentage, book time to read should follow