- height_adjust: if true, reduce height to a multiple of
line_height (for nicer centering)
- height_overflow_show_ellipsis: if height overflow, append
ellipsis to last shown line
(Implemented in both use_xtext and legacy code path.)
Use them in Menu.lua to clean up/shorten the code used for multiline
menu items by delegating the work to TextBoxWidget, or using
TextWidget when we end up needing only a single line.
Alternative code to size, split lines and draw text with
the help of the xtext Lua C module.
Enabled by default (can be disabled via an added menu
item in "Developer options").
New properties can be specified by calling widgets, only
used when xtext is used:
- lang: use specified language instead of the UI language
- para_direction_rtl: true/false to override the default
direction for the UI language
- auto_para_direction: detect direction of each paragraph
in text
- alignment_strict: prevent the inversion of the specified
alignment= that is done when a paragraph direction is
set or detected as RTL.
Also: fix possible memory leak (present even when not using xtext)
by calling :free() in onCloseWidget() like it's done in ImageWidget.
Alternative code to size and draw text with the help
of the xtext Lua C module.
Enabled by default (can be disabled via an added menu
item in "Developer options").
New properties can be specified by calling widgets, only
used when xtext is used:
- lang: use specified language instead of the UI language
- para_direction_rtl: true/false to override the default
direction for the UI language
- auto_para_direction: detect direction of each paragraph
in text
bump base for libkoreader-xtext.so:
- ffi/pic.lua: fix memory leak with some unsupported PNG files
- FreeType ffi: add methods for use with Harfbuzz shaping
- thirdparty: adds libunibreak
- Adds libkoreader-xtext.so: enhanced text shaping
Add a getFallbackFont(N) to each Lua font object to instantiate
(if not yet done) and return the Nth fallback font for the font.
Fallback fonts list: add NotoSansArabicUI-Regular.ttf
Add RenderText:getGlyphByIndex() to get a glyph bitmap by glyph
index, which is what we'll get from Harfbuzz shaping.
(RenderText:getGlyph() works with unicode charcode).
Tapping to turn page while some image is loading was
interrupting the image loading, but not turning the page,
since a82d7832 where using trap_widget=false is to be
used to not resend the event (while =nil does resend it).
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).
Avoid saving/getting "12.0" (as the lua-ljsqlite3 driver does),
and save/get "12" instead by properly converting it to a string
and back, as the config.value table column is of type TEXT.
* Restore '+' prefix when charging in the footer w/ letters prefixes
Regression since #5537
* Don't use a full battery icon in the menu entry
Make it clear that one isn't in-sync with the current gauge
* Unify battery meters look'n feel
Switch to proper (vertical) battery icons (one per 10% steps).
Fix#5535
* Bump fonts (https://github.com/koreader/koreader-fonts/pull/7)
Because we need the new symbols from nerdfonts ;).
- Use a hardcoded default value of 10 files per page.
- Save cover sizetag as "s<nb of items per page>" instead
of "s<item height>" so they are stable (and not re-fetched)
when switching between FileBrowser and History, which have
some small geometry differences.
- When showing History in landscape mode, decrease perpage
from the set value, so items don't look smaller.
- Use a step, larger with big items, when iterating and decreasing
font sizes to make text fit, to speed up the process a bit.
(used by bookmarks list and classic file browser)
When text is too long or line too tall:
first: we try to decrease the number of lines (eg from 3 to 2 and from 2 to 1 line)
second: when 1 line is too tall, we try to decrease font size (-1)
And at the end we try to add or remove chars to better fit text.
* Made Porting not so hilariously outdated.
* Minor tweaks to the macOS build instructions and the various quirks involved in getting it to behave (and accompanying actual build fixes).