2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

26 Commits

Author SHA1 Message Date
Tigran Aivazian
1dec3def12 Fix for the memory corruption issue #401
In the function renderUtf8Text() I added a variable buffer_width which
was intended to be local but I forgot the keyword "local" in front of
it. This overwrote whatever global "buffer_width" there might be and
caused a serious memory corruption described in issue #401. Although
grepping our *.lua sources did not reveal any "buffer_width" variable I
assume that there is one elsewhere (i.e. Lua's own internal namespace is
"pollutable" by user's code) because this little change definitely does
make an awful amount of difference...
2012-10-09 23:10:28 +01:00
Tigran Aivazian
cb25029ddd Fix the kerning check in renderUtf8TextWidth()
This is a completion of my fixes that went into PR \#383.
In the function renderUtf8TextWidth() the check for kerning was
meaningless (always true).
2012-10-07 16:00:41 +01:00
Tigran Aivazian
c7b4cf71f8 Fix the kerning logic in text size/rendering.
1. Fix the functions sizeUtf8Text(), renderUtf8Text() and
renderUtf8TextWidth() to have a meaningful test whether to kern or not
(the current code is meaningless as it contains the `else` clause that is never
executed).
2. Whitespace changes to filechooser.lua
2012-10-07 12:28:22 +01:00
NuPogodi
20fae9369e Update rendertext.lua
Minor modification in function renderUtf8Multiline(...) to solve Issue #214
2012-08-29 15:42:20 +02:00
HW
0d12ff70cd rename debug() to Debug() to stop clashing with the debug submodule from Lua 2012-06-04 00:49:23 +02:00
HW
e35339a398 fixed wrong escape sequences in strings
again, LuaJIT will choke on these, Lua-5.1.n did just ignore them
2012-06-03 01:52:16 +02:00
HW
4d2036fa7b bugfix for #185, close #185 2012-06-02 23:09:59 +02:00
Dobrica Pavlinusic
9de055eb5d fix glymp caching name
With recent changes in font selector, we where hitting
glyphcache_max_memsize so glyphcache[k].glyph.bb:free() got
invoked and crashed reader.
2012-05-20 00:52:50 +02:00
NuPogodi
cd046a0637 Update rendertext.lua 2012-05-16 16:29:33 +03:00
Qingping Hou
8d74649642 adjust wording 2012-04-20 18:29:08 +08:00
Qingping Hou
3306346dba use debug to print debug info 2012-04-19 00:16:49 +08:00
traycold
429f572827 modification to take into account new version of mupdf 2012-04-16 00:10:41 +02:00
traycold
02dd9b023f Merge remote branch 'hwhw/master'
* hwhw/master: (183 commits)
  show infomessage on document open
  use InfoMessage for empty TOC, jump history and highlights
  copy resources dir on customupdate
  add resource: info icon
  display document open error message
  added infomessage dialog implementation
  bugfix, removed old test constant
  Added widget abstraction framework
  added interface to get blitbuffers from JPEG/PNG files
  fix typo
  added reading of pan_margin settings
  fix full screen refresh command, close #99
  add: sleep and usleep in util module
  fix: add back KEY_FW{LEFT,RIGHT} commands to NumInputBox
  reverted removal of last-doc shortcut, introduced framework restart
  kill our own child process. not quite finished.
  added line spacing setting for crereader
  remove page:getPageText debug dump to improve performance on device
  remove page:getPageText debug dump to improve performance on device
  display crash.log on error
  ...

Conflicts:
	ft.c
	helppage.lua
	inputbox.lua
	rendertext.lua
	rendertext_example.lua
	unireader.lua
2012-04-16 00:08:19 +02:00
traycold
6c9ec8c896 refactoring for display help page 2012-04-15 16:07:39 +02:00
HW
ec2eda0c05 switched font handling to only work with external fonts
now you can use a environment variable, FONTDIR, to point
to a font dir. Otherwise, "./fonts" is used by default.
Subdirectories are indexed.
2012-04-09 19:04:26 +02:00
traycold
ce30d9c652 use font metric to better display help page (to exted to other pages in future) 2012-03-20 23:28:49 +01:00
traycold
81f99e4921 Merge remote branch 'origin/master' into txt
* origin/master:
  using font module for getting fonts (commit f95231d789)
  Password input, handling for broken documents
  factored pages count out, better error and password handling
  factored pages counter out of document struct
  make muPDF cache size configurable from Lua
  add XPS and CBZ support (muPDF provides this)
  fixed bug for odd rendering widths
  refactored muPDF integration to use strictly the fitz.h API
  forgot Makefile change when factoring out drawcontext
  fix a Lua 5.0 syntax that was deprecated in 5.1
  separate DC out of pdf.c and djvu.c (cleanup)
  removed obsolete page rotation handling, closes #70
  allow easier customization of toolchain for libdjvu
  fix: remove page number checking in displaying TOC
  fix: handle LPGBCK and LPGFWD in selectmenu
2012-03-20 22:53:20 +01:00
traycold
bfcad367bb using font module for getting fonts (commit f95231d789)
renamed function names using camelCase (issue #62)
2012-03-20 20:15:24 +01:00
traycold
c11ecce55a draft commit, test implementation 2012-03-19 19:41:09 +01:00
traycold
943b511b7c complete implementation of issue #55
created a help page
2012-03-13 22:51:25 +01:00
Dobrica Pavlinusic
c470c0328a renderUtf8Text shouldn't die witout a text
this is exposed by #38 and #40
2012-03-06 12:32:15 +01:00
HW
affc3b231a major overhaul of the code structure, more OO like 2011-12-08 00:45:39 +01:00
HW
f739baff5f moved blitting over to blitbuffer API
the framebuffer "object" now has a "member" that exposes the blitbuffer
API for the framebuffer pixmap. This allows to reuse blitting & Co for
blitbuffer-to-blitbuffer operations
2011-12-02 01:31:13 +01:00
HW
a02ae3a460 Added kerning for rendering text 2011-12-01 16:11:43 +01:00
HW
b38b75298a fixed blitting for uneven horizontal offsets/dests 2011-12-01 14:28:10 +01:00
HW
f307264fb6 added freetype text rendering (still buggy)
this allows to render glyphs and also brings a simple
engine for rendering UTF-8 strings onto the framebuffer.
blitting to uneven offset is implemented here, too, but
needs more work and is still buggy.

In the end, this will allow for a simple GUI.
2011-12-01 01:35:53 +01:00