Commit Graph

259 Commits (ce624be8b83e880b1a81106a143e1440eeda4aab)

Author SHA1 Message Date
poire-z b0e127fd31 Adds "Generic web browser paragraph style" tweak 5 years ago
poire-z 335a513826 [chore] cleanup multi-lines translatable strings
Revert 9971eb85 and make multi-lines strings more readable.
(Multiline translatable strings extraction has been fixed
in koreader-misc tralua_xgettext.py.)
5 years ago
poire-z 391360dd8c
bump crengine: adds support for 'orphans:' and 'widows:' (#4490)
Includes:
- (Upstream) Harfbuzz light: fix rendering of fallback font
- CSS: adds support for 'orphans:' and 'widows:' properties

Adds some Style tweaks related to Widows and orphans.
5 years ago
poire-z 19280078de bump crengine: Harfbuzz light, WTF-8, corrupted ZIPs
Includes:
- EPUB: workaround ZIP files with corrupted central directories
- Supports book text encoded in WTF-8
- Harfbuzz kerning (full): fix possible wrong flags
- (Upstream) Adds new kerning method: Harfbuzz light, without ligatures

Adds Harfbuzz light kerning methods as the 3rd toggle.
5 years ago
poire-z f533acb7f9 InfoMessage: avoid overflowing screen height with long messages
When no height= provided, and the InfoMessage would overflow
screen height when some long message is provided, decrease the
font size until the widget fit.
5 years ago
Frans de Jonge 6b59101aa4
[fix] Dictionary download: repackage lzip to gzip (#4466)
Fixes #4465.
5 years ago
Frans de Jonge bba7635763
[lang] CSS tweaks: fix typo (#4456) 5 years ago
poire-z f8d8863712 Style tweaks: split in-page footnote tweaks
Split the In-page footnotes tweak into 3 distinct ones,
mainly because I want the 3rd one with classic class names
to be disabled'able, while keeping the others, in case
these classic class names are not used for footnotes.

Also fix footnotes list-style-type in Wikipedia EPUBs,
which may have been wrong (but it was less noticable when
following page links because of the little black marker,
or showing them in popup footnotes where the number/letter
is not shown).
5 years ago
Frans de Jonge ee673b1e10 cre: in-page footnotes and alternative TOC: fix wording
Co-Authored-By: poire-z <poire-z@users.noreply.github.com>
5 years ago
poire-z 3fe6eeff71 cre: adds in-page footnotes and alternative TOC hints tweaks
Adds 2 tweaks to allow displaying footnotes at the bottom of pages,
like it's done in some printed books. This will work only with
books with correctly specified footnotes with the adequate EPUB
attributes, and with Wikipedia EPUBs. But users may be able to
activate them for other books with some user style tweaks.

Adds a few tweaks to control the build of the alternative TOC.
With some user style tweaks, one may be able to build a usable
TOC for some badly formatted or converted books.

Also fixes 2 paragraphs tweaks.
5 years ago
NiLuJe f6743a45db
Proper Forma support (#4414)
* Enforce a known rotation on startup, to make sure we handle touch input coordinates properly.
* Proper FrontLight warmth support (thanks to @cairnsh & @pazos in #4291)!
* Fix the PageTurn buttons mapping to match Nickel's defaults
* Properly remap PageTurn buttons depending on the current rotation.
* Actually enable the Mk.7 screen refresh codepath on *all* Mk.7 devices (I'd messed up the device check...).
* Full accelerometer handling (includes a touch of refactoring regarding orientation handling in general).
* Fix insidiously broken USBMS behavior in Nickel after we exit on FW >4.8.

Fix #4291
Fix #3002
5 years ago
Frans de Jonge c41dfc25dd
[feat] Add many more downloadable dictionaries (#4401)
* Virtually the entire list that was originally on Sourceforge, except for some dictionaries with unclear or questionable licences.

* Without the Webster's duplicates. The GCIDE (GNU Collaborative International Dictionary of English), already included, is the extended version of it.

* Without Freelang. To "dissociate" dictionaries, the permission of individual authors has to be obtained.

Many thanks to @avsej who prepared it all.

See https://github.com/koreader/koreader/pull/3176#issuecomment-447085441
5 years ago
Frans de Jonge b261a647c2
[feat] Add dictionary download option (#3176)
You can now download pretty much all of the easily available freely licensed dictionaries I could find.
6 years ago
poire-z 98c3f0d366
bump crengine: fix max image height, handle <epub:switch> (#4390)
Includes:
- (Upstream) Fix dangerous compile warnings
- Fix max image height to prevent spurious page breaks
- Hide <epub:case> in <epub:switch>, show only <epub:default>

Adds a style tweak to show <epub:case> and hide <epub:default>
for the curious person.
6 years ago
poire-z 74c3c90faa
Style tweaks: move some sub-menus to first-level menu (#4384)
We don't need that first-level menu to be short
as it contains no tweak itself (only the submenus
with toggable tweaks need to be kept shorter to
let room below to see the tweak effects).
6 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
Frans de Jonge 923d9e0a89
[UX] Add paragraph whitespace/indent style tweaks (#4358)
Requested on the forum, and it makes a lot of sense.

https://www.mobileread.com/forums/showthread.php?p=3777972#post3777972
6 years ago
Frans de Jonge 49192c96d8
[fix, lang] Replace CSS jargon with natural English (#4343)
See https://github.com/koreader/koreader/pull/4307/files#r234400330
6 years ago
poire-z 26aeb6121c
bump crengine: fix vertical-align and others (#4307)
bump crengine, which includes:
- Avoid uneeded re-rendering on load when with full status bar
- Update french hyphenation pattern
- Fix border-collapse on table cells in some cases
- Fix line-height inheritance when no unit
- Fix: don't ignore space following an image
- Fix: ignore occasional space at start of line
- Fix possible segfault when viewing HTML
- Fix and extend support of vertical-align

Also add a style tweak to middle align images with text, which
may make some text with inline icons and such nicer (depending
on images sizes and selected Zoom/DPI).
6 years ago
poire-z 9377be7e8c Style tweaks: adds 2 page break related tweaks
So we have more tools to kill empty pages.
6 years ago
Martín Fernández a6df153d2c add spanish keyboard with Ñ character (#4244) 6 years ago
poire-z b2c89b93b6
Small keyboards updates (std, fr) (#4177)
Provided by @gerhaher: removed some duplicated keys, replaced
them with other useful ones (to swedish and kenyan people).
Stick cyrillic letter io to a single key
French keyboard: aligned to std.lua, fixed '.' and ',' keys.
6 years ago
poire-z e1ba5ccffe Various minor fixes (#4172)
- css tweaks: use correct CSS "hyphens:" instead of "hyphenate:"
- screenshoter: more logical order of lines (no change in what it does)
- textviewer: make diagonal swipe really trigger a full refresh
- textwidget: more adequate text length to help with centering
- toggleswitch: fix sizing & centering with correct calculations
  (this reduces a bit the size of switches, and may cause a new
  truncation in some translations)
6 years ago
poire-z 6f2368e3bc
cre: configurable kerning method (off/freetype/harfbuzz) (#4167)
Bump base & crengine for HarfBuzz support.
6 years ago
Frans de Jonge 8333754c13 Greek keyboard update (#4152)
By @embryo10, see https://www.mobileread.com/forums/showpost.php?p=3733400&postcount=2952
6 years ago
poire-z 9971eb8533 Fix untranslatable strings (#4132)
Some problem somewhere with [[...]] strings starting with a
leading newline. Should probably be allowed, but for now
fix the few such cases to allow them being translated.
6 years ago
poire-z 7d8ccda852
Style tweaks: re-order Allow hyphenation on all text (#4050)
Should be just below with the other Ignore publisher stuff
(as we allow hyphenation by default).
6 years ago
Robert 2484f0f3bc Style tweaks: adds Allow hyphenation on all text (#4047)
Also fix vertical-align for sub in 'Smaller sub- and superscript'
6 years ago
poire-z a08416d2f8
Add some help texts to long press popup on bottom config titles (#4048) 6 years ago
sebastien 71ff69ec4f cre word gap: use values from defaults.lua (#4045) 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 bdbaa7dfdd
bump crengine: HTML and rendering fixes (#3992)
- Fix getting xpointer to current page
- epub.css cleanup
- fb2def.h update
- Fix a few edge-case rendering issues
- Fix border being drawn in spite of 'border-width: 0'

Also update Wikipedia epub.css stylesheets regarding
recent HTML fixes and enhancements.
Remove "Remove all borders" workaround tweaks, as it's
now fixed.
(Unit tests failure to be fixed in upcoming commit)
6 years ago
Robert 895372f781 Show current and default values in config dialog (pdf) (#3973) 6 years ago
poire-z 56549d5397
Style tweaks: add a few text alignement tweaks (#3979) 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
Robert 693bb84084
Fix show current and default values in config dialog (#3961) 6 years ago
Robert da65db191b Show current and default values in config dialog (epub) (#3952)
when long-press on the title strings on the left of the buttons
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
onde2rock dfd87447da [UX] Make the reader bottom menu compatible with key navigation (#3785)
* [toggleswitch] Add support for key navigation to this widget

Add the onFocus an onUnfocus event handler
add a new function that just circle the switch if not touch event is
detected

* Add key navigation to the readermenu

The shortcut is still Alt-gr on sdl, to be defined on Kindle

* Remove the old method of handling the Press key.

Now the event is handled by the main widget who implement focusmanager
and then dispatched to the currently focused item.
Modify the fine font tuning only for non touch-devices

See : https://github.com/koreader/koreader/pull/3785#issuecomment-375306466
6 years ago
poire-z c93bbec40d
cre: more constrast settings (#3737)
Use ButtonProgress like it was done for kopt.
6 years ago
Robert fe4d52c406 Remove unneeded string S.DARKEST (#3552) 7 years ago
poire-z 8360164e24 Use toggle for CRE Contrast in bottom menu (#3490) 7 years ago
Robert 0def547162 More contrast settings (#3463)
Close: #2133 
More info: #2133
7 years ago
Robert a392fbcca0 [feat] VirtualKeyboard cursor navigation (#3290)
Still lacks Japanese due to insufficient knowledge of the language.
7 years ago
Frans de Jonge 9eb073a524 [travis] Add protection against unscaled sizes
As pointed out by @poire-z

* [fix, UX] SkimToWidget scaling

* [fix] Button scaling

* [fix, UX] Scale ProgressWidget

* [fix, UX] Scale confirmbox

* [fix, UX] Scale just about everything
7 years ago
poire-z 75b7c4b524 Added Font Hinting toggle (#3182) 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 a074876cc2 Added french keyboard
Same as std keyboard with only lowercase and uppercase letters layouts
adapted from QWERTY to the traditional french AZERTY layout.
7 years ago
alexandrahurst 71d38ac647 Refactor modifier keys and add basic Japanese keyboard layout (#2930)
* Add a basic Japanese keyboard layout

Allow for entring Japanese text into text boxes.  Only supports kana
and latin letters due to limitations of current VirtualKeyboard
implementation (complex text input with conversion is not possible).

* Allow keyboard layouts to declare custom modifiers

Refactor modifier key setup code and existing keyboard layouts so
that each layout can declare custom modifier key labels.  This
allows for greater extensibility and for future keyboard layouts.
7 years ago
Robert 0b47c81b1a Add Greek keyboard (#2866)
* Add Greek keyboard

* Fix fix raw to row in comments
7 years ago
robert00s 0bbb4bbc16 Fix: missing letters from portuguese language 7 years ago
robert00s 8a9811804d Add Polish keyboard (#2319)
Add Polish keyboard


* Optimization
8 years ago
Frans de Jonge 6091378bc6 Various low-hanging language fruits
* Record to location, see https://github.com/koreader/koreader/pull/2268#issuecomment-252416860
* Defect size, see https://www.transifex.com/houqp/koreader/translate/#nl_NL/koreader/11979947?issue=yes
* Stop publisher/subscriber, see https://www.transifex.com/houqp/koreader/translate/#nl_NL/koreader/27031159?issue=yes and https://www.transifex.com/houqp/koreader/translate/#nl_NL/koreader/27031160?issue=yes and https://www.transifex.com/houqp/koreader/translate/#nl_NL/koreader/27031161?issue=yes
8 years ago
chrox 551857ce6e fix some luacheck warnings 8 years ago
chihyang c161bc2f79 Add a new feature 'read from right to left'
A new feature 'read from right to left' is added, which is more fit for
Traditional Chinese and Japanese books. Once the feature is enabled:
1. The gesture region of TapForward and area will be flipped
horizonally;
2. The action for swiping to west and to east will be exchanged.
8 years ago
chihyang 8251cd6ac8 Add a UI option to set 'read from right to left' 8 years ago
Qingping Hou 6a1fa7f612 move keyboard layout into data modules
also changed keyboard mode for number to 4
8 years ago
chrox 4c491b5ee2 rename 'Highlight' to 'Highlight options' in menu
This should fix #2023.
8 years ago
Zijie He 1aa0c4192a Multi-line toggle switch & add instruction to resolve sdcv build error. 8 years ago
Qingping Hou 11d5b5c0a1 fix(readerlink): restore reader view context on go back 8 years ago
chrox 72012e97e1 disable reflow options when reflow is not ON
This should also fix #1061.
9 years ago
chrox 83cad1c61c larger page margin as a workaround to fix #1422 9 years ago
Frans de Jonge cf93605d04 Change "Screen Mode" to "Orientation"
Screen mode isn't user-oriented. Orientation is.

"Page" in "Page Margin" is redundant
10 years ago
chrox 3574865dcb fix #1166 by auto alignment of option name 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 fe14809bdf update mupdf and k2pdfopt to latest versions 10 years ago
chrox 30898a3cd8 config line space/font gamma values directly 10 years ago
chrox d7fa72e46c negative x panning if writing direction is set right to left
so that in right to left writing/drawing system the right part
of the page is drawn first
10 years ago
chrox b83c4c3d95 hide several koptoptions in advanced mode 10 years ago
chrox 120f18737e add advanced option forced_ocr to force ocring text 10 years ago
chrox 803e4e8600 font weight option should be persistent between launchings
This should fix #620.
10 years ago
chrox 0fdba1ff35 remove least used koptoptions to save space for small screens 10 years ago
chrox a9b9e7f087 mv columns and text align options to 'Layout' panel 10 years ago
chrox 1d292f16a9 remove full screen option in koptoption
since we can now switch progress bar status simply by tap
10 years ago
chrox c6c4cbcab1 add dewatermark option for pdf/djvu documents 10 years ago
chrox 92219a1f1e cleanup: expand tab to 4 spaces 10 years ago
chrox 4fcb39494c use mini progress bar by default 10 years ago
chrox 9f507e6447 add 'full/mini' options for progress bar of crereader 10 years ago
chrox 19b3d10d8c fix wrong xpointer when changing screen orientation 10 years ago
chrox 83eb90cd47 add font size fine tuning for crereader 10 years ago
chrox ae9b68e1b9 adjust default page margins 11 years ago
chrox e21e017b8d tweaks on config dialog for crereader 11 years ago
chrox b72dd5aab6 alternate landscape in crereader 11 years ago
chrox 71ddd8aa91 make default font size consistent 11 years ago
chrox 1cbc6b9669 move crereader margin options into defaults.lua 11 years ago
chrox 7247a9e3a2 add writing direction option when reflowing
This probably will fix #195.
11 years ago
chrox 90d55cbde4 set auto detect word gap in reflowing by default 11 years ago
chrox 4cfdce6105 fix several local calls of Math.round 11 years ago
HW ef111b99c6 Refactored to use strictly locals 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
chrox 3e94520e53 add width param in ToggleSwitch 11 years ago
chrox f32e9e4548 change medium and large defect sizes to 3.0 and 5.0 respectively 11 years ago
chrox 6dc53df5b5 word gap is set to smallest when selcting CJK languages 11 years ago
chrox 1808c7e5c3 add document language option in config dialog
Document language setting is used for better text extraction and OCR.
11 years ago
{Qingping,Dave} Hou 8c8977567c Merge pull request #156 from chrox/landscape_ori
toggle landscape will change orientation for landscape mode
11 years ago
chrox c19de743ba toggle landscape will change orientation for landscape mode 11 years ago
chrox 2e5d2b9930 add semi-auto bbox option in page crop dialog 11 years ago
Qingping Hou 0d902a1a4c add scrollmode and fullscreen mode to defaults 11 years ago
Qingping Hou 561c7902ca move defaults.lua to root directory 11 years ago
Qingping Hou 18122fe067 add defaults.lua 11 years ago
chrox 94526fa26d add page margin options in CREOptions 11 years ago
chrox 6601b19e4d disable scroll mode by default
since the default zoom mode is page while continuous paging is
useless in page zoom mode.
11 years ago
chrox 8df55b8318 recalculate zoom when changing font size 11 years ago
chrox fb05f9a428 add auto page crop 11 years ago
chrox e56bea89aa rotate page 90 degree instead of 270 degree before reflowing for vertical text 11 years ago
chrox 0a8ca756cc default render quality is set to 1 which will avoid most text resampling 11 years ago
chrox 22b650d0c7 move kopt/cre options into ui/data directory & wrap strings in config options 11 years ago