diff --git a/Makefile b/Makefile index 823fe9c41..cb6a6f534 100644 --- a/Makefile +++ b/Makefile @@ -111,7 +111,6 @@ endif extensions koreader $(KINDLE_LEGACY_LAUNCHER) \ -x "koreader/resources/fonts/*" \ "koreader/resources/icons/src/*" "koreader/spec/*" - # @TODO write an installation script for KUAL (houqp) koboupdate: all # ensure that the binaries were built for ARM diff --git a/frontend/document/credocument.lua b/frontend/document/credocument.lua index 8a46b7989..0843681a3 100644 --- a/frontend/document/credocument.lua +++ b/frontend/document/credocument.lua @@ -19,8 +19,8 @@ local CreDocument = Document:new{ engine_initilized = false, line_space_percent = 100, - default_font = G_reader_settings:readSetting("cre_font") or "FreeSerif", - header_font = G_reader_settings:readSetting("header_font") or "FreeSans", + default_font = G_reader_settings:readSetting("cre_font") or "Noto Serif", + header_font = G_reader_settings:readSetting("header_font") or "Noto Sans", fallback_font = G_reader_settings:readSetting("fallback_font") or "Droid Sans Fallback", default_css = "./data/cr3.css", options = CreOptions, diff --git a/frontend/ui/device.lua b/frontend/ui/device.lua index 10e36c949..2704f04fb 100644 --- a/frontend/ui/device.lua +++ b/frontend/ui/device.lua @@ -49,7 +49,7 @@ function Device:getModel() local k4_set = Set { "0E", "23" } local touch_set = Set { "0F", "11", "10", "12" } local pw_set = Set { "24", "1B", "1D", "1F", "1C", "20" } - local pw2_set = Set { "D4", "5A", "D5", "D6", "D7", "D8", "F2" } + local pw2_set = Set { "D4", "5A", "D5", "D6", "D7", "D8", "F2", "17" } if k2_set[kindle_devcode] then self.model = "Kindle2" diff --git a/frontend/ui/font.lua b/frontend/ui/font.lua index a0d0bd010..b714c7d3b 100644 --- a/frontend/ui/font.lua +++ b/frontend/ui/font.lua @@ -4,18 +4,18 @@ local DEBUG = require("dbg") local Font = { fontmap = { -- default font for menu contents - cfont = "droid/DroidSans.ttf", + cfont = "noto/NotoSans-Regular.ttf", -- default font for title --tfont = "NimbusSanL-BoldItal.cff", - tfont = "droid/DroidSans.ttf", + tfont = "noto/NotoSans-Bold.ttf", -- default font for footer - ffont = "droid/DroidSans.ttf", + ffont = "noto/NotoSans-Regular.ttf", -- default font for reading position info - rifont = "droid/DroidSans.ttf", + rifont = "noto/NotoSans-Regular.ttf", -- default font for pagination display - pgfont = "droid/DroidSans.ttf", + pgfont = "noto/NotoSans-Regular.ttf", -- selectmenu: font for item shortcut scfont = "droid/DroidSansMono.ttf", @@ -23,19 +23,20 @@ local Font = { -- help page: font for displaying keys hpkfont = "droid/DroidSansMono.ttf", -- font for displaying help messages - hfont = "droid/DroidSans.ttf", + hfont = "noto/NotoSans-Regular.ttf", -- font for displaying input content -- we have to use mono here for better distance controlling infont = "droid/DroidSansMono.ttf", -- font for info messages - infofont = "droid/DroidSans.ttf", + infofont = "noto/NotoSans-Regular.ttf", }, fallbacks = { [1] = "droid/DroidSansFallback.ttf", - [2] = "droid/DroidSans.ttf", - [3] = "freefont/FreeSans.ttf", + [2] = "noto/NotoSans-Regular.ttf", + [3] = "droid/DroidSans.ttf", + [4] = "freefont/FreeSans.ttf", }, fontdir = os.getenv("FONTDIR") or "./fonts", diff --git a/frontend/ui/uimanager.lua b/frontend/ui/uimanager.lua index f9ec13a0d..791a55421 100644 --- a/frontend/ui/uimanager.lua +++ b/frontend/ui/uimanager.lua @@ -11,6 +11,7 @@ Screen:init() -- initialize the input handling Input:init() +-- NOTE: Those have been confirmed on Kindle devices. Might be completely different on Kobo (except for AUTO)! local WAVEFORM_MODE_INIT = 0x0 -- Screen goes to white (clears) local WAVEFORM_MODE_DU = 0x1 -- Grey->white/grey->black local WAVEFORM_MODE_GC16 = 0x2 -- High fidelity (flashing) @@ -32,6 +33,8 @@ local UIManager = { default_refresh_type = 0, -- 0 for partial refresh, 1 for full refresh default_waveform_mode = WAVEFORM_MODE_GC16, -- high fidelity waveform fast_waveform_mode = WAVEFORM_MODE_A2, + full_refresh_waveform_mode = WAVEFORM_MODE_GC16, + partial_refresh_waveform_mode = WAVEFORM_MODE_GC16, -- force to repaint all the widget is stack, will be reset to false -- after each ui loop repaint_all = false, @@ -142,6 +145,24 @@ function UIManager:init() Device:usbPlugOut() self:sendEvent(Event:new("NotCharging")) end + -- Emulate the stock reader refresh behavior... + --[[ + NOTE: For ref, on a Touch (debugPaint is my new best friend): + UI: gc16_fast + Reader: When flash: if to/from img: gc16, else gc16_fast; when non-flash: auto (seems to prefer gl16_fast); Waiting for marker only on flash + On a PW2: + Same as Touch, except reader uses reagl on non-flash, non-flash lasts longer (12 pgs); Always waits for marker + --]] + -- We don't really have an easy way to know if we're refreshing the UI, or a page, or if said page contains an image, so go with the highest fidelity option + self.full_refresh_waveform_mode = WAVEFORM_MODE_GC16 + -- We spend much more time in the reader than the UI, and our UI isn't very graphic anyway, so go with the reader behavior + if Device:getModel() == "KindlePaperWhite2" then + self.partial_refresh_waveform_mode = WAVEFORM_MODE_REAGL + else + self.partial_refresh_waveform_mode = WAVEFORM_MODE_GL16_FAST + -- NOTE: Or we could go back to what KOReader did before fa55acc in koreader-base, which was also use WAVEFORM_MODE_AUTO ;). I have *no* idea how the driver makes its choice though... + --self.partial_refresh_waveform_mode = WAVEFORM_MODE_AUTO + end end end @@ -359,26 +380,11 @@ function UIManager:run() elseif force_full_refresh or self.refresh_count == self.FULL_REFRESH_COUNT - 1 then refresh_type = 1 end - -- Emulate the Kindle behavior... - if Device:isKindle() then - -- NOTE: For ref, on a Touch (debugPaint is my new best friend): - -- UI: gc16_fast - -- Reader: When flash: if to/from img: gc16, else gc16_fast; when non-flash: auto (seems to prefer gl16_fast); Waiting for marker only on flash - -- On a PW2: - -- Same as Touch, except reader uses reagl on non-flash, non-flash lasts longer (12 pgs); Always waits for marker - if refresh_type == 1 then - -- We don't really have an easy way to know if we're refreshing the UI, or a page, or if said page contains an image, so go with the highest fidelity option - waveform_mode = WAVEFORM_MODE_GC16 - else - -- We spend much more time in the reader than the UI, and our UI isn't very graphic anyway, so go with the reader behavior - if Device:getModel() == "KindlePaperWhite2" then - waveform_mode = WAVEFORM_MODE_REAGL - else - waveform_mode = WAVEFORM_MODE_GL16_FAST - -- NOTE: Or we could go back to what KOReader did before fa55acc in koreader-base, which was also use WAVEFORM_MODE_AUTO ;). I have *no* idea how the driver makes its choice though... - --waveform_mode = WAVEFORM_MODE_AUTO - end - end + -- Handle the waveform mode selection... + if refresh_type == 1 then + waveform_mode = self.full_refresh_waveform_mode + else + waveform_mode = self.partial_refresh_waveform_mode end if force_fast_refresh then waveform_mode = self.fast_waveform_mode diff --git a/kindle/extensions/koreader/bin/koreader-ext.sh b/kindle/extensions/koreader/bin/koreader-ext.sh new file mode 100755 index 000000000..0f5dd37e4 --- /dev/null +++ b/kindle/extensions/koreader/bin/koreader-ext.sh @@ -0,0 +1,235 @@ +#!/bin/sh +# +# KUAL KOReader actions helper script +# +## + +## A bit of helper functions... +# Check which type of init system we're running on +if [ -d /etc/upstart ] ; then + INIT_TYPE="upstart" + # We'll need that for logging + [ -f /etc/upstart/functions ] && source /etc/upstart/functions +else + INIT_TYPE="sysv" + # We'll need that for logging + [ -f /etc/rc.d/functions ] && source /etc/rc.d/functions +fi + +# We need to get the proper constants for our model... +kmodel="$(cut -c3-4 /proc/usid)" +case "${kmodel}" in + "24" | "1B" | "1D" | "1F" | "1C" | "20" | "D4" | "5A" | "D5" | "D6" | "D7" | "D8" | "F2" | "17" ) + # PaperWhite... + SCREEN_X_RES=768 # NOTE: Yes, 768, not 758... + SCREEN_Y_RES=1024 + EIPS_X_RES=16 + EIPS_Y_RES=24 # Manually mesured, should be accurate. + ;; + * ) + # Handle legacy devices... + if [ -f "/etc/rc.d/functions" ] && grep "EIPS" "/etc/rc.d/functions" > /dev/null 2>&1 ; then + # Already done... + #. /etc/rc.d/functions + echo "foo" >/dev/null + else + # Touch + SCREEN_X_RES=600 # _v_width @ upstart/functions + SCREEN_Y_RES=800 # _v_height @ upstart/functions + EIPS_X_RES=12 # from f_puts @ upstart/functions + EIPS_Y_RES=20 # from f_puts @ upstart/functions + fi + ;; +esac +# And now we can do the maths ;) +EIPS_MAXCHARS="$((${SCREEN_X_RES} / ${EIPS_X_RES}))" +EIPS_MAXLINES="$((${SCREEN_Y_RES} / ${EIPS_Y_RES}))" + +# Adapted from libkh[5] +eips_print_bottom_centered() +{ + # We need at least two args + if [ $# -lt 2 ] ; then + echo "not enough arguments passed to eips_print_bottom ($# while we need at least 2)" + return + fi + + kh_eips_string="${1}" + kh_eips_y_shift_up="${2}" + + # Get the real string length now + kh_eips_strlen="${#kh_eips_string}" + + # Add the right amount of left & right padding, since we're centered, and eips doesn't trigger a full refresh, + # so we'll have to padd our string with blank spaces to make sure two consecutive messages don't run into each other + kh_padlen="$(((${EIPS_MAXCHARS} - ${kh_eips_strlen}) / 2))" + + # Left padding... + while [ ${#kh_eips_string} -lt $((${kh_eips_strlen} + ${kh_padlen})) ] ; do + kh_eips_string=" ${kh_eips_string}" + done + + # Right padding (crop to the edge of the screen) + while [ ${#kh_eips_string} -lt ${EIPS_MAXCHARS} ] ; do + kh_eips_string="${kh_eips_string} " + done + + # Sleep a tiny bit to workaround the logic in the 'new' (K4+) eInk controllers that tries to bundle updates, + # otherwise it may drop part of our messages because of other screen updates from KUAL... + usleep 150000 # 150ms + + # And finally, show our formatted message centered on the bottom of the screen (NOTE: Redirect to /dev/null to kill unavailable character & pixel not in range warning messages) + eips 0 $((${EIPS_MAXLINES} - 2 - ${kh_eips_y_shift_up})) "${kh_eips_string}" >/dev/null +} + +## Handle logging... +logmsg() +{ + # Use the right tools for the platform + if [ "${INIT_TYPE}" == "sysv" ] ; then + msg "koreader: ${1}" "I" + elif [ "${INIT_TYPE}" == "upstart" ] ; then + f_log I koreader kual "" "${1}" + fi + + # And handle user visual feedback via eips... + eips_print_bottom_centered "${1}" 1 +} + +## And now the actual useful stuff! + +# Update koreader +update_koreader() +{ + # Check if we were called by install_koreader... + if [ "${1}" == "clean" ] ; then + do_clean_install="true" + else + do_clean_install="false" + fi + + found_koreader_package="false" + # Try to find a koreader package... Behavior undefined if there are multiple packages... + for file in /mnt/us/koreader-kindle-*.zip ; do + if [ -f "${file}" ] ; then + found_koreader_package="${file}" + fi + done + + if [ "${found_koreader_package}" == "false" ] ; then + # Go away + logmsg "No KOReader package found" + else + # Do we want to do a clean install? + if [ "${do_clean_install}" == "true" ] ; then + logmsg "Removing current KOReader directory . . ." + rm -rf /mnt/us/koreader + logmsg "Uninstall finished." + fi + + # Get the version of the package... + koreader_pkg_ver="${found_koreader_package%.*}" + koreader_pkg_ver="${koreader_pkg_ver#*-v}" + # Install it! + logmsg "Updating to KOReader ${koreader_pkg_ver} . . ." + unzip -q -o "${found_koreader_package}" -d "/mnt/us" + if [ $? -eq 0 ] ; then + logmsg "Update to v${koreader_pkg_ver} successful :)" + # Cleanup behind us... + rm -f "${found_koreader_package}" + else + logmsg "Failed to update to v${koreader_pkg_ver} :(" + fi + fi +} + +# Clean install of koreader +install_koreader() +{ + # Let update_koreader do the job for us ;p. + update_koreader "clean" +} + +# Handle cre's settings... +set_cre_prop() +{ + # We need at least two args + if [ $# -lt 2 ] ; then + logmsg "not enough arg passed to set_cre_prop" + return + fi + + cre_prop_key="${1}" + cre_prop_value="${2}" + + cre_config="/mnt/us/koreader/data/cr3.ini" + + # Check that the config exists... + if [ -f "${cre_config}" ] ; then + # dos2unix + sed -e "s/$(echo -ne '\r')$//g" -i "${cre_config}" + + # And finally set the prop + sed -re "s/^(${cre_prop_key})(=)(.*?)$/\1\2${cre_prop_value}/" -i "${cre_config}" + if [ $? -eq 0 ] ; then + logmsg "Set ${cre_prop_key} to ${cre_prop_value}" + else + logmsg "Failed to set ${cre_prop_key}" + fi + else + logmsg "No CRe config, launch CRe once first" + fi +} + +# Handle CRe's font.hinting.mode +cre_autohint() +{ + set_cre_prop "font.hinting.mode" "2" +} +cre_bci() +{ + set_cre_prop "font.hinting.mode" "1" +} +cre_nohinting() +{ + set_cre_prop "font.hinting.mode" "0" +} + +# Handle CRe's font.kerning.enabled +cre_kerning() +{ + set_cre_prop "font.kerning.enabled" "1" +} +cre_nokerning() +{ + set_cre_prop "font.kerning.enabled" "0" +} + + +## Main +case "${1}" in + "update_koreader" ) + ${1} + ;; + "install_koreader" ) + ${1} + ;; + "cre_autohint" ) + ${1} + ;; + "cre_bci" ) + ${1} + ;; + "cre_nohinting" ) + ${1} + ;; + "cre_kerning" ) + ${1} + ;; + "cre_nokerning" ) + ${1} + ;; + * ) + logmsg "invalid action (${1})" + ;; +esac diff --git a/kindle/extensions/koreader/config.xml b/kindle/extensions/koreader/config.xml index 2bf4a2da3..068af0f88 100644 --- a/kindle/extensions/koreader/config.xml +++ b/kindle/extensions/koreader/config.xml @@ -1,10 +1,10 @@ - Koreader - 0.1 - Koreader dev team - helper + KOReader + 0.2 + KOReader Dev Team + KOReader menu.json diff --git a/kindle/extensions/koreader/menu.json b/kindle/extensions/koreader/menu.json index a0e7d23e0..92ce96c06 100644 --- a/kindle/extensions/koreader/menu.json +++ b/kindle/extensions/koreader/menu.json @@ -8,36 +8,136 @@ "name": "Start the filemanager", "priority": 1, "action": "/mnt/us/koreader/koreader.sh", - "params": "/mnt/us/documents" + "params": "/mnt/us/documents", + "status": false, + "internal": "status Start KOReader on the File Manager" }, { "name": "Open the last document", "priority": 2, - "action": "/mnt/us/koreader/koreader.sh" + "action": "/mnt/us/koreader/koreader.sh", + "status": false, + "internal": "status Start KOReader on the last document" }, { "name": "Start the filemanager (no framework)", "priority": 3, "action": "/mnt/us/koreader/koreader.sh", - "params": "--framework_stop /mnt/us/documents" + "params": "--framework_stop /mnt/us/documents", + "status": false, + "internal": "status Kill the framework and start KOReader's FM" }, { "name": "Open the last document (no framework)", "priority": 4, "action": "/mnt/us/koreader/koreader.sh", - "params": "--framework_stop" + "params": "--framework_stop", + "status": false, + "internal": "status Kill the framework and start KOReader" }, { "name": "Start the filemanager (ASAP)", "priority": 5, "action": "/mnt/us/koreader/koreader.sh", - "params": "--asap /mnt/us/documents" + "params": "--asap /mnt/us/documents", + "status": false, + "internal": "status Start KOreader on the File Manager ASAP" }, { "name": "Open the last document (ASAP)", "priority": 6, "action": "/mnt/us/koreader/koreader.sh", - "params": "--asap" + "params": "--asap", + "status": false, + "internal": "status Start KOreader on the last document ASAP" + }, + { + "name": "Tools", + "priority": 7, + "items": [ + { + "name": "Update KOReader", + "priority": 1, + "action": "./bin/koreader-ext.sh", + "params": "update_koreader", + "exitmenu": false, + "checked": true, + "refresh": false, + "status": false, + "internal": "status Try to update KOReader . . ." + }, + { + "name": "Clean Install of KOReader", + "priority": 2, + "action": "./bin/koreader-ext.sh", + "params": "install_koreader", + "exitmenu": false, + "checked": true, + "refresh": false, + "status": false, + "internal": "status Try to install KOreader from scratch . . ." + }, + { + "name": "CRe font hinting: Autohint", + "if": "\"/mnt/us/koreader/data/cr3.ini\" -f \"/mnt/us/koreader/data/cr3.ini\" \"font.hinting.mode=2\" -g! &&", + "priority": 3, + "action": "./bin/koreader-ext.sh", + "params": "cre_autohint", + "exitmenu": false, + "checked": true, + "refresh": true, + "status": false, + "internal": "status Setup CRe to use autohinting" + }, + { + "name": "CRe font hinting: BCI", + "if": "\"/mnt/us/koreader/data/cr3.ini\" -f \"/mnt/us/koreader/data/cr3.ini\" \"font.hinting.mode=1\" -g! &&", + "priority": 4, + "action": "./bin/koreader-ext.sh", + "params": "cre_bci", + "exitmenu": false, + "checked": true, + "refresh": true, + "status": false, + "internal": "status Setup CRe to use bytecode hinting" + }, + { + "name": "CRe font hinting: None", + "if": "\"/mnt/us/koreader/data/cr3.ini\" -f \"/mnt/us/koreader/data/cr3.ini\" \"font.hinting.mode=0\" -g! &&", + "priority": 5, + "action": "./bin/koreader-ext.sh", + "params": "cre_nohinting", + "exitmenu": false, + "checked": true, + "refresh": true, + "status": false, + "internal": "status Setup CRe to forgo font hinting" + }, + { + "name": "Enable CRe font kerning", + "if": "\"/mnt/us/koreader/data/cr3.ini\" -f \"/mnt/us/koreader/data/cr3.ini\" \"font.kerning.enabled=1\" -g! &&", + "priority": 6, + "action": "./bin/koreader-ext.sh", + "params": "cre_kerning", + "exitmenu": false, + "checked": true, + "refresh": true, + "status": false, + "internal": "status Setup CRe to enable kerning" + }, + { + "name": "Disable CRe font kerning", + "if": "\"/mnt/us/koreader/data/cr3.ini\" -f \"/mnt/us/koreader/data/cr3.ini\" \"font.kerning.enabled=0\" -g! &&", + "priority": 7, + "action": "./bin/koreader-ext.sh", + "params": "cre_nokerning", + "exitmenu": false, + "checked": true, + "refresh": true, + "status": false, + "internal": "status Setup CRe to disable kerning" + } + ] } ] } diff --git a/koreader-base b/koreader-base index 2ba492e57..2c571848d 160000 --- a/koreader-base +++ b/koreader-base @@ -1 +1 @@ -Subproject commit 2ba492e57d7ae1924f4de9c94b65f70b982ff527 +Subproject commit 2c571848d5ebbd5b96464d03a823e64842ec96c4 diff --git a/resources/fonts/noto/AUTHORS b/resources/fonts/noto/AUTHORS new file mode 100644 index 000000000..d9e35ebe0 --- /dev/null +++ b/resources/fonts/noto/AUTHORS @@ -0,0 +1,10 @@ +# This is the official list of Noto authors for copyright +# purposes. +# This file is distinct from the CONTRIBUTORS files. +# See the latter for an explanation. + +# Names should be added to this file as: +# Name or Organization +# The email address is not required for organizations. + +Google Inc. diff --git a/resources/fonts/noto/CONTRIBUTORS b/resources/fonts/noto/CONTRIBUTORS new file mode 100644 index 000000000..48d8d996f --- /dev/null +++ b/resources/fonts/noto/CONTRIBUTORS @@ -0,0 +1,18 @@ +# People who have agreed to one of the CLAs and can contribute patches. +# The AUTHORS file lists the copyright holders; this file +# lists people. For example, Google employees are listed here +# but not in AUTHORS, because Google holds the copyright. +# +# https://developers.google.com/open-source/cla/individual +# https://developers.google.com/open-source/cla/corporate +# +# Names should be added to this file as: +# Name + +Behdad Esfahbod +Cibu Johny +Jungshik Shin +Roozbeh Pournader +Stuart Gill +Sudhakar Chandra +Xiangye Xiao diff --git a/resources/fonts/noto/LICENSE b/resources/fonts/noto/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/resources/fonts/noto/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/resources/fonts/noto/NotoSans-Bold.ttf b/resources/fonts/noto/NotoSans-Bold.ttf new file mode 100644 index 000000000..120ee5323 Binary files /dev/null and b/resources/fonts/noto/NotoSans-Bold.ttf differ diff --git a/resources/fonts/noto/NotoSans-BoldItalic.ttf b/resources/fonts/noto/NotoSans-BoldItalic.ttf new file mode 100644 index 000000000..a35b9c429 Binary files /dev/null and b/resources/fonts/noto/NotoSans-BoldItalic.ttf differ diff --git a/resources/fonts/noto/NotoSans-Italic.ttf b/resources/fonts/noto/NotoSans-Italic.ttf new file mode 100644 index 000000000..7388e2b62 Binary files /dev/null and b/resources/fonts/noto/NotoSans-Italic.ttf differ diff --git a/resources/fonts/noto/NotoSans-Regular.ttf b/resources/fonts/noto/NotoSans-Regular.ttf new file mode 100644 index 000000000..04a2f52ed Binary files /dev/null and b/resources/fonts/noto/NotoSans-Regular.ttf differ diff --git a/resources/fonts/noto/NotoSerif-Bold.ttf b/resources/fonts/noto/NotoSerif-Bold.ttf new file mode 100644 index 000000000..c75224b44 Binary files /dev/null and b/resources/fonts/noto/NotoSerif-Bold.ttf differ diff --git a/resources/fonts/noto/NotoSerif-BoldItalic.ttf b/resources/fonts/noto/NotoSerif-BoldItalic.ttf new file mode 100644 index 000000000..a0ae9b7e6 Binary files /dev/null and b/resources/fonts/noto/NotoSerif-BoldItalic.ttf differ diff --git a/resources/fonts/noto/NotoSerif-Italic.ttf b/resources/fonts/noto/NotoSerif-Italic.ttf new file mode 100644 index 000000000..0c08bab8d Binary files /dev/null and b/resources/fonts/noto/NotoSerif-Italic.ttf differ diff --git a/resources/fonts/noto/NotoSerif-Regular.ttf b/resources/fonts/noto/NotoSerif-Regular.ttf new file mode 100644 index 000000000..96c7d74ab Binary files /dev/null and b/resources/fonts/noto/NotoSerif-Regular.ttf differ