From 879f8a7624ae0e44a6d658c08793c1f2cf4b4441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Fern=C3=A1ndez?= Date: Mon, 1 Jun 2020 08:07:42 +0200 Subject: [PATCH] [Desktop] Fix missing glyphs by packaging freefonts again (#6218) Also disable battery completely from defaults/option in desktop linux as it always return 0% --- frontend/apps/reader/modules/readerfooter.lua | 6 ++++-- platform/debian/do_debian_package.sh | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/apps/reader/modules/readerfooter.lua b/frontend/apps/reader/modules/readerfooter.lua index 53bc7e8ff..9ba8575e8 100644 --- a/frontend/apps/reader/modules/readerfooter.lua +++ b/frontend/apps/reader/modules/readerfooter.lua @@ -308,7 +308,7 @@ function ReaderFooter:init() all_at_once = false, reclaim_height = false, toc_markers = true, - battery = true, + battery = not Device:isDesktop(), time = true, page_progress = true, pages_left = true, @@ -1536,7 +1536,9 @@ function ReaderFooter:addToMainMenu(menu_items) table.insert(sub_items, getMinibarOption("page_progress")) table.insert(sub_items, getMinibarOption("time")) table.insert(sub_items, getMinibarOption("pages_left")) - table.insert(sub_items, getMinibarOption("battery")) + if not Device:isDesktop() then + table.insert(sub_items, getMinibarOption("battery")) + end table.insert(sub_items, getMinibarOption("percentage")) table.insert(sub_items, getMinibarOption("book_time_to_read")) table.insert(sub_items, getMinibarOption("chapter_time_to_read")) diff --git a/platform/debian/do_debian_package.sh b/platform/debian/do_debian_package.sh index cebbc3b2a..0d74b6e02 100755 --- a/platform/debian/do_debian_package.sh +++ b/platform/debian/do_debian_package.sh @@ -50,7 +50,7 @@ if command_exists "${COMMAND}"; then { echo "Section: graphics" echo "Priority: optional" - echo "Depends: libsdl2-2.0-0, fonts-noto-hinted, fonts-freefont-ttf, fonts-droid-fallback, libc6 (>= 2.2.3)" + echo "Depends: libsdl2-2.0-0, fonts-noto-hinted, fonts-droid-fallback, libc6 (>= 2.2.3)" echo "Architecture: ${ARCH}" echo "Version: ${VERSION}" echo "Installed-Size: $(du -ks "${INSTALL_DIR}/debian/usr/" | cut -f 1)" @@ -66,6 +66,7 @@ if command_exists "${COMMAND}"; then } >"${INSTALL_DIR}/debian/DEBIAN/control" # remove leftovers + find "${BASE_DIR}" -type f -name ".git" -print0 | xargs -0 rm -rf find "${BASE_DIR}" -type f -name ".gitignore" -print0 | xargs -0 rm -rf find "${BASE_DIR}" -type f -name "discovery2spore" -print0 | xargs -0 rm -rf find "${BASE_DIR}" -type f -name "wadl2spore" -print0 | xargs -0 rm -rf @@ -79,14 +80,17 @@ if command_exists "${COMMAND}"; then # fix permissions find "${BASE_DIR}" -type d -print0 | xargs -0 chmod 755 find "${BASE_DIR}" -executable -type f -print0 | xargs -0 chmod 755 + find "${BASE_DIR}" -type f -name "*.cff" -print0 | xargs -0 chmod 644 find "${BASE_DIR}" -type f -name "*.crt" -print0 | xargs -0 chmod 644 find "${BASE_DIR}" -type f -name "*.html" -print0 | xargs -0 chmod 644 find "${BASE_DIR}" -type f -name "*.lua" -print0 | xargs -0 chmod 644 find "${BASE_DIR}" -type f -name "*manifest" -print0 | xargs -0 chmod 644 find "${BASE_DIR}" -type f -name "*.pattern" -print0 | xargs -0 chmod 644 find "${BASE_DIR}" -type f -name "*.png" -print0 | xargs -0 chmod 644 + find "${BASE_DIR}" -type f -name "*.otf" -print0 | xargs -0 chmod 644 find "${BASE_DIR}" -type f -name "*.po*" -print0 | xargs -0 chmod 644 find "${BASE_DIR}" -type f -name "*.so*" -print0 | xargs -0 chmod 644 + find "${BASE_DIR}" -type f -name "*.ttf" -print0 | xargs -0 chmod 644 find "${BASE_DIR}" -type f -name "git-rev" -print0 | xargs -0 chmod 644 find "${BASE_DIR}" -type f -name "reader.lua" -print0 | xargs -0 chmod 755 @@ -96,7 +100,6 @@ if command_exists "${COMMAND}"; then # use debian packaged fonts instead of our embedded ones to save a couple of MB. # Note: avoid linking against fonts-noto-cjk-extra, cause it weights ~200MB. (cd "${BASE_DIR}/lib/koreader/fonts/noto" && link_fonts "$(pwd)") - (cd "${BASE_DIR}/lib/koreader/fonts/freefont" && link_fonts "$(pwd)") # DroidSansMono has a restrictive license. Replace it with DroidSansFallback (