Commit Graph

28 Commits (503b2073ce361b9d3285cf533888e1b311fb79eb)

Author SHA1 Message Date
Qingping Hou 6fccb610c4 doc: update rendertext 8 years ago
Qingping Hou 3bec9cea89 ui(kvpage) truncate title/key/value if it's too long 8 years ago
Qingping Hou e410ce14df doc: types/functions for font and rendertext module 8 years ago
Qingping Hou 11ee8d6fcc refactor: use new KeyValuePage widget for displaying statistics 8 years ago
frankyifei 059de23037 implement GUI dialog for setting crengine fallback font 9 years ago
Qingping Hou 186673587e chore: fix some of the luacheck errors 9 years ago
Hans-Werner Hilse a82bafc63c fix handling of invalid UTF8 sequences
external data (and in bad cases our own) can contain invalid byte
sequences in UTF8 strings. A prominent example are file names.
There was a 1-off bug in calculating the allowed length for multibyte
chars, and the iterator was a bit too greedy when stumbling upon
invalid sequences, returning a single "invalid" char for a sequence
up to the point where it became invalid in calculation. Now, we present
one invalid char for the first byte of that sequence and then check
for a valid char starting with the next byte.
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
Hans-Werner Hilse 5982e24d57 unify color specification
colors were a mixture of 4bpp integers (0=white, 15=black) and
fractional blackness levels (0=white, 1.0=black) before. This is
now unified to use the color specification of the Blitbuffer API.
10 years ago
Hans-Werner Hilse 7b1777e095 adapt widgets and text rendering to new font rendering
no background for text rendering anymore
10 years ago
Hans-Werner Hilse adbcdddb56 undo wrong use of addblitFrom()
rendertext.lua did use addblitFrom() for rendering text - i.e. blitting
the letters to a BlitBuffer. However, it used intensity=1.0, which is
the same as doing a (faster, more efficient) blitFrom(). So use that
instead.

What was probably intented here is a different kind of blitting - using
the bitbuffer of the glyph as a mask.
10 years ago
chrox 56fa8a45b7 remove rescaleByDPI since it's not reversible
alternatively we store the original size before scaling by screen DPI
and use that value when needed.
10 years ago
chrox 92219a1f1e cleanup: expand tab to 4 spaces 10 years ago
chrox 24ed02bbee add bold property for text rendering 10 years ago
Paulo Matias 9072a30cb5 Avoid off-limits dictionary title and make font size adjustable 10 years ago
chrox 63d574c3b5 less verbose on fallback text rendering 11 years ago
chrox 4cfdce6105 fix several local calls of Math.round 11 years ago
HW 09cd5c4104 Make DEBUG a require()d local 11 years ago
HW ef111b99c6 Refactored to use strictly locals 11 years ago
chrox 3f3e434157 rescale font size when fallbacks to fallback fonts
and make FreeSerif font the default font instead of DroidSansFallback

This patch should fix #272.
11 years ago
HW 25faf7e1a4 fixed bugs in implementation of utf8Chars() 11 years ago
HW 61c232e0e9 add a UTF8 character iterator
this speeds up font rendering since LuaJIT doesn't have to use
the interpreter for string.gsub(), which was used before
11 years ago
chrox bbfa6428aa add glyph fallbacks
if glyph is not found in specified fontface, fallback fonts are checked
on by one until a glyph is found.
11 years ago
chrox 01f045e7f9 add standalone glyph cache
I found it will be especially helpful to cache glyph separately
so that glyph caches won't be washed out by a single page cache.
11 years ago
chrox 26e2435fc6 render text with background and foreground 'color' 11 years ago
Qingping Hou e3b567b2b1 fix kerning for Utf8Text family methods from tigran123
refer to master pullrequest #386 and #383, related
commits are (all in master(kpv) tree):
cb25029ddd
c7b4cf71f8
379cba7b68
12 years ago
HW 60ccd7441e fixed menu info displaying, replaced debug() by DEBUG()
the replacement of debug() was necessary to be able to access the lua library "debug" (for backtraces etc.)
12 years ago
HW 9e531fc2db file reorganisation
all lua frontend files are now in the frontend/ directory.
all old code is cleaned up.
12 years ago