2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

243 Commits

Author SHA1 Message Date
chrox
c2924abac4 Fix OCR fails on native djvu pages
The page_width and page_height were always 600 and 800 before this patch
rendering the OCR engine confused.

This should fix #1379.
2015-03-31 10:31:02 +08:00
chrox
daeefff741 fix #1433 2015-03-12 16:31:12 +08:00
chrox
5c9a9198fb add Document:fastDigest method to calculate document hash without performance overhead 2015-03-02 14:55:16 +08:00
chrox
077517be0b add FONTDIR env variable
to support custom font directory for EPUB documents

Now Koreader could find fonts in the "fonts" directory in the USB root
directory of kindle, Kobo and PocketBook devices, thus no need to copy
fonts to "koreader/fonts" directory.
2015-01-25 16:52:04 +08:00
chrox
fe885be563 refactoring readerbookmark to show both bookmarks and highlights
in the bookmark menu
and use binary search of the sorted bookmarks table whenever is
possible.
2014-11-27 22:01:57 +08:00
Hans-Werner Hilse
22697adf20 switch from scaleByDPI() to scaleBySize() 2014-11-23 12:13:32 +00:00
Hans-Werner Hilse
f9f97163e8 wait for background thread before free()ing koptcontext
This should prevent freeing resources that are actually in use in
a background thread.
2014-11-22 14:44:24 +00:00
chrox
b80dd1f966 add fulltext search for PDF documents 2014-11-17 17:58:44 +08:00
Hans-Werner Hilse
5af4ccb0c4 add support for GIF and PNG to picdocument provider
needs update to latest base
2014-11-17 10:23:06 +01:00
Andrey Golovizin
99eecde875 Use setStringProperty method to set hyphenation dictionary. 2014-11-15 12:22:47 +01:00
Tigran Aivazian
e5e50ed0f9 Fix 1169 by registering .txt.zip/.html.zip/.htm.zip formats 2014-11-14 12:25:02 +00:00
Hans-Werner Hilse
acf6641009 fix memory calculation for cache insert decision, simplify drawing/rendering 2014-11-12 15:53:08 +01:00
Hans-Werner Hilse
5a36e5427f fixes for picdocument
picdocument didn't use the document API correctly
2014-11-11 22:32:57 +01:00
chrox
8f5691d586 fix #968 by check the nullity of text range 2014-11-06 11:18:04 +08:00
chrox
bd0975896d add fulltext search for EPUB documents 2014-11-05 12:28:28 +08:00
Huang Xin
a300f1e981 Merge pull request #1076 from hwhw/hal
Hardware abstraction: refactoring
2014-11-05 08:36:16 +08:00
Andrey Golovizin
86c53f94e1 Make the suffix lowercase before comparing. 2014-11-04 19:56:11 +01:00
Andrey Golovizin
e66dbdda29 Add support for .fb2.zip files. 2014-11-04 19:11:29 +01:00
Andrey Golovizin
a08ac46e80 Move credocument before pdfdocument in the registry. 2014-11-04 18:57:09 +01:00
Andrey Golovizin
4eda3f5a17 Add support for files with multiple extensions (like .fb2.zip). 2014-11-04 18:56:19 +01:00
Hans-Werner Hilse
3066c86e38 Refactoring hardware abstraction
This is a major overhaul of the hardware abstraction layer.
A few notes:

General platform distinction happens in
  frontend/device.lua
which will delegate everything else to
  frontend/device/<platform_name>/device.lua
which should extend
  frontend/device/generic/device.lua

Screen handling is implemented in
  frontend/device/screen.lua
which includes the *functionality* to support device specifics.
Actually setting up the device specific functionality, however,
is done in the device specific setup code in the relevant
device.lua file.

The same goes for input handling.
2014-11-02 21:19:04 +01:00
chrox
8c9751744e fix #1064 by adding timestamp of document in cache key
so that when document is modified the persistent cache will
be invalidated automatically because the cache key will not
be matched. There is no perfermance overhead here at all. We
even don't need to check the modification time of the cache item
on disk, because the name of the on disk cache is a md5sum of the
cacheitem key, now the filename of the cache files contains the
modification time information.
If the document is modified since one rendered page is cached to disk,
the cache key won't match the cache file. And the cache file will
be discarded without the need to open the cache file or to check
the modification time of the cache file itself.
2014-10-30 11:05:26 +08:00
chrox
c2726a8f62 save two blitbuffer memory allocations for crengine on each page turn
One for drawbuffer at CreDocument:drawCurrentView and another for
resizing of drawBuf at cre.drawCurrentPage.
2014-10-27 22:05:24 +08:00
Hans-Werner Hilse
0a74dc6072 add needed ffi module when saving annotations 2014-10-26 23:16:27 +01:00
chrox
2ff12af50c protected call of mupdf.renderImage 2014-10-23 13:49:35 +08:00
chrox
2050c0aa66 fix renderImage invocation 2014-10-21 17:22:20 +08:00
Hans-Werner Hilse
e0868826ad use new FFI based mupdf API
This will use the new API where the Lua/C interface was used before
and also drop usage of mupdfimg wrapper which is now implemented
within the mupdf interface
2014-10-20 16:49:10 +02:00
chrox
d30709edb0 add djvu render mode options in readermenu 2014-10-15 20:31:24 +08:00
chrox
b422eb90cc refactoring readerrolling
and fix lossing progress when switching screen mode
2014-10-10 18:14:33 +08:00
chrox
7142492e42 fix #959 2014-10-07 14:05:34 +08:00
chrox
2f2d9f1bf7 issue error directly when doc is malformated
This should popup a message saying "No reader engine for this file"
instead of a crash when document file is malformated.

This should fix #868.
2014-08-29 17:17:12 +08:00
chrox
132adf8e1b register opened document in documentregistry
so that when calling getCoverPageImage in screensaver mode
the document won't be opened again. This should avoid a lot of
problem such as messing up style and options described in #863.
2014-08-28 21:03:26 +08:00
chrox
b912200951 don't share info field in document
We may have multiple documents opened simultaneously, such as in
screensaver mode the current document is opened twice, it's better
to keep seperate info table for each document.

This should fix #858. When a credocument is opened for screensaver to
get the cover page, the total pages info is set to 1(strangely enough),
before this fix this total pages is shared with the reading document
so the progress bar will get a progress percentage well beyond 100% and
rendering the progress bar out of the boundering box as shown in #858.
2014-08-28 13:30:27 +08:00
chrox
fd9e3d57f3 fix performance issue of screensaver on Kobo
now loadDocument will not render the document and getCoverPageImage will
be much faster.
2014-08-28 13:22:38 +08:00
chrox
0bc3eadcae refactoring: use Document API getCoverPageImage to get cover image 2014-08-27 11:07:25 +08:00
chrox
092522b89d promote user to save PDF document after highlighting
This is a wordaround for #791.
2014-08-24 15:16:04 +08:00
chrox
7ce5c9c052 fix Droid Sans Fallback not registered to crengine 2014-08-23 22:46:41 +08:00
Qingping Hou
99f6298b28 Merge pull request #829 from chrox/master
markup annotation quadpoints should be defined in counterclockwise
2014-08-22 09:29:38 -07:00
chrox
7048ca971b add getCoverPageImage api for CreDocument 2014-08-22 21:32:03 +08:00
chrox
0c29b041fe markup annotation quadpoints should be defined in counterclockwise 2014-08-22 09:32:27 +08:00
chrox
507b989747 use pdfreader instead of crereader to handle zip files
Generally zip files are zipped pictures which should be
better handled in pdfreader.
2014-08-19 12:11:49 +08:00
chrox
b7c7287bab remove more global variables 2014-08-14 19:52:30 +08:00
chrox
38c75f8359 fix the first file in a zip is a directory will raise error in zipContentExt 2014-08-11 20:40:27 +08:00
chrox
a7fb8811f3 add floating punctuation toggler for EPUBs 2014-07-22 21:55:31 +08:00
chrox
120f18737e add advanced option forced_ocr to force ocring text 2014-07-17 22:32:20 +08:00
WS64
c1ecf23c2c Update credocument.lua 2014-07-15 12:17:19 +02:00
NiLuJe
5ebed6655b Use Noto instead of Droid, where appropriate. 2014-07-08 02:11:17 +02:00
chrox
bcd2c8e8f8 display 2 pages side-by-side in landscape for larger screen 2014-07-04 19:28:40 +08:00
chrox
9fc048ecfc considering visible page count in readerrolling
This should fix #660.
2014-07-03 17:54:35 +08:00
chrox
6cdfd322f1 update buildin font names 2014-07-02 22:47:24 +08:00