Commit Graph

26 Commits (master)

Author SHA1 Message Date
poire-z 5ec736ae96 ReaderToc: rework getChapterPageCount/Left/Done()
Rework the way they are computed, fixing issues with hidden
flows when they don't coincide with chapter starts.
7 months ago
NiLuJe 9cda84ef2f Prevent Busted from blowing up on cdata finalizers by properly closing
opened documents...
3 years ago
NiLuJe 1ac5846eff
Revamp ToC ticks handling (#6716)
Replace the level `0` `getTocTicks` heuristic with a simple sorted, deduped flat listing of *every* ToC node (via `getTocTicksFlattened`).
4 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 4740ab1fdc
bump crengine: round FT metrics, split text drawing by script (#5628)
Includes:
- Fonts: round FT metrics instead of floor'ing them
- Fonts: switch to no hinting when native hinting fails
- Fonts: fix issue with Harfbuzz fallback font drawing
- Text: split measuring and word drawing by unicode script
- Page splitting: fix small memory leak
- Fix "background-color: black" ignored on inline elements
- Fix decoding of recent MOBI files
- Hardcoded elements list: add <font>
base/xtext.cpp: small cleanup, no logic change
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
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 eaeb3ec97f bump crengine: cache and text fixes, use utf8proc
Bump crengine:
- Ensure text decoration (underline) is continued over word gaps
- Invalidate TOC page numbers on rendering change
- Ensure reproducible cache files when same rendering settings
- LVBlockWriteStream: workaround to exclude fatal error
- Use utf8proc for string uppercase/lowercase/capitalize

Bump base:
Thirdparty: adds utf8proc 2.3.0 (libutf8proc.so.2)
For use by crengine, for now mostly for more complete and
accurate text-transform: uppercase/lowercase/capitalize.

Also revert test tweak (in 27ddd6f) to workaround an issue with
cre cache that should be solved by this crengine bump.
5 years ago
Frans de Jonge 27ddd6f313
[spec] Better insulation (#4972)
Some combination of Travis and/or older Busted necessitated insufficient insulation.

Follow-up to https://github.com/koreader/koreader/pull/4970

Space condensing carried over; reset at the start of readertoc.
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 ea946d52d6 bump crengine: tables rendering improvements and others
bump crengine, which includes:
- Adds support for symbol fonts (local or embedded)
- Fix some issues when rendering text in constrained width
- Page splitting: fix possible missing blocks
- CSS: adds support for 'auto', ignore % for borders
- Fix right border drawing position
- Fix: adds missing properties in copystyle()
- Adds comments, erm_killed rendering method
- Adds getRenderedWidths(): get node min/max node content width
- Tables rendering: fixes and improvements
- getRenderedWidths: enable min_width to be a single CJK char
- Fix wrong text wrap avoid in some case
- epub.css: add style for 'blockquote'
- Fix rendering issue when line ends with an image

Adds a few style tweaks related to tables.

Enforce table width: 100% in Wikipedia EPUBs to keep
previous look, which feels better with the various kinds
of tables in Wikipedia pages.

Fix unit tests as juliet.epub (full of blockquotes), grew quite
a few pages with the epub.css update.
6 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
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 b9141897a3
bump crengine: text formatting: fix leading spaces issues (#4008)
Includes:
- text formatting: fix leading spaces issues
- new English US & GB hyph patterns
6 years ago
poire-z 14e77306b7
Fix unit tests after crengine update (#3993) 6 years ago
Frans de Jonge e3c17aa6d0 Travis: run luacheck on unit tests (#3059)
* Travis: run luacheck on unit tests
7 years ago
Hzj_jie 30378eb2a8 Add restart koreader function and ensure FlushSettings event can be delivered to all widgets (#2772) 7 years ago
chrox 449089881c accommodation of EPUB spec for new crengine 8 years ago
Qingping Hou c22a3747d8 fix all the tests 8 years ago
Frans de Jonge 6eca0be44b Spec updates for new font 9 years ago
chrox a4404cfb10 Add missing urw fonts and fix unit test 9 years ago
chrox 033ffb1d0f update readersearch and readertoc specs as crengine is updated 10 years ago
chrox 7c9130744c add collapsable TOC menu 10 years ago
chrox de38ea1199 count only leaf nodes of toc tree when level is zero 10 years ago
chrox cec8ee3c29 add isChapterBegin/End API for readertoc
and add missing test epub
10 years ago
chrox b09bb87d4e refactoring readertoc and readerfooter
so that they don't repeat themselves.
10 years ago