* origin/master:
using font module for getting fonts (commit f95231d789)
Password input, handling for broken documents
factored pages count out, better error and password handling
factored pages counter out of document struct
make muPDF cache size configurable from Lua
add XPS and CBZ support (muPDF provides this)
fixed bug for odd rendering widths
refactored muPDF integration to use strictly the fitz.h API
forgot Makefile change when factoring out drawcontext
fix a Lua 5.0 syntax that was deprecated in 5.1
separate DC out of pdf.c and djvu.c (cleanup)
removed obsolete page rotation handling, closes#70
allow easier customization of toolchain for libdjvu
fix: remove page number checking in displaying TOC
fix: handle LPGBCK and LPGFWD in selectmenu
* hwhw/master:
make muPDF cache size configurable from Lua
add XPS and CBZ support (muPDF provides this)
fixed bug for odd rendering widths
refactored muPDF integration to use strictly the fitz.h API
forgot Makefile change when factoring out drawcontext
* hwhw/master:
fix a Lua 5.0 syntax that was deprecated in 5.1
separate DC out of pdf.c and djvu.c (cleanup)
removed obsolete page rotation handling, closes#70
allow easier customization of toolchain for libdjvu
fix: remove page number checking in displaying TOC
fix: handle LPGBCK and LPGFWD in selectmenu
Former showTOC() method checks the page number in each
entry and only display entry whose page number is greater
than the previous one. However, I think this is too
"clever", we should better leave the TOC untouched to keep
consistent with other pdf readers.
Fixed page caching. Cache strategy is the following:
prio 1: cache/render requested area
prio 2: cache/render as much of the current page as possible
prio 3: cache/render full page
prio 4: render next page
This is still a bit buggy when in fit-to-content mode.
we allow for bigger render buffers, so the cache now returns
the ID (hash) of the relevant cashed tile PLUS offsets into that
tile, pointing to the coordinates where the requested frame
has its origin.
It's not that simple since ZOOM_FIT_TO_CONTENT_HALF_WIDTH also
needs bounding boxes, and this seems like over-optimization
which seems to be bug infested especially because it deals
with negative numbers so code just *looks* wrong