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.
This commit is contained in:
poire-z
2018-12-05 13:01:49 +01:00
parent ed8f87f9f4
commit ea946d52d6
9 changed files with 85 additions and 45 deletions

View File

@@ -191,40 +191,72 @@ h1, h2, h3, h4, h5, h6 { hyphens: none !important; }
{
title = _("Miscellaneous"),
{
id = "table_row_odd_even";
title = _("Alternate background color of table rows"),
css = [[
title = _("Tables"),
{
id = "table_full_width";
title = _("Full-width tables"),
description = _("Make table expand to the full width of the page. (Tables with small content now use only the width needed to display that content. This restores the previous behavior.)"),
css = [[table { width: 100% !important; }]],
},
{
id = "table_td_width_auto";
title = _("Ignore publisher table and cell widths"),
description = _("Ignore table and cells widths specified by the publisher, and let the engine decide the most appropriate widths."),
css = [[table, td, th { width: auto !important; }]],
},
{
id = "table_margin_left_right_auto";
title = _("Center small tables"),
description = _("Horizontally center tables that do not use the full page width."),
css = [[table { margin-left: auto !important; margin-right: auto !important; }]],
separator = true,
},
{
id = "td_vertical_align_none";
title = _("Ignore publisher vertical alignment in tables"),
-- Using "vertical-align: top" would vertical-align children text nodes to top.
-- "vertical-align: baseline" has no meaning in table rendering, and is as fine
css = [[td { vertical-align: baseline !important; }]],
},
{
id = "table_row_odd_even";
title = _("Alternate background color of table rows"),
css = [[
tr:nth-child(odd) { background-color: #EEE !important; }
tr:nth-child(even) { background-color: #CCC !important; }
]],
},
{
id = "table_force_border";
title = _("Show borders on all tables"),
css = [[
]],
},
{
id = "table_force_border";
title = _("Show borders on all tables"),
css = [[
table, tcaption, tr, th, td { border: black solid 1px; border-collapse: collapse; }
]],
separator = true,
]],
separator = true,
},
},
{
id = "image_full_width";
title = _("Make images full width"),
description = _("Useful for books containing only images, when they are smaller than your screen. May stretch images in some cases."),
-- This helped me once with a book. Will mess with aspect ratio
-- when images have a style="width: NNpx; heigh: NNpx"
css = [[
title = _("Images"),
{
id = "image_full_width";
title = _("Full-width images"),
description = _("Useful for books containing only images, when they are smaller than your screen. May stretch images in some cases."),
-- This helped me once with a book. Will mess with aspect ratio
-- when images have a style="width: NNpx; heigh: NNpx"
css = [[
img {
text-align: center !important;
text-indent: 0px !important;
display: block !important;
width: 100% !important;
}
]],
},
{
id = "image_valign_middle";
title = _("Vertically center-align images relative to text"),
css = [[img { vertical-align: middle; }]],
]],
},
{
id = "image_valign_middle";
title = _("Vertically center-align images relative to text"),
css = [[img { vertical-align: middle; }]],
},
},
},
-- No current need for workarounds