Commit Graph

33 Commits (acbf4b7a8c60326220ec52c3edf93ea7ead4ba2a)

Author SHA1 Message Date
NiLuJe acbf4b7a8c
Document: Round dimensions properly in getPageDimensions (#8170)
* Geom:transformByScale:
  * Apply the right scaling factor to the y axis
  * Round in a more sensible fashion (àla fz_round_rect, since we pretty much exclusively use it in a similar fashion).
* Bump base (https://github.com/koreader/koreader-base/pull/1407)
3 years ago
NiLuJe 9cda84ef2f Prevent Busted from blowing up on cdata finalizers by properly closing
opened documents...
3 years ago
yparitcher f7d538b108
Landscape FM / Refactor rotation (#6309)
* landscape FM / Refactor rotation

refactor and simplify the orientation handling code. the user generally cares about the rotation (what direction the device is facing) and not about if koreader is displaying in portrait or landscape mode

* bump base

update luasocket, libjpeg-turbo, curl
add logging to evernote-sdk-lua
update framebuffer for proper rotation
4 years ago
poire-z 6336927cb7
bump crengine: text typography by language (#6069)
Includes:
- Fix a few clang-tidy warnings
- Add support for <img src="data:image/png;base64,...>
- XML parsing: add more HTML5 named entities, optimize search
- Text: fix standalone BR not making an empty line
- Fix BR with "display: block" not making an empty line
- Fix hyphens from soft-hyphens not part of highlighted segments
- Use libunibreak for line breaking
- Adds TextLangMan for text typography by language

Tweak ReaderHyphenation to work with the new TextLangMan
(even if it will be replaced soon by ReaderTypography).
4 years ago
yparitcher 7b1ae4e486
continuous: do not limit visible area to page area (#5885)
in scroll_mode allow visible area to be larger than one page

allows proper scrolling om tall aspect ratios. Fixes #5876
4 years ago
yparitcher 6d3e7fcef6 [fix] PDF footer margins (#5620)
closes #5612 

the change in `ReaderView:recalculate()` causes the viewable page size to be calculated by not including the footer, causing the text not to get cut off.

since the page area was not drawing under the footer `ReaderView:drawPageSurround()` had to be fixed to draw the margin under the footer so when tapping the footer off the area should be dran the background color.
5 years ago
poire-z 6baa2af5fb
cre: use 'best' (Harfbuzz) as the default kerning method (#5553)
It might be slower, but is needed to properly display
books in arabic, indic...
Also bump crengine: use FreeType "light" hinting algorithm,
which hints on the y-axis only (and so avoid messing with
advances and kerning on the x-axis).
5 years ago
Frans de Jonge ec6e34cb1e
Change default zoom mode & add warning message for fit page + scroll (#5170)
* [UX] Change default zoom mode to page width

Fixes #5166.

* Warning popup for weird scroll mode combinations
5 years ago
poire-z 9f3c85ed83 cre: toggable enhanced rendering (floats, collapsed margins...)
Adds "Render mode" toggle with 4 modes, to enable some or all
of crengine's new enhanced block rendering features.
Use "legacy" rendering for previously opened books to not mess
with bookmarks, and "web" (all of the new features) for new books.

Also make available the added "HTML5" stylesheet to the Style menu.
5 years ago
poire-z 5f13e68966
bump crengine: line-height: reworked implemenation (#4835)
Includes:
- Revert "line-height: fix handling and inheritance"
- Revert "line-height: switch base from 16 to 256 for more granularity"
- CSS: parse "normal" keyword length
- line-height: reworked implemenation for better conformance
- 2-pages mode: fix middle margin sizing
5 years ago
Qingping Hou 1605409c60 rename runtimectl to document/canvascontext 5 years ago
Qingping Hou 4d8da96177 fix test 5 years ago
Frans de Jonge ba4bf7243d
[chore] Deprecate TapForward/TapBackward (#4689)
Also fix previous page action in gesture manager.
5 years ago
poire-z d8d0def122
Floating punctuation: change default to disabled (#4101)
It was enabled by default, but it's mostly only needed for CJK users.
Furthermore, when floating punctuation is enabled, some rendering
issues exist (text right alignment, variable margins...) that
only CJK developpers could really fix. So, best to disable it and
avoid these rendering issues for most users.

Also: fix CoverBrowser crash when "Delete cache database"
followed by "Prune cache of removed books".
6 years ago
NiLuJe 8089d916a5
Visual feedback around tar/zsync on Kobo during OTA updates (#4043)
* With a bonus version normalizer fix.
  * And a zsync bump/fix to avoid softlocks with OpenStack HTTP frontends (also, pull those from the OTA mirror list).
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
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 62630706bb
bump base/crengine: stylesheet handling improvements (#3934)
Includes:
- Fix a few CSS selector issues
- CSS: add support for some pseudo-classes
- Hyphenation: update fr & de patterns
- CSS: Fix non-lowercasing of specific elements names
- Revert parts of recent BR handling fixes
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 2c1e7f2a4f Bump base for crengine bump (#3249)
crengine crashes, rendering and selection delay fix by @frankyifei
7 years ago
Frans de Jonge 1fd8989906 [ci] readerlink_spec.lua: #nocov on failing tests 7 years ago
Frans de Jonge 9b557ed15a Bump base: crengine update (#2985)
* crengine: return description and keywords metadata
  Only available for EPUB documents for now. @poire-z
* crengine: css related improvements, fix crash, better handling of gif @frankyifei
7 years ago
Hzj_jie 7d2ed4c3d0 Move kobo auto-suspension logic out of UIManager (#2933) 7 years ago
Qingping Hou 558754e9b5 footer(refactor): various bug fixes and optimizations 8 years ago
Qingping Hou abbb72b6d3 readerrolling(fix): do not emit PageUpdate event until document is ready 8 years ago
chrox 001433e6bc various test/coverage optimization 8 years ago
chrox 9ab005a1d3 fix unit test of readerlink and readerpaging
and have more confidence with the unit testing framework.

Now `make testfront` won't retry on failure and testing files are
ordered in each run so that it's possible to reproduce testing failure.

And this patch also fix flush settings not working before suspend issue:
at some point the `FlushSettings` event is sent to `UIManager` instead
of `ReaderUI`, but `UIManager` only delegated events to active widgets
and `ReaderUI` is actually not an active widgets thus will miss the event.

This patch also add a verbose debug mode with "-v" as a switch to turn
on this mode. With verbose mode on, event handling will be logged.
8 years ago
Qingping Hou f30e487959 readerpaging(fix): set the corrent page number on GoBackLink event 8 years ago
Qingping Hou 3339ed4e5f test(fix): update tests for default scroll mode 8 years ago
Qingping Hou ef4004e72b test(fix): disable footer in readerlink_spec 8 years ago
Qingping Hou c22a3747d8 fix all the tests 8 years ago
Qingping Hou 4a66036eb0 test: update test to match the new crengine typesetting 8 years ago
Qingping Hou 11d5b5c0a1 fix(readerlink): restore reader view context on go back 8 years ago