Commit Graph

1218 Commits (c7b4cf71f808a40d2461bac4e02bf8d2d4127327)
 

Author SHA1 Message Date
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
12 years ago
Tigran Aivazian 379cba7b68 Pass the boolean `kerning` to renderUtf8Text()
The last argument of renderUtf8Text() accepts only boolean values of
`kerning`.
12 years ago
Dobrica Pavlinušić 1ced4ceb17 Merge pull request #376 from tigran123/nupogodi-inform
Switch to new InfoMessage API (from NuPogodi).
12 years ago
{Qingping,Dave} Hou d916c55a87 Merge pull request #380 from tigran123/master
TTS in EMU and PDF/DjVu info cleanup.
12 years ago
Tigran Aivazian e541a378a2 Flush the time/battery info to the right for PDF
Do the same for PDF that I have done for DjVu, to be consistent.
12 years ago
Tigran Aivazian ca5be5c0e6 Merge branch 'djvu-info' 12 years ago
Tigran Aivazian 4945994516 Flush the date/time and battery info to the right.
Because it looks nicer that way.
12 years ago
Tigran Aivazian 1dccc29c7d Show the current rendering mode in DjVu info
Although the current rendering mode can also be ascertained by pressing
"R" and noting the current position in the menu, it is convenient to
show it alongside the page type in the Menu status info.
12 years ago
Tigran Aivazian 5eeda016a9 Mention patch in the pre-requisites for building.
On FC17 patch(1) command is not installed by default.
12 years ago
Tigran Aivazian 683ec7570c Enable TTS for the emulator.
On the PC in the EMU mode we can run espeak command which has the same interface as say
on Kindle.
12 years ago
{Qingping,Dave} Hou d1d6cdb056 Merge pull request #379 from tigran123/master
Use only Back (not Home) for exiting from Help screens
12 years ago
Tigran Aivazian a5032046d3 Don't use Home to exit Help page.
It is a bad idea to use too many keys for the same function and also do
this non-uniformly (i.e. not in all contexts). The info at the bottom of
Help screen says "Back to close this page", so only KEY_BACK (but not
KEY_HOME) should serve this purpose. And if the user pressed Home twice
then the whole application would exit, so using Home here is a bad idea.
12 years ago
Dobrica Pavlinušić 4716321b0a Merge pull request #377 from tigran123/nupogodi-filesearcher
Improvements to filesearcher from NuPogodi
12 years ago
NuPogodi 5a493c141f Improvements to filesearcher from NuPogodi
1. Initialize self.commands only once
2. Corrections to hotkeys: added fast jumps to item at position 0%,
10%, ... 100% by Alt+Q, W, ... P
3. Added fast jump to page entered via inputbox (by G)
4. Cleanup of function descriptions and to hotkeys.
5. Added a function deleteFoundFile(full_filename) used by KEY_DEL
handler.
12 years ago
NuPogodi 81cb3a1f25 Switch unireader.lua to new InfoMessage:inform() 12 years ago
NuPogodi 55f4c278b7 Switch to new InfoMessage API from NuPogodi.
Convert the three files crereader.lua filehistory.lua fileinfo.lua to
use the new InfoMessage:inform() API.
12 years ago
{Qingping,Dave} Hou f7040b30af Merge pull request #375 from tigran123/nupogodi
Fixed search in history with empty pattern (from NuPogodi).
12 years ago
NuPogodi 10592c68b0 Fixed search with empty pattern (from NuPogodi). 12 years ago
{Qingping,Dave} Hou 17acaa27b5 Merge pull request #374 from tigran123/djvu-menu-info
Display DjVu info in the status line.
12 years ago
Tigran Aivazian 77273a84a7 Decrease the step for gamma to 10%.
The current step of 25% forward and 20% backward is too big and does not
let us come close enough to the design value of 2.2 for most djvu files.
With 10% step we can get much closer.
12 years ago
Tigran Aivazian 057c461e7d Display DjVu info in the status line.
The DjVu info shown in the status line includes:
1. Physical page dimensions.
2. Current value of gamma and (in square brackets) the value of the
display for which the page was designed.
3. Page resolution (in dpi).
4. Page type.
For the end-user probably the most useful bit is the page type as it
helps him decide which rendering mode to choose for this page (and also
explains why he can't see anything on the page --- e.g. when rendering
some COMPOUND or PHOTO pages in B&W mode). For the developer the
physical page dimensions are also interesting as they allow to estimate
the amount of time needed for page decoding and cache efficiency.
12 years ago
Tigran Aivazian c7b82f938a First stage of improving the DjVu status info. 12 years ago
Dobrica Pavlinušić 20e4b55965 Merge pull request #371 from tigran123/master
Prevent crash when opening a stale history entry
12 years ago
Tigran Aivazian 723be220ac Tidy up the previous commit.
I didn't realize that the voice message is optional, so the last
argument can be deleted, i.e. in this case the voice message can be the
same as the text one.
12 years ago
Tigran Aivazian c13a1553f4 Prevent crash when opening stale history entry.
This fixes the issue #370 raised by dracodoc.
When the user removes or renames the book which was previously opened
and tries to open it again via (now stale) history entry we are passing
the filename of a non-existent file to the format-specific
:openDocument() method and the behaviour depends on the format. For PDF
and DjVu files it is okay --- they just return an error, but for the
crengine files (ebooks) we get a coredump.
Anyway, the proper solution is to not attempt to open a non-existent
file but give a more meaningful message (than, for example:
"ddjvu: **Unrecognized DjVu Me" for DjVu case) which informs the user
that the history entry is stale. If he has valuable data in it (such as
highlights, etc) he can save them, otherwise he can delete the history
entry there and then.
12 years ago
Dobrica Pavlinušić 48fba48206 Merge pull request #369 from tigran123/master
Small typo that wasted millions of instructions...
12 years ago
Tigran Aivazian a2970bafad Change print() to Debug for "Unknown direction!" message. 12 years ago
Tigran Aivazian 8f68227c3c Small typo that wasted millions of instructions.
Now that #define CRENGINE_DEBUG is handled correctly, all those pesky
messages from crengine are gone and so the performance of crereader
should be much better --- remember that under some circumstances
crengine generates literally THOUSANDS of debug messages per second
(e.g. when complaining about corrupt TOC nodes and there are _plenty_ of
fb2 files out there which have an invalid structure).
12 years ago
{Qingping,Dave} Hou d3c6ac816b Merge pull request #368 from tigran123/master
Kill "Retrieving TOC..." message and simplify code.
12 years ago
Tigran Aivazian f2443a7d33 Kill "Retrieving TOC..." message and simplify code.
After some consideration I believe that it is best to get rid of
"Retrieving TOC..." message altogether on the following grounds:
1. The code in unireader.lua/crereader.lua that has to deal with this
specifically can be removed.
2. The fillToc() is a data manipulation function and ought not to touch
graphical state.
3. The files for which retrieving TOC can take a long time are
_exceptionally_ rare (only two are known to me --- both are my own
editions with detailed morphological tags which require massive
hierarchical TOC for quick navigation)
4. Users are going to be confused when they press Menu for the first
time and see "Retrieving TOC..." staying on the screen until they press
Menu again.
12 years ago
{Qingping,Dave} Hou f011bdc358 Merge pull request #366 from tigran123/master
Kill getDiskSizeInfo() function and make only Back (not Home) return from Search.
12 years ago
Tigran Aivazian d1d955f3a4 Make only Back (not Home) return from Search Results.
It is best to restrict Home to only exit from the application (or
perhaps also for closing the document, though even this is doubtful) and
not use it in any other context, because otherwise pressing Home too
many times may inadvertently exit the application and annoy the user.
It is a bad practice to let user try various keys in different contexts
and hope that one of them may work.
12 years ago
Tigran Aivazian f3306d5512 Kill getDiskSizeInfo() function.
Instead of making an extra function call, packing return values in key'd
values of a table and then use two table indexing operations, just call
util.df(".") directly from FileInfo:formatDiskSizeInfo() and use its two
return values appropriately.
12 years ago
{Qingping,Dave} Hou 8308ce0218 Merge pull request #363 from NiLuJe/master
Bunch of Makefile fixes
12 years ago
{Qingping,Dave} Hou 6e9b809238 Merge pull request #364 from tigran123/master
Small fixes to "Last Documents" dialog.
12 years ago
Tigran Aivazian 8107d84e9e Cleanup crereader fonts initialization.
Don't try to register the two fonts Dingbats.cff and StandardSymL.cff
with crengine because it will reject them anyway. But we cannot simply
remove these two fonts because they are used internally by mupdf to
emulate "builtin" fonts which are mandated by Adobe PDF specification to
be present in every valid implementation.
12 years ago
Tigran Aivazian 37099d81f1 Fixes to "Last Documents" dialog.
1. Remove ".." entry as unnecessary waste of (rather limited) space.
Pressing KEY_BACK returns the user from this dialog, so there is no need
for the ".." entry.
2. Simplify FileHistory:init() function as it does not really need the
argument --- our history location is fixed and hardcoded.
3. Remove KEY_HOME quit key from history command handlers. Pressing Home
key too many times would cause the application to exit, which is
very annoying.
4. Show the number of items in the header next to "Last Documents".
12 years ago
NiLuJe fab4b29502 More comments on the whole unaligned access mess on FW 2.x. Don't even
think about setting the alignment trap to a mode that includes warn,
that simply kills the performance because of the storm of faults the
syslog gets...
12 years ago
NiLuJe 9cc3438fd2 Yep, -mno-unaligned-access is definitely needed with a GCC 4.7
ToolChain, the kernel used on FW 2.x is too old to handle unaligned
accesses properly.
12 years ago
NiLuJe 1f2b85e0de It's a spaaaaace! 12 years ago
NiLuJe aa68e5250a Quote that to avoid potential issues... 12 years ago
NiLuJe ef94d27084 We don't need you, either, in EMU... 12 years ago
NiLuJe 1606cc195d We don't need those two in EMU ;). 12 years ago
NiLuJe 566d081503 Slightly nicer fix for building mupdf's .host stuff with CFLAGS in the env. 12 years ago
NiLuJe c38c6dbea4 Add a note about -mno-unaligned-access (check my x-compile.sh script for
more details, I'll revisit this once Linaro 2012.10 comes out).
12 years ago
NiLuJe 2d5c952749 Split the backward compat stuff between CFLAGS/CXXFLAGS 12 years ago
NiLuJe bd306da170 Don't use the backward compat flags on the host. Move to a dedicated
variable, with a few comments to explain ;).
12 years ago
NiLuJe c312eaabf1 Add -fno-finite-math-only (after -ffast-math) to the ARM flags to avoid
MG 2012.03 pulling GLIBC_2.15 symbols from libm (because -ffast-math asks
for it).
I didn't see this on my own TC because it's using a much older glibc version (2.9).
12 years ago
NiLuJe 50386743ec revert the whole 'let's use ld' thing. It's useless, and might wreak
havoc on EMU builds picking up system libs instead of the bundled ones.
12 years ago
NiLuJe 29878a0a90 Make sure we're always building luajit statically, so ld doesn't pick a
shared version. Of course that explained the size difference :D.
12 years ago