6f1b70e5eb
Previously the CJK character detection defined only characters in the range U+4000..U+AFFF as "CJK characters". This excludes an incredibly large number of CJK characters within the BMP, let alone the whole two planes dedicated to rarer CJK characters (the SIP and TIP). As a result, a very large number of Chinese, Japanese, and Korean characters were not detected as being CJK characters. While slightly less elegant-looking, it is far more accurate to compute the codepoint from the utf8 character and then see if it falls within one of the defined CJK blocks. This is not future-proof against future CJK ideograph extensions in future Unicode versions, but there is no real way to accurately predict such changes so this is the best we can do without accidentally treating characters explicitily defined as being non-CJK in Unicode as CJK. While we're at it, copy Lua 5.3's utf8.charpattern constant definition so that we can more easily write utf8 iterators with string.gmatch (at least in the interim until there is a rework of utf8 handling in KOReader and everything is rebuilt on top of utf8proc). Some unit tests are added for Korean and Japanese text, and the existing unit tests needed a minor adjustment to handle the fact that isSplittable now correctly detects CJK punctuation as a character to compare against the forbidden split rules. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> |
3 years ago | |
---|---|---|
.ci | 3 years ago | |
.circleci | 3 years ago | |
.github | 3 years ago | |
base@cf317f2fc5 | 3 years ago | |
doc | 3 years ago | |
frontend | 3 years ago | |
l10n@4ea307af6e | 3 years ago | |
metadata/en-US | 3 years ago | |
platform | 3 years ago | |
plugins | 3 years ago | |
resources | 3 years ago | |
spec/unit | 3 years ago | |
test@86eeb0b43d | 8 years ago | |
tools | 3 years ago | |
.busted | 9 years ago | |
.codecov.yml | 5 years ago | |
.editorconfig | 8 years ago | |
.gitignore | 4 years ago | |
.gitmodules | 3 years ago | |
.luacheckrc | 3 years ago | |
.luacov | 7 years ago | |
.shellcheckrc | 4 years ago | |
.travis.yml | 7 years ago | |
COPYING | 10 years ago | |
Makefile | 3 years ago | |
README.md | 3 years ago | |
datastorage.lua | 3 years ago | |
defaults.lua | 3 years ago | |
kodev | 3 years ago | |
reader.lua | 3 years ago | |
setupkoenv.lua | 3 years ago |
README.md
KOReader is a document viewer primarily aimed at e-ink readers.
Download • User guide • Wiki • Developer docs
Main features
-
portable: runs on embedded devices (Cervantes, Kindle, Kobo, PocketBook, reMarkable), Android and Linux computers. Developers can run a KOReader emulator in Linux and MacOS.
-
multi-format documents: supports fixed page formats (PDF, DjVu, CBT, CBZ) and reflowable e-book formats (EPUB, FB2, Mobi, DOC, CHM, TXT). Scanned PDF/DjVu documents can also be reflowed with the built-in K2pdfopt library.
-
full-featured reading: multi-lingual user interface with a highly customizable reader view and many typesetting options. You can set arbitrary page margins, override line spacing and choose external fonts and styles. It has multi-lingual hyphenation dictionaries bundled into the application.
-
integrated with calibre (search metadata, receive ebooks wirelessly, browse library via OPDS), Wallabag, Wikipedia, Google Translate and other content providers.
-
optimized for e-ink devices: custom UI without animation, with paginated menus, adjustable text contrast, and easy zoom to fit content or page in paged media.
-
extensible: via plugins
-
fast: on some older devices, it has been measured to have less than half the page-turn delay as the built in reading software.
-
and much more: look up words with StarDict dictionaries / Wikipedia, add your own online OPDS catalogs and RSS feeds, over-the-air software updates, an FTP client, an SSH server, …
Please check the user guide and the wiki to discover more features and to help us document them.
Screenshots
Installation
Please follow the model specific steps for your device:
Android • Cervantes • Kindle • Kobo • Linux • Pocketbook • reMarkable
Development
Setting up a build environment • Collaborating with Git • Building targets • Porting • Developer docs
Support
KOReader is developed and supported by volunteers all around the world. There are many ways you can help:
- fix bugs and implement new features
- translate the program into your language or improve an existing translation
- document lesser-known features on the wiki
- help others with your knowledge on the forum
Right now we only support liberapay donations, but you can also create a bounty to motivate others to work on a specific bug or feature request.