Commit Graph

263 Commits (master)

Author SHA1 Message Date
poire-z 6e3b40e2bf Adds CreDocument:getScreenPositionFromXPointer()
Factorize same code used by ReaderLink and ReaderRolling into
CreDocument:getScreenPositionFromXPointer().
5 years ago
poire-z f2a9ed0b79
bump crengine: count nb of images drawn & others (#4542)
Includes:
- Update french hyphenation pattern
- epub.css: update style for 'blockquote'
- DrawBuf: count nb of images and surface drawn

Adds Document:getDrawnImagesStatistics() to help deciding
if refresh with (possibly costly) dithering should be used
(on devices with HW dithering capabilities) with CreDocument:
when a page contains enough images to benefit from it.
5 years ago
poire-z 85ac59ae00 CreDocument: fix document loading interferences (#4349)
When a main document is opened for displaying, some other
document openings (for getting metadata or cover image)
could affect the main document.
Split some code from CreDocument:init() into another new
method CreDocument:setupDefaultView(), that will only be
called by ReaderUI when opening the main document (and not
by these other openings like Book inforation, View cover...)

Also speed up some of these other openings (Search, Screensaver)
by using doc:loadDocument(false) to load only metadata and
avoid parsing the HTML.

Details in https://github.com/koreader/koreader/issues/4346#issuecomment-440036496
6 years ago
poire-z 9d8531a4b5 Fix footnotes and markers with full status bar
Take full/top status bar's height into account when
computing coordinates.
Also wrap getPageMargins() in CreDocument, so we
don't use cre.cpp _document directly anywhere else.
6 years ago
poire-z f9086a2ba9
EPUB links: show footnotes in popup, larger tap area (#4261)
Adds new options to the Links> submenu, for now only
available and used with CRE documents.
- Allow larger tap area around links
- Ignore external links
- Show footnotes in popup
- Show more links as footnotes

(This last item is mostly for testing and loosening the
footnote detection algorithm, and see how it would behave
with glossary-like links and inter glossary terms links.)

Fix distance computation from gesture position to link by
using segments.
Code for detecting if a link is a footnote is in cre.cpp, and
tweakable a bit with flags in ReaderLink:showAsFoonotePopup().

Footnotes HTML content is displayed by a new FootnoteWidget,
which uses MuPDF for its rendering.
From it, swipe south or tap outside to close, swipe to the left
to follow the original link and jump to the footnote location
in the book.

Also fix tap on highlights after the recent change to use segments
for displaying: use segments also when checking taps.
6 years ago
poire-z 0e2a3b6263 Selection menu: allow viewing HTML 6 years ago
poire-z 6ab34c6d1d cre highlights: draw segments instead of word boxes
It gives a cleaner drawing of multi-lines selected text.
Bump base and crengine.
6 years ago
poire-z 6f2368e3bc
cre: configurable kerning method (off/freetype/harfbuzz) (#4167)
Bump base & crengine for HarfBuzz support.
6 years ago
poire-z c1206888ab Hyphenation: speed up book loading by setting hyph algo earlier (#4142)
Setting the hyph algo before loading the document may save crengine
from re-doing some expensive work at render time (the hyph algo
is accounted in the nodeStyleHash, and would cause a mismatch if it is
different at render time from how it was at load time - "English US" by
default - causing a full re-init of the nodes styles.)
We will only re-set it on pre-render (only then, after loading, we
know the document language) if it's really needed: when no algo saved
in book settings, no default algo, and book has some language defined.
6 years ago
poire-z d8e58a08fd
bump crengine: adds support for dpi-based css units (#4040)
Adds a new toggle to the bottom menu: Zoom (dpi), which
allows for scaling CSS absolute units and image sizes.
6 years ago
NiLuJe e2a0929c51
Better KOA2 support (#4037)
* Better KOA2 support
    * Fix FL
    * Add physical pageturn keys
    * Add accelerometer support
* Possibly better NaturalLight handling on the Clara
* Fix WiFi module name used in some(?) Mk7 Kobos
* A bunch of kodev fixes
6 years ago
Robert d29a65b96e cre: add Word Gap setting to bottom config panel (#4026)
Maps to crengine's Space Condensing feature (named Word Gap
as a similar feature is named for PDF)
6 years ago
poire-z d3d30c405a
bump crengine: fix handling of soft-hyphens (#4025)
Adds a new Hyphenation method: Soft-hyphens only.
Adds a new toggable option, usable with Algorithm and language
based methods: Trust soft hyphens (if enabled, if soft hyphens
found in word: use them and skip regular method).
6 years ago
poire-z dd9cd0e87e
Add 'cre_min_space_condensing_percent' setting (#4023)
Default in crengine is 50%, and this may be too much for some
people (words can look too much stuck to each other on some lines).
This manual setting may help testing if 70% or 80% is better, with:
"cre_min_space_condensing_percent" = 80
6 years ago
poire-z c3a938aad6
bump crengine: alternative TOC, no page break on borders (#4011)
Includes:
- Avoid page break between a node and its borders
- Allow building an alternative TOC from document headings

On CRE documents, allows toggling between original TOC and an
alternative TOC with long-press on the "Table of content" menu
item.

Also update the Wikipedia stylesheet to further avoid
page-breaks between images and their caption, so a full
bordered wikipedia thumbnail is always full on a single page.
6 years ago
poire-z 9a0728e421
Style menu cleanup (#3996)
Use epub.css as the main default style, with all file formats
except FB2 (which needs fb2.css).
(epub.css has been cleaned recently to be more conforming to HTML
specs and to not include class name based styles - with conditional
compatiblity styles for previously opened documents. It should be
usable on all HTML based documents, except FB2 which has some
incompatible specs.)

Consider all shipped css files other than "epub.css" and "fb2.css"
obsolete, and put them in a sub-menu (these other css files have
not been updated in the same way, and are kept as-is for when a
previously opened document requests one of them).

Add an icon indicating which style is set as default (like it's
been done for the Font and Style tweaks menus).

Also set the font size of the full status bar (available with
cre documents) when the setting "cre_header_status_font_size"
is present in settings.reader.lua (to add manually).
6 years ago
NiLuJe 5871132c25
UI Behavior tweaks (#3983)
* Switch all initial highlights to "fast" update

i.e., everything that does an invert
Plus a few other things that refresh small UI elements onTap
Re #3130

* Tweak refreshtype for a number of widgets:
  * Fix iconbutton dimen
  * Make touchmenu flash on close & initial menu popup. Full-screen on close.
  * Use flashing updates when opening/closing dictionary popup. Full-screen on close.
  * Switch FileManager to partial.
    It's mostly text, and we want flash promotion there.
  * Make configdialog & menu flash on exit
  * Make FLWidget flash on close
  * virtualkeyboard: flash on layout change & popup.
  * Potentially not that great workaround to ensure we actually see the
highlights in the FM's chevrons
  * Flash when closing BookStatus Widget
  * Optimize away a quirk of the dual "fast" update in touchmenu

* Promote updates to flashing slightly more agressively.

* Document what each refreshtype actually does.

With a few guidelines on their optimal usecases.

* Switch remaining scheduleIn(0.0) to nextTick()

* Tighter scheduling timers

Shaving a hundred ms off UI callbacks...

* Cache FFI C Library namespace

* Ask MuPDF to convert pixmaps to BGR on Kobo

Fix #3949

* Mention koxtoolchain in the README

re #3972

* Kindle: Handle *all* fonts via EXT_FONT_DIR instead of bind mounts insanity

* Make black flashes in UI elements user-configurable

(All or nothing).

* Jot down some random KOA2 sysfs path
6 years ago
poire-z b498d872be
bump crengine: LI and CITE fixes are now the defaults (#3976)
Books previously opened (that have a metadata.lua, whether with
highlights or not, but because they all have a last_xpointer that
points to the current page, that can be broken too by the changes)
will continue to have the old wrong behaviour, so they won't be
impacted by the breaking changes.
Update cre_dom_version code to use the new functions from cre.cpp.
Remove these Workarounds from Style tweaks.
6 years ago
poire-z 07713be429
Adds "Better rendering of list items" to Style tweaks (#3968)
Alternate rendering of list items as block elements (instead of
inline/final).
Check the built DOM is still coherent with styles on stylesheet
change, and propose to reload the document if not. Also
invalidate cache on close in that case so a new DOM is built
at next opening.
ReaderStyleTweak: fix tweak css duplication; when globally
enabled, when disabling and re-enabling locally, the css would
be added twice to the final CSS.
Also adds !important to "sub_sup_smaller" tweak, and increase
its priority so it can override "font_size_all_inherit".
Adds CreDocument:getCacheFilePath() for futur features.
6 years ago
poire-z 5b7664b064
Style tweaks: use css snippets to tweak book styles (#3944)
Adds a new menu "Style tweaks", with a few CSS snippets
that can make some things better with some books.
6 years ago
poire-z a9905c5129
Font menu: add symbols for default and fallback fonts (#3941)
Also allows for updating the fallback font and see results
in real-time on the underlying document.
Bump crengine for: fix updating fallback font

Also adds a menu item to generate a html document showing some
sample text rendered with each available font (only if the user has
a file koreader/settings/fonts-test-sample.html with some HTML
snippet of his choice).
6 years ago
poire-z 8b2253b3e9
bump base: crengine, freetype, libjpeg-turbo (#3928)
Includes:
- [build] FreeType: bump to 2.9.1
- [build] bump libjpeg-turbo to 1.5.3
- bump crengine:
 - Fix CSS selector specificity computation
 - [fix] crengine/src/lvfntman.cpp: improve letter_spacing limit
 - [fix] crengine/src/lvxml.cpp: add all empty HTML elements
 - html head styles: fix styles not being applied
 - Hyphenation: increase MAX_PATTERN_SIZE from 16 to 35
 - html documents: proper handling of <BR> tags
 - Allows requesting old (broken) XML/DOM building code
- cre.cpp: setStyleSheet(): accept filepath and/or css text,
  and added getIntProperty() and getStringProperty()

credocument/readerrolling: request older XML/DOM building code
for books previously opened, to not lose bookmarks and highlights

(unit tests update because of new handling of consecutive BR via css
pushed links down in the book)
6 years ago
poire-z 4bb3999cbc RenderImage: factorize all image rendering and scaling code
New module RenderImage (alongside existing RenderText) to provides
image rendering and scaling facilities.
Uses MuPDF, but tries first giflib on GIF.
Allows for getting all the frames from an animated GIF.
6 years ago
poire-z 7f6aebe399
cre hyphenation: allow for setting min left/right fragment length (#3890)
When hyphenating a word, the existing algorithms enforced a minimal
length of 2 for each word fragments on left or right side.
This adds a widget to allow changing these minimal sizes (from 1 to 10).
6 years ago
poire-z 152e17fbe3
Adds 'cre_disk_cache_max_size' setting (#3760)
For max disk space usable by crengine for storing book caches.
Increased default from 32 MB to 64 MB.
6 years ago
poire-z 7d71d73cc4
Speed up page turning on big cre documents (#3740)
Page turning, menu opening, ... everything actually
6 years ago
poire-z c93bbec40d
cre: more constrast settings (#3737)
Use ButtonProgress like it was done for kopt.
6 years ago
poire-z db31bd4b96
coverbrowser: quicker extraction of EPUB metadata (#3736)
bump crengine:
Allow for quicker loading when interested in metadata only.
Allow for more than 65535 different attribute values.
Increase gamma values range.
6 years ago
poire-z 5cd51ea0fe
Set default 'cre_storage_size_factor' to 20 (#3732)
Increase default crengine in-memory cache sizes to avoid pack/unpack
of chunks that is known to be the cause of bugs (rendering, cache
re-use...).
6 years ago
poire-z ea284bbc3b
cre: cache re-use fix, warnings and allow cache sizes increase (#3700)
Bump crengine for cache re-use fix and warnings when
cache sizes reached.
Allow for increasing some crengine cache sizes with a new
setting: "cre_storage_size_factor" = 1.5 (or 2, or 4...)
6 years ago
poire-z 501df2ebc2
cre cache: allow for disabling compression (#3670)
With ["cre_compress_cached_data"] = false in settings.reader.lua.
Not using compression for cache files does indeed take more space,
but it does speed up opening, rendering, page turns, and closing,
with big documents.
Bump base and crengine.
6 years ago
Frans de Jonge f6ca1c7c0a
[feat] Open with: choose which engine to use for file (#3653)
Fixes #3345

* Add SVG to MuPDF filetypes
6 years ago
Frans de Jonge d714bd3aea
[feat] DocumentRegistry: add getProviders() and preferred by weight (#3651)
This is step one toward "open with".

References https://github.com/koreader/koreader/issues/3345

* Fix up some mimetypes
* Add XHTML to supported filetypes
* Add a few image files to MuPDF
	* ".bmp",
	* ".gif",
	* ".hdp",
	* ".j2k",
	* ".jp2",
	* ".jpeg",
	* ".jpg",
	* ".jpx",
	* ".jxr",
	* ".pam",
	* ".pbm",
	* ".pgm",
	* ".png",
	* ".pnm",
	* ".ppm",
	* ".tif",
	* ".tiff",
        * ".wdp",
6 years ago
poire-z 7797c2369e
credocument: deal with loadDocument() failures (#3570)
cre:loadDocument() may fail in recognizing the document format, and
koreader would previously keep calling other methods on it, which would
make crengine segfaults. We now check loadDocument success at the
various places it is called, and try to deal the best way we can when it fails.
6 years ago
poire-z 26def92983 credocument reader optimisation (avoid multiple TOC builds) (#3292)
Avoid unnecessary work in ReaderView:onSetViewMode() and
ReaderRolling:updatePos() that would result in TOC being reset
and rebuilt (which can take time on books with huge TOC) during
reader setup.
7 years ago
poire-z 53f083f516 Allow for toggling color rendering
New menu item in Screen submenu.
hasColorScreen enabled for SDL device.
7 years ago
poire-z 180f5755f4 Allow for colored rendering (#3276)
* Allow for colored rendering

Available with all engines (CRE, PDF, Images).
Needs to manually add setting: "color_rendering" = true

* Disable color for djvudocument

* Use Screen:isColorEnabled()

* Bump base
7 years ago
poire-z 75b7c4b524 Added Font Hinting toggle (#3182) 7 years ago
poire-z c24d75f18c Fix use of default font with font-family: styles
Base bumped.
Previsouly, parts of document in <p style="font-family: serif">
would be rendered with the first font set, and would not
follow change of font (unline other texts without styles).
That was observable with Embedded Styles set to On, but is even
more noticiable with the new Embedded Fonts setting set to off.
7 years ago
poire-z 774d2345e0 Added Embedded Fonts config toggle
Just under the existing "Embedded Styles". Support for this
was already there in crengine, and interfacing is similar to
what is done with Embedded Styles.
7 years ago
poire-z 495accfec9 Reduce memory leaks when switching credocuments
CRE cache, hyphdict and fonts can be initialized only once
when first credocument is opened. Previously, they were
recreated for each document, and as previous instances were probably
not free'd, this caused memory leaks.
7 years ago
Frans de Jonge a6ca0f9b55 CreDocument: add "md" (Markdown) to supported filetypes
Fixes #2632.
7 years ago
Frans de Jonge eb641b6abc squash: mono-spaced font is necessary for ASCII-art type stuff
* reordered requires
7 years ago
Frans de Jonge e5a3ecd3e5 CreDocument: disable fancy formatting by default
It does significantly more harm than good. It can be reenabled with a `txt_preformatted` setting if desired. Fixes #1607.
7 years ago
Hzj_jie 0b29e73e2e BatteryStat plugin and instruction of KoboLight plugin (#2643)
* Start battery stat plugin

* BatteryStat & kobolight

* Several minor improvements

* Remove a useless function

* flush settings

* Some review feedbacks

* Resolve review comments

* Remaining Minutes -> Remaining Hours

* Add dump_file

* typo

* realpath

* realpath on folder

* Remove useless os.time()

* Resolve review comments

* warning

* Add BatteryStat.debugging flag

* treat log as txt

* Minor improvement

* Charging hour should be positive

* Use warn instead of info

* onSuspend in Kobo

* Charging events for kobo and kindle

* More events

* dumpOrLog

* Warnings

* Typo

* More space

* Singleton

* slightly format change

* BatteryStat singleton

* Init

* Remove debugging flag

* sleeping percentage is still negative

* Read settings

* Do not need to change was_suspending and was_charging

* Typo

* Remove debugging flag

* Not charging should happen before suspend

* Resolve review comments

* was_suspend and was_charging should be updated each time in onCallback()
7 years ago
poire-z 112e6a46e4 Fix crash when holding on unsupported image 7 years ago
poire-z d648d2b66c Added getImageFromPosition() and isXPointerInDocument()
Bump base (depends on koreader-base PR #470)
7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
chrox 1d887f4fe1 book reading statistics for djvu documents 8 years ago
Qingping Hou c22a3747d8 fix all the tests 8 years ago
Qingping Hou f48d9bd6d9 fix(readerfooter): marker ticks initialization 8 years ago
Qingping Hou 59c17ef420 minor: more luacheck fixes 8 years ago
chrox a60544b1ad Koreader Ubuntu-touch port
Currently only tested on Ubuntu-touch emulator with framework
ubuntu-sdk-14.10 for armhf.
The ubuntu-touch port is binary compatible with the Kobo port
major changes in this PR are:
1. rename the emulator device to sdl device since both the emulator
and the ubuntu-touch target use libsdl to handle input/output.
2. ubuntu-touch app has no write access to the installation dir so
all write-outs should be in a seperate dir definded in `datastorage`.
9 years ago
Huang Xin d393fbb180 Merge pull request #1628 from apletnev/#1581
Add Statistic plugin (#1581 Amount of hours spent on a book)
9 years ago
Alexander Pletnev 52d821df00 Add Statistic plugin (#1581 Amount of hours spent on a book) 9 years ago
frankyifei 23c963ed15 replace Droidsansfallback with NotoSansCJK-Regular 9 years ago
NiLuJe 3fdd90cf3b Fix a few Droid font paths 9 years ago
Qingping Hou 186673587e chore: fix some of the luacheck errors 9 years ago
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.
9 years ago
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.
10 years ago
chrox b80dd1f966 add fulltext search for PDF documents 10 years ago
Andrey Golovizin 99eecde875 Use setStringProperty method to set hyphenation dictionary. 10 years ago
Tigran Aivazian e5e50ed0f9 Fix 1169 by registering .txt.zip/.html.zip/.htm.zip formats 10 years ago
chrox 8f5691d586 fix #968 by check the nullity of text range 10 years ago
chrox bd0975896d add fulltext search for EPUB documents 10 years ago
Huang Xin a300f1e981 Merge pull request #1076 from hwhw/hal
Hardware abstraction: refactoring
10 years ago
Andrey Golovizin e66dbdda29 Add support for .fb2.zip files. 10 years ago
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.
10 years ago
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.
10 years ago
chrox 2ff12af50c protected call of mupdf.renderImage 10 years ago
chrox 2050c0aa66 fix renderImage invocation 10 years ago
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
10 years ago
chrox b422eb90cc refactoring readerrolling
and fix lossing progress when switching screen mode
10 years ago
chrox 7142492e42 fix #959 10 years ago
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.
10 years ago
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.
10 years ago
chrox fd9e3d57f3 fix performance issue of screensaver on Kobo
now loadDocument will not render the document and getCoverPageImage will
be much faster.
10 years ago
chrox 7ce5c9c052 fix Droid Sans Fallback not registered to crengine 10 years ago
chrox 7048ca971b add getCoverPageImage api for CreDocument 10 years ago
chrox 507b989747 use pdfreader instead of crereader to handle zip files
Generally zip files are zipped pictures which should be
better handled in pdfreader.
10 years ago
chrox b7c7287bab remove more global variables 10 years ago
chrox 38c75f8359 fix the first file in a zip is a directory will raise error in zipContentExt 10 years ago
chrox a7fb8811f3 add floating punctuation toggler for EPUBs 10 years ago
WS64 c1ecf23c2c Update credocument.lua 10 years ago
NiLuJe 5ebed6655b Use Noto instead of Droid, where appropriate. 10 years ago
chrox bcd2c8e8f8 display 2 pages side-by-side in landscape for larger screen 10 years ago
chrox 9fc048ecfc considering visible page count in readerrolling
This should fix #660.
10 years ago
chrox 6cdfd322f1 update buildin font names 10 years ago
chrox fd1bb86514 fix cannot get word box in last page of a chapter 10 years ago
chrox 53165e3c2a fix init hyphenation dictionaries 10 years ago
chrox 241d67e0ec revert zip file handler to crereader
It seems that fb2.zip is a conventional format for fb2 with compression
which cannot be handled properly by mupdf.
This should fix #642.
10 years ago
chrox 803e4e8600 font weight option should be persistent between launchings
This should fix #620.
10 years ago
chrox 5aa8eb52da add missing Blitbuffer since it's removed from global space 10 years ago
chrox 6fba40cc77 use mupdf to handle zipped image files 10 years ago
chrox 3b1e05bb7f switch to setIntProperty api for setting page margins 10 years ago
chrox 6bf1a9d033 use setStringProperty method to set font face
This should fix #569.
10 years ago
chrox 30e6b3529b hide Nimbus fonts in font selecting dialog 10 years ago
chrox 775e5ea3b4 serialize the most recently used blitbuffer/koptcontext
to speedup koreader startup for PDF/DJVU documents
especially when reflowing
10 years ago
Qingping Hou 4b357c1466 move reader code into frontend/apps/reader
it makes more sense to completely separate the UI framework and
application code

also move frontend/ui/configurable.lua to frontend/configurable.lua
10 years ago
chrox 92219a1f1e cleanup: expand tab to 4 spaces 10 years ago
chrox 560444c168 add fallback_font option in G_reader_settings 10 years ago
chrox 9f507e6447 add 'full/mini' options for progress bar of crereader 10 years ago
chrox bfff863861 fix cannot highlight hyphenated words in crereader 10 years ago
chrox 9e3e070522 check link on the fly when tapping 10 years ago
chrox e947f83548 fix dogear not shown properly in crereader 10 years ago
chrox 637904a711 add text highlight for credocument
Three highlight drawers "lighten", "underscore" and "invert" are
available in reader menu.
This should implement #176.
10 years ago
chrox 3275413366 add missing registry for fb2 document 10 years ago
chrox 1329f10fa5 add goto link function for CreDocument 10 years ago
chrox a6e885e77d show battery icon in crereader page header 11 years ago
chrox 865815b42b set visible page count when loading document 11 years ago
chrox 23982b185e add debug information in credocument api 11 years ago
chrox 210293b561 add floating punctuation option for crereader
Luckily after disabling floating punctuation left/right margin
are able to be same now (with large enough margins, should be
more than 1em). So I also changed the default page margins for
crereader and removed the dirty hack.
11 years ago
chrox 14e94f39a4 explicitly call free method of Blitbuffer 11 years ago
chrox 62e12ddfba import document module on-demand 11 years ago
chrox 3b9eaafadd add dictionary lookup in crereader 11 years ago
HW 09cd5c4104 Make DEBUG a require()d local 11 years ago
HW 748a443cd5 Merge remote-tracking branch 'upstream/master'
resolved conflicts with refactored structure
11 years ago
HW 2154e7e852 Further refactoring
This should finish the work to make all globals to local variables.
That allows LuaJIT to properly compile things by interning the
references to the relevant parts (rather than looking up globals
all the time which stops a trace).
11 years ago
HW ef111b99c6 Refactored to use strictly locals 11 years ago
Qingping Hou 10bf048d77 move configurable to Document class
since every document type is depend on it now
11 years ago
chrox c86bb46ef7 add gotoLocation for credocument 11 years ago
chrox 506dbed865 save cre3.ini on closing each credocument
and page margin settings will be restored before rendering.
This patch should fix #299.
11 years ago
chrox 32ffacdf77 adjust font sizes in credocument according to screen dpi
and font sizes list is moved to defaults.lua
11 years ago
Qingping Hou a8a589c27b only set two pages mode for crengine in kindle dxg 11 years ago
chrox 94526fa26d add page margin options in CREOptions 11 years ago
Qingping Hou 1783b16d69 credoc fix: load metadata info after document is rendered 11 years ago
chrox 22b650d0c7 move kopt/cre options into ui/data directory & wrap strings in config options 11 years ago
Qingping Hou 09e1c0af06 add gettext to document modules 11 years ago
Qingping Hou c5ff50abdf remove trailing spaces 11 years ago
chrox 87eec1b539 save/restore view mode and embedded css mode 11 years ago
chrox df7f7714e4 remove default options in KoptOptions and CreOptions 11 years ago
Qingping Hou ae6c4bd03a Merge branch 'new_ui_code' of github.com:hwhw/kindlepdfviewer into rotate
Conflicts:
	frontend/ui/reader/readerconfig.lua
11 years ago
Qingping Hou f91c913530 set default_arg for screen_mode option on runtime 11 years ago
Qingping Hou 0dba667937 rename setScreenViewMode to setScreenMode 11 years ago
chrox a1aa41136c add manual page crop for pdf/djvu documents 11 years ago
Qingping Hou 2d9534e092 add screen rotate to readerconfig 11 years ago
Qingping Hou 6d8ebb4126 adapt credocument to new changes in cre.cpp 11 years ago
Qingping Hou 65910b2017 add default_css to credocument 11 years ago
Qingping Hou 6c4da43dbf add setStyleSheet method to credocument 11 years ago
Qingping Hou 93d3aea905 pass filename properly for zipped fb2 in CreDocument:init() 12 years ago
Qingping Hou 874890aaec save and restore gamma_index for crengine 12 years ago
Qingping Hou 02ea5f1fbf read header font from config 12 years ago
Qingping Hou 687aabc173 adapt ui to loadDocument before setFont 12 years ago
Qingping Hou 59a424203b add font gamma to readerconfig 12 years ago
Qingping Hou 5ce4f24c37 move CreOptions to credocument.lua 12 years ago
Qingping Hou 2fa919e1b6 add CreDocument:toggleFontBolder 12 years ago
Qingping Hou ac1cf212d1 add setViewMode to CreDocument 12 years ago
Qingping Hou fdc05b066c add readerconfig to document supported by crengine
* now font size can be changed by readerconfig
12 years ago
Qingping Hou 93abd2fee7 add page status to readerrolling for better page view_mode support
* now when rendering in page view mode, we only keep track of page
number instead of pos inside document. Because using pos inside
document for page view mode is really a bad idea and will lead to
many unsovlabe bugs...
12 years ago
Qingping Hou 5ab98420bd use predefined variable instead of magic number for view_mode 12 years ago