This will make the stroke-based Chinese character keyboard compatible with Japanese kanji stroke order, with an increase of the data file by about 80kb.
This could be a temporary solution for Japanese users to type kanji before better methods are implemented.
The stroke order data are extracted from this repo: https://github.com/KanjiVG/kanjivg.
Menu key support for some widgets. would have closed#11783 and #6463 (cumulative with @comphilip's fixes)
It fixes a problem where some virtual keys were not available for non-touch users. closes#11862
Also, adds keyboard settings to non-touch devices. closes#11934
- forward unknown make targets to base
- add `cmake` and `staging` directories to ignored output artifacts
- drop `package.path` and `package.cpath` luarocks specific entries
1. Non-Kindle-specific `hasFiveWay` behavior is changed to `hasDPad and useDPadAsActionKeys`. For now they remain Kindle-specific in practice, unless one sets `useDPadAsActionKeys = yes` in a user patch.
2. With that disambiguation out of the way, `hasFiveWay` itself is further disambiguated into `hasScreenKB` and `hasSymKey`, as per the actual property being used, rather than something that tends to correlate with it. (It needn't be Kindle-specific per se, but non-Kindle devices have equivalent shortcuts with for example `Shift`.)
Running the emulator with `DISABLE_TOUCH=1` will set `hasSymKey = yes`, which can be tested with right shift.
Closes#11887.
Currently, links with a scheme other than http or https are rejected. But plugins may want to handle them. This allows them to, by registering the scheme with self.ui.link:registerScheme("example") during the plugin's init.
We now build the "page/total %" string ourselves,
with the same logic as used in the footer (including
when hidden flows or reference page numbers are used)
and give it to crengine to be displayed instead of
its own way of doing it.
When using Reference page numbers, "Pages left" was showing the
same info as "Current page", because Reference pages, being strings,
couldn't be used for arithmetics. But we can just count the number
of items left in the Reference pages array of strings.
Also fix edge case with "page progress" with hidden flow when
we are before the first chapter with a hidden flow before.
Includes:
- html5.css: really ensure ruby centering
- getRenderedWidths(): fix possible crash with 0-width images
- Page splitting: ignore empty non-linear flows
- LvDocView header: allow overriding "page/total %"
CreDocument: add setPageInfoOverride() to allow tweaking
top status bar display of page number/count/% (to be
implemented in a later commit).
Switch to a new `input.fdopen` API & wrapper so we can keep the fds opened by `fbink_input_scan` instead of closing them to re-open them right after that...
This should hopefully help on racy zForce devices that attempt to handle power management when opening/closing the device. We know this sometimes horribly fail to re-activate the IR grid (c.f., our manual activation on resume), but this apparently could also happen here (re: #11844) because of the quick succession of open->close->open.
The info messages for opening files always show the full path. By using `filemanagerutil.abbreviate`, the info messages now show the shortened home folder path (only if the setting "shorten home folder" is enabled).
Many PocketBook devices include a web browser, but when clicking a link in KOReader, there was no option to open the link in the browser, there was only an option to show a QR code (which can then be scanned by a smartphone).
This commit implements `canOpenLink`/`openLink` on PocketBook using the "browser.app", if available.
Tested on PB740 (InkPad 3).
Fixes: https://github.com/koreader/koreader/issues/11782
Related: https://github.com/koreader/koreader/issues/6597
updating metadata for 50 languages
short_description.txt: 8 new | 18 updated | 24 not translated
full_description.txt: 10 new | 15 updated | 25 not translated
* Kindle: Don't forget to open INPU_DPAD devices for the fiveways. Somehow managed to skip my mind, they're often on a separate input device.
Regression since #11807
* Update FBInk to fix a few cases of input_scan misdetection (on misconfigured drivers (e.g., no DIRECT prop on supported kernels), or old kernels with no EVIOCGPROP support).
Fix#11824
* Kobo: Drop a bunch of if ladder crap and switch to auto-detection of input devices via fbink_input
* Kindle: Drop an even larger bundle of crap to do the same ;p. (re: #11392)
* ExternalKeyboard: Switch to fbink_input to whitelist keyboards instead of the manual parsing of caps via its FindKeyboard class
* Input: Extended open/close wrappers to handle logging & tracking of dupe open/close calls.
Don't cache the whole base directory; instead independently cache:
- the build output directory
- the ccache directory
This allow completely avoiding the need for building base if a
cache (keyed on the relevant parts of the git tree for base) is
successfully restored, as well as reducing the amount of cached
data.
Additionally, ensure caches are isolated by branch name (but allow
falling back to a "master" cache for restore): we don't want PRs
using each others' caches.
If the Android NDK and/or SDK are not setup, `kodev` will try to invoke
the `android-ndk` and/or `android-sdk` make targets. This can't be done
with `TARGET=android`, as `base/Makefile.defs` will error out trying to
call the (missing) compiler to get the target machine. Those rules need
to be available to all targets.
Relates to https://github.com/koreader/koreader/issues/9268
Requires https://github.com/koreader/koreader-base/pull/1504
Usage:
- `kodev release linux` for native package (same arch as host)
- `LINUX_ARCH=arm release linux` for armhf on a x86_64 host.
- `LINUX_ARCH=arm64 release linux` for arm64 on a x86_64 host.
It produces a `koreader-linux-$ARCH-$VERSION.tar.xz` archive, where $ARCH follows `uname -m` convention {x86_64, armv7l, aarch64}
To generate the debian package from the generic archive the following command is required
`./platform/linux/do_debian_package.sh path_to.tar.xz`
The version of `7z` provided by `p7zip-full` is now the same as `7zip`:
- symlinks are dereferenced by default (no support for `-l`)
- `7z -ba h` appends a trailing `/` to directories
(not present in the output of `7z -slt l`)
* Support the Clara B&W, Clara Colour & Libra Colour
* Enable HW dithering on *all* the Kobo MTK devices
* Enforce 32bpp instead of 8bpp for Kobo devices with a color panel (the driver doesn't actually support 8bpp anyway)
* Enable standby support on MTK (whenever possible, i.e., not when plugged in, as that is horribly, horribly broken).
* Enforce the dedicated "color" waveform mode for image content in ScreenSaver, ImageViewer & Reader.
* Fix charging LED support on MTK
* Tweak the frontlight ramp on MTK + LM3630 so that it actually ramps smoothly
The `droid sans fallback` test incorrectly assumes `Droid Sans Mono`
will be the first font in the list of fallback fonts, but the list
is alphabetically sorted.
Cf. https://github.com/koreader/koreader/pull/10566
Search may highlight matches on the current page, and if there
are no others in the book, we would stay there and resume reading;
but we would get a spurious previous location (ie. in Book map)
that we would not expect keeping, and we may accidently go back
to previous location, losing our reading position.
Avoid this by only adding current page to location stack when
actually leaving the current page.
Because of complications with other reading modes, this is
currently only enabled for CRE document when in page mode.
As currently we only handle ReadingPaused/Resumed on suspend
and resume, no page change should happen while paused, so
there is no current issue to fix. But let's get ready for
other use cases (which may be brought in by user patches,
ie. pausing while the SkimWidget is displayed, and obviously
triggers page changes).
When on a page before the first ToC item (the first chapter),
that first chapter title may be shown in the footer instead
of a more correct blank title.
This bug might still have had other small effect elsewhere.
The FUSE detection is false positive under Gitlab's pipeline,
so just use the hidden `--appimage-extract-and-run` option to
automatically and always "extract & run" the appimage tool.
Instead of trying to detect if running under Docker, use a simpler
wildcard check to detect if FUSE support is available. This as the
advantage of supporting Docker, rootless Docker, and Podman.
Includes:
- Russian hyphenation: allow hyphens after Russian "не" prefix
- EPUB: add "identifiers" to doc props
- EPUB: avoid crash when '@font-face' in <head><style>
- FB2: fix block images sizing and centering
- lvrend: fix positioning of bottom border on empty block elements
Also includes:
- cre: add 'identifiers' to doc props
- build and ci: various tweaks
Device:getDefaultRoute parses /proc/net/route and converts the hex
addresses to textual IP addresses, but in `isOnline` we don't care what
address the gateway actually has, we only care about whether we have a
default route into the Internet.
This provides a simpler alternative that does the equivalent of
"ip route get 203.0.113.1 || ip route get 2001:db8::1" (note that it
does support IPv6-only connectivity as opposed to
Device:getDefaultRoute) and returns true if we have a route.
Inspired by https://github.com/pavel-odintsov/get_default_outgoing_ip_linux
Doing the `isOnline` check (`socket.dns.toip("dns.msftncsi.com")`)
without having internet connectivity (`!isConnected`) results in the
`isOnline` check never succeeding again even if connectivity is later
acquired. This is most likely caused by /etc/resolv.conf only being
parsed once - https://sourceware.org/bugzilla/show_bug.cgi?id=984, an
issue that was fixed in glibc 2.26 (PocketBook firmware U740.6.8.2461
has glibc 2.23).
This fix works around the problem by checking if we have a default route
first before even attempting to check `isOnline`. If we don't, then
`isOnline` is (almost) guaranteed to fail anyway.
We could alternatively check `isConnected` instead, but that only checks
wireless connectivity on many platforms, and we could have internet
access via USBNet instead. Checking for the default route via any
interface should work reliably for both wireless and USBNet
connectivity.
Another alternative fix is to add a fallback nameserver to
/etc/resolv.conf like we do for the Kobo platform [1]. Unfortunately,
this fix would not work in the following (rather common) scenario:
1. PocketBook boots, connects to WiFi
2. KOReader starts, /etc/resolv.conf looks all right, no fallback needed
3. PocketBook goes to sleep, disconnects from WiFi, clears resolv.conf
4. PocketBook wakes up, stays disconnected
5. KOReader user does a Wikipedia lookup, networking freezes
[1]: https://github.com/koreader/koreader/pull/6424/files#diff-be863601c59a2d6607af6b04b3be2392ec4494df6d25dae48250fae57b737f61R216-R224
Fixes: https://github.com/koreader/koreader/issues/10183
Related: https://github.com/koreader/koreader/issues/6421
Added in <https://github.com/koreader/koreader/pull/8722> and unproblematic for the past two years, but Weblate has now decided to complain about it to the extent of disabling translations:
> Error message
String contains control character: 'If some book titles, dictionary entries and such are not displayed well but shown as \ufffe\ufffe or ��, it may be necessary to download the required fonts for those languages. They can then be enabled as additional UI fallback fonts.\nFonts for many languages can be downloaded at:\n\nhttps://fonts.google.com/noto\n\nOnly fonts named "Noto Sans xyz" or "Noto Sans xyz UI" (regular, not bold nor italic, not Serif) will be available in this menu. However, bold fonts will be used if their corresponding regular fonts exist.'
Includes:
- In-page footnotes: avoid with '-cr-hint: noteref-ignore'
- In-page footnotes: ensure they don't cross "flows"
- Tables: fix rendering when negative text-indent
- FB2 cover drawing: ensure _invertImages flag
- EPUB: fallback to look for a cover in the first fragment
- TextLang: Russian: add typography rules
Also update to libunibreak 6.1.
A typo snuck in #11492, which should've read `not type(article.mimetype) == "string" or type(article.mimetype) == "string" and not article.mimetype:find("^text/html")`. But in most cases the behavior would've been identically broken because of the same underlying issue: Wallabag mimetype is actually HTTP content-type.
Fixes#11528.
Also introduces a new setting associated with the behavior in case people have different preferences.
Include in the EPUB stylesheet most of our epub.css
tweaks, so we get our expected styling even when
html5.css is used as the default stylesheet.
(Users liking the "web page" look can still get it
by enabling some of our existing style tweaks.)
- Reword and document most menu items.
- Handle internally two default styles, one applying only
to FB2/FB2 books, and the other to all other formats.
- Also don't reset the stylesheet to epub.css when
toggling Embedded Styles to off.
Includes:
- Hyphenation: update French.pattern
- [CI] Add stylelint to help prevent typos in CSS
- In-page footnotes: better handle duplicated ids
- lvrend: handle in-page footnotes in table <caption>
- lvstsheet: fix compiler warnings
- LVString: ignore CJK chars in lStr_findWordBounds()
- lvtext: AddLine(): handle some CJK + space edge case
- EPUB: look for EPUB3 cover even when EPUB2 cover advertized
- List items: proper per-specs positionning and sizing
- epub.css: add/use "@media (-cr-max-cre-dom-version: 20180527)"
- fb2def.h: add more HTML element and attributes names
- CSS: generic support for handling presentational hints
- CSS: add support for private -cr-apply-func:
- ldomDocumentWriterFilter: remove attribute to CSS conversion
- lvrend: more proper rendering of block images
- lvrend: keep margin_left/right updated when "auto"
- CSS: add support for handling HTML's align= attribute
- lvrend: fix HR and images positionning when floats involved
- epub.css, html5.css: minor updates for easier stylesheet switch
- epub.css, html5.css: major updates for better conformance
- fb2.css: fix CI stylelint warnings
Also update to libunibreak 6.0.
If there's only one contact, we won't get an ABS_MT_SLOT, so we need to
make sure we fall back to the main finger slot once we've caught a tool
switch.
Also, move the dedicated pen slot further away, so it has zero chance of
being detected as a potential buddy contact to a finger contact.
Fix#11514
@ -71,7 +71,7 @@ KOReader is developed and supported by volunteers all around the world. There ar
- document lesser-known features on the [wiki][link-wiki]
- help others with your knowledge on the [forum][link-forum]
Right now we only support [liberapay](https://liberapay.com/KOReader) donations, but you can also create a [bounty][link-bountysource] to motivate others to work on a specific bug or feature request.
Right now we only support [liberapay](https://liberapay.com/KOReader) donations.
@ -17,10 +17,10 @@ Each target has its own architecture and you'll need to setup a proper cross-com
A compatible version of the Android NDK and SDK will be downloaded automatically by `./kodev release android` if no NDK or SDK is provided in environment variables. For that purpose you can use:
If you want to use your own installed tools please make sure that you have the **NDKr15c** and the SDK for Android 9 (**API level 28**) already installed.
If you want to use your own installed tools please make sure that you have the **NDKr23c** and the SDK for Android 9 (**API level 28**) already installed.
-- We default to a flag (G2) that slightly boosts saturation,
-- but it *is* a destructive process, so we want to allow disabling it.
-- @translators CFA is a technical term for the technology behind eInk's color panels. It stands for Color Film/Filter Array, leave the abbreviation alone ;).
@ -119,6 +120,10 @@ function ReaderHandMade:onToggleHandmadeFlows()
end
functionReaderHandMade:addToMainMenu(menu_items)
-- As it's currently impossible to create custom hidden flows on non-touch, and really impractical to create a custom toc, it's better hide these features completely for now.
ifnotDevice:isTouchDevice()then
return
end
menu_items.handmade_toc={
text=_("Custom table of contents")..""..self.custom_toc_symbol,
@ -783,13 +784,123 @@ local BOOK_TWEAK_INPUT_HINT = T([[
%2]],_("You can add CSS snippets which will be applied only to this book."),BOOK_TWEAK_SAMPLE_CSS)
localCSS_SUGGESTIONS={
{"-cr-hint: footnote-inpage;",_("When set on a block element containing the target id of a href, this block element will be shown as an in-page footnote.")},
{"-cr-hint: non-linear-combining;",_("Can be set on some specific DocFragments (ie. DocFragment[id*=16]) to ignore them in the linear pages flow.")},
{"-cr-hint: toc-level1;",_("When set on an element, its text can be used to build the alternative table of contents.")},
{"display: run-in !important;",_("When set on a block element, this element content will be inlined with the next block element.")},
{"font-size: 1rem !important;",_("1rem will enforce your main font size.")},
{"hyphens: none !important;",_("Disables hyphenation inside the targeted elements.")},
{"text-indent: 1.2em !important;",_("1.2em is our default text indentation.")},
{"font-size: 1rem !important;",_("1rem will enforce your main font size.")},
{"font-weight: normal !important;",_("Remove bold. Use 'bold' to get bold.")},
{"hyphens: none !important;",_("Disables hyphenation inside the targeted elements.")},
{"text-indent: 1.2em !important;",_("1.2em is our default text indentation.")},
{"break-before: always !important;",_("Start a new page with this element. Use 'avoid' to avoid a new page.")},
{"color: black !important;",_("Force text to be black.")},
{"background: transparent !important;",_("Remove any background color.")},
{"max-width: 50vw !important;",_("Limit an element width to 50% of your screen width (use 'max-height: 50vh' for 50% of the screen height). Can be useful with <img> to limit their size.")},
}},
{_("Private CSS properties"),{
{"-cr-hint: footnote-inpage;",_("When set on a block element containing the target id of a href, this block element will be shown as an in-page footnote.")},
{"-cr-hint: non-linear;",_("Can be set on some specific DocFragments (e.g. DocFragment[id$=_16]) to ignore them in the linear pages flow.")},
{"-cr-hint: non-linear-combining;",_("Can be set on contiguous footnote blocks to ignore them in the linear pages flow.")},
{"-cr-hint: toc-level1;",_("When set on an element, its text can be used to build the alternative table of contents. toc-level2 to toc-level6 can be used for nested chapters.")},
{"-cr-hint: toc-ignore;",_("When set on an element, it will be ignored when building the alternative table of contents.")},
{"-cr-hint: footnote;",_("Can be set on target of links (<div id='..'>) to have their link trigger as footnote popup, in case KOReader wrongly detect this target is not a footnote.")},
{"-cr-hint: noteref;",_("Can be set on links (<a href='#..'>) to have them trigger as footnote popups, in case KOReader wrongly detect the links is not to a footnote.")},
{"::before {content: ' '}",_("Insert a visible space before an element.")},
{"::before {content: '\\A0 '}",_("Insert a visible non-breakable space before an element, so it sticks to what's before.")},
{"::before {content: '\\2060'}",_("U+2060 WORD JOINER may act as a glue (like an invisible non-breakable space) before an element, so it sticks to what's before.")},
{"::before {content: '\\200B'}",_("U+200B ZERO WIDTH SPACE may allow a linebreak before an element, in case the absence of any space prevents that.")},
{"::before {content: attr(title)}",_("Insert the value of the attribute 'title' at start of an element content.")},
{"::before {content: '▶ '}",_("Prepend a visible marker.")},
{"::before {content: '● '}",_("Prepend a visible marker.")},
{"::before {content: '█ '}",_("Prepend a visible marker.")},
@ -17,7 +17,6 @@ local ReaderTypeset = WidgetContainer:extend{
-- @translators This is style in the sense meant by CSS (cascading style sheets), relating to the layout and presentation of the document. See <https://en.wikipedia.org/wiki/CSS> for more information.
_("This sets an empty User-Agent stylesheet, and expects the document stylesheet to style everything (which publishers probably don't).\nThis is mostly only interesting for testing.")
))
table.insert(style_table,getStyleMenuItem(
_("Auto"),
nil,
_("This selects the default and preferred stylesheet for the document type."),
nil,
true-- separator
))
localcss_files={}
forfinlfs.dir("./data")do
@ -200,15 +227,39 @@ function ReaderTypeset:genStyleSheetMenu()
Itmaycausesomesmallissuesonsomebooks(miscenteredtitles,headingsorseparators,orunexpectedtextindentation),aspublishersdon't expect to have our added styles at play and need to reset them; try switching to html5.css when you notice such issues.]]),
table.insert(obsoleted_table,getStyleMenuItem(css,css_files[css], _("This stylesheet is obsolete: don't use it. It is kept solely to be able to open documents last read years ago and to migrate their highlights.")))
css_files[css]=nil
end
end
@ -227,7 +278,7 @@ function ReaderTypeset:genStyleSheetMenu()
-- Must be a class member, both because Input is a singleton and that state is process-wide anyway.
opened_devices={},
}
functionInput:new(o)
@ -219,6 +225,10 @@ function Input:init()
},
}
-- Always send pen data to a slot far enough away from our main finger slot that it can never be matched with a finger buddy in GestureDetector (i.e., +/- 1),
-- with an extra bit of leeway, since we don't even actually support three finger gestures ;).
self.pen_slot=self.main_finger_slot+4
self.gesture_detector=GestureDetector:new{
screen=self.device.screen,
input=self,
@ -290,14 +300,97 @@ function Input:disableRotationMap()
set_mixed_sorting={category="string",event="SetMixedSorting",title=_("Folders and files mixed"),args={true,false},toggle={_("on"),_("off")},filemanager=true,separator=true},
registry:addProvider("cbz","application/x-cbz",self,100)-- Alternative mimetype for OPDS.
registry:addProvider("cfb","application/octet-stream",self,80)-- Compound File Binary, a Microsoft general-purpose file with a file-system-like structure.
title=_("Ignore tables related HTML presentational hints"),
description=_("Ignore HTML attributes that contribute to styles on the <table> element and its sub-elements (ie. align, valign, frame, rules, border, cellpadding, cellspacing…)."),
Onlyfontsnamed"Noto Sans xyz"or"Noto Sans xyz UI"(regular,notboldnoritalic,notSerif)willbeavailableinthismenu.However,boldfontswillbeusediftheircorrespondingregularfontsexist.]])
Onlyfontsnamed"Noto Sans xyz"or"Noto Sans xyz UI"(regular,notboldnoritalic,notSerif)willbeavailableinthismenu.However,boldfontswillbeusediftheircorrespondingregularfontsexist.]]),"","<EFBFBD><EFBFBD>")