dumbledore / AlbiteREADER

A feature-rich e-book reader for the Java Mobile platform. Currently works with txt, xhtml and epub files. Supported features include touch scrolling, images, styling and multilingual hyphenation, on-touch dictionaries, units converter, table of contents. Uses the Droid Serif font through it's own font implementation scheme.
http://albite.org/reader_j2me
72 stars 21 forks source link

Albite Reader is an open-source e-book reader for Java Mobile released under the Apache 2.0 License and developed by Svetlin Ankov. Works with EPUB, txt and (x)html files.

Implemented features

System requirements

Profile MIDP 2.0
Configuration CLDC 1.1
Optional packages File API (JSR-75)
Used heap memory depends on the version

Features in detail

Here goes a detailed review of all currently implemented features.

Bitmap Font

Bitmap font rendering is achieved through my own implementation. The font used, Droid Serif, has been pre-rendered in several different sizes: 12px, 14px, 16px, 18px, 24px and 28px. All have been anti-aliased except for the 12px version, which looks much better without it. Supported (or sometimes partially) character ranges are:

  1. Latin + Latin Supplement (191 chars)
  2. Latin Extended A (128 chars)
  3. Latin Extended B (10 chars)
  4. Spacing Modifier Letters (11 chars)
  5. Greek and Coptic (75 chars)
  6. Cyrillic (94 chars)
  7. Latin Extended Additional (12 chars)
  8. Greek Extended (1 char)
  9. General Punctuation (34 chars)
  10. Subscripts and Superscripts (1 char)
  11. Currency Symbols (4 chars)
  12. Letter-like Symbols (6 chars)
  13. Number Forms (4 chars)
  14. Mathematical Operators (12 chars)
  15. Geometric Shapes (1 chars)

Hyphenation

Hyphenation for 29 languages:

  1. Basque
  2. Bulgarian
  3. Catalan
  4. Croatian
  5. Czech
  6. Danish
  7. Dutch
  8. German
  9. Greek
  10. English
  11. Esperanto
  12. Estonian
  13. Finnish
  14. French
  15. Icelandic
  16. Indonesian
  17. Italian
  18. Latin
  19. Latvian
  20. Polish
  21. Portuguese
  22. Romanian
  23. Russian
  24. Slovene
  25. Spanish
  26. Swedish
  27. Turkish
  28. Ukrainian
  29. Welsh

Character Encodings

Support for 23 character encodings:

  1. UTF-8
  2. ASCII
  3. ISO-8859-1
  4. ISO-8859-2
  5. ISO-8859-3
  6. ISO-8859-4
  7. ISO-8859-5
  8. ISO-8859-7
  9. ISO-8859-9
  10. ISO-8859-10
  11. ISO-8859-13
  12. ISO-8859-14
  13. ISO-8859-15
  14. ISO-8859-16
  15. WINDOWS-1250
  16. WINDOWS-1251
  17. WINDOWS-1252
  18. WINDOWS-1253
  19. WINDOWS-1254
  20. WINDOWS-1257
  21. KOI8-R
  22. KOI8-RU
  23. KOI8-U

Unit conversion

Conversion between 80 units in 11 unit groups.

  1. Temperature
    1. C, K
    2. F, Degree of Frost
  2. Length
    1. mm, cm, dm, m, km
    2. mil, in, ft, yd, fm, ch, fur, mi, land
    3. cable, nautical mile
  3. Area
    1. mm2, cm2, dc2, m2, a, daa, ha, km2
    2. sq ft, sq yd, ac, sq mi
  4. Volume
    1. mL, L, mm3, cm3, dm3, m3
    2. fl oz, gi, pt, qt, gal
  5. Mass
    1. mg, g, kg, t
    2. gr, oz, lb, st, cwt, ton
  6. Velocity
    1. m/s, km/h
    2. fps, mph
    3. kn
  7. Pressure
    1. Pa, hPa, kPa, mbar, bar
    2. mmHg, inHg
    3. Atm
    4. psi
  8. Power
    1. mW, W, kW, MW
    2. HPS
  9. Energy
    1. Wh, kWh
    2. J
    3. cal
  10. Linear density
    1. DPI
    2. DPCM
  11. Angle
    1. rad
    2. deg

Images and styling

Portable book settings: the .alx and .alb files

After opening a book for the first time, Albite READER will create a file with the same name, but with an .alx extension. This is a binary file containing your book reading progress. This includes:

If you make any bookmarks in a book, Albite READER will also create a .alb file. This is a XML file which contains your bookmarked text and positions.

There are several advantages of this technique compared to the usual approach of using the RMS:

Used resources

APIs

kXML2

It's a BSD-licensed XML pull parser, especially adequate for Java Mobile. It's small and unobtrusive. You can read more at their homepage.

AlbiteZIP

It's a Java Mobile port of GNU Classpath's java.util.zip package using the AlbiteRandomReadingFile API, which implements a RandomAccessFile with writing capabilities stripped away. Reading EPUB files relies on AlbiteZIP to work with their archives. AlbiteZIP's sources and some sample code are available at GitHub.

AlbiteCharacterDecoder

Provides the ability read characters not natively supported by Java's InputStreamReader. The API is based on some code from libiconv. Sources, examples, tests and binaries are available at GitHub.

AlbiteUnits

A simple java API for converting various physical units. Sources and binaries at GitHub.

ZLTextTeXHyphenator

Zlibrary's hyphenator used in FBReaderJ. Licensed under GPL 2.

Fonts

Droid Serif

That's the font used on Android devices. It's quite nice and is built with the idea of rendering well on small screens and at small sizes. It supports some good amount of glyphs (around 500) and character ranges. It's licensed under the Apache 2.0 license. You can download the Droid fonts in TTF from here.

Hyphenation patterns

The used hyphenation patterns are the ones from TeX's site or some modified versions from FBReaderJ.

Current limitations

There are too many limited factors: your phone is limited, Java Mobile is limited and my personal time is limited. So, it points to the conclusion that Albite READER is limited, too. I'd like you to know of the current limitations, so that you can decide for yourself if they may stand in your way.