Commit Graph

28 Commits (e2ceace302e481e0f636944eed17b6b7fb3496ae)

Author SHA1 Message Date
Frans de Jonge e2ceace302
[fix, CI] Push to Transifex from master, fix multiline strings for xgettext (#5238)
Related to https://github.com/koreader/koreader/pull/5237
5 years ago
Frans de Jonge fbd331dd07
[i18n] Switch `make pot` to xgettext (#5237)
This introduces context to our strings to differentiate them when necessary.

The syntax chosen is `C_()`, following [glib](https://developer.gnome.org/glib/2.28/glib-I18N.html#C-:CAPS).

```lua
local _ = require("gettext")
local C_ = _.pgettext

C_("Menu|StyleTweaks|", "Pages")
```

Closes #5232.
5 years ago
Frans de Jonge 55973771f9
[lang] Minor CSS tweaks stylistic improvements (#5128)
Pluralizing paddings like this is a bit unidiomatic, and that "all" seems a bit redundant.

Cf. <https://github.com/koreader/koreader/pull/5127>.
5 years ago
poire-z fd5e4df142 Style tweaks: adds Ignore all vertical/horizontal margins/paddings
Provides a bit more granularity than the generic "Ignore all
publisher margins" - and allow the same for paddings for books
that wrongly use paddings for that effect.
5 years ago
poire-z aedc5a4806 Style tweaks: update for latest epub.css, added a few more
- Updated "Avoid page break" tweaks to work on our latest epub.css.
- Added "New page on headings>" menu, as we no more break page on
H1, H2, H3 in EPUBs.
- Added "Center headings" as we no more have them centered.
- Added "Pure black and white" which can make some documents
  more readable.
5 years ago
poire-z 34e6f41e05
cre: fix 2 footnotes issues, bump crengine (#5031)
- Popup footnotes: workaround strange behaviour of MuPDF
  which is adding some unwanted margin above elements
  with an "id=" attribute.
- In-page footnotes: also remove any left and right margin,
  to keep footnotes aligned with the main text.
  Also add 2 classnames (witnessed in quite a few recent
  french books) to the list of classic classnames.
- Also bump crengine: CSS: fix parsing of multi classnames
  and attributes selectors
5 years ago
poire-z b0e127fd31 Adds "Generic web browser paragraph style" tweak 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 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 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
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
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 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 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
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
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