10-01-2018, 05:56 AM | #196 |
Evangelist
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
I'm releasing Plato 0.5.0 today.
Plato now has a built-in ePUB renderer, written from scratch, in addition to the renderer that mupdf provides. Although a few things are still missing (tables, lists, floats, borders, rtl, etc.), it seems to already have enough features to properly render most of the HTML and CSS encountered in ePUBs. The renderer uses absolute page numbers (one page for every 2048 bytes of markup). This allows me to only build the display list of the spine item that holds the current page number. The algorithm used to break paragraphs into lines is the Knuth-Plass algorithm (1981). More precisely, there are at most three passes: first we try without hyphenation ; if it fails we hyphenate using the Knuth-Liang algorithm ; if it still fails, we try with a simpler algorithm, that has no limits on the stretching of glues. By introducing optional breaks within a word, we might break a ligature. And if we later unbreak this ligature, we might end up with a line length that doesn't match the length that was used by the algorithm. The way I deal with this problem is by redistributing the width difference into the line's glues. Knuth and Plass solved this problem by generalizing the penalty primitive into a {Pre,No,Post}Break tuple. This is described in Document Preparation Systems, 1982, pp. 221–242): I don't have access to this paper. The CSS parser only supports simple selectors: name#id.class1.class2.⋯.classn and the following combinators: X > Y, X + Y. If you're interested in typography and high quality fonts, you'll be happy to know that font-feature-settings is supported. Finally, I thought it would be interesting to be able to achieve some of the constructions made possible by the box–glue–penalty primitives described in the original paper, and for this purpose, I've introduced the custom `-plato-insert-{before,after}` properties. The solution to the MR Problem, for example, can be transposed as: Code:
.flush-right { -plato-insert-before: penalty 10000, glue 0 100em, penalty 50, glue 1em, box, penalty 10000, glue 0 100em; -plato-insert-after: penalty -10000; } You can set the serif font family, font size, margin width, line height of a document. The default values are in the reader section of the settings. The font-path setting of the same section defines the location of the user fonts (the default is /mnt/onboard/fonts). The built-in ePUB engine is the default engine, the related setting, in the reader section is epub-engine, the possible values are "built-in" and "mupdf". Because the type of the refresh-every setting has changed, you'll need to remove it from your Settings.toml before you upgrade. Other changes:
|
10-01-2018, 10:57 AM | #197 |
Addict
Posts: 285
Karma: 3762916
Join Date: Nov 2011
Device: none
|
Just wanted to say this is an impressive project and to thank you for all the work you continue to put into it!
|
Advert | |
|
10-01-2018, 09:11 PM | #198 |
Wizard
Posts: 2,736
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Your ePub renderer is really impressive. The code looks quite nice, and it actually works well for most of my books. I especially like the way you handled the layout. Keep up the great work!
|
10-02-2018, 02:19 AM | #199 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Oct 2018
Device: Kobo Clara HD
|
Hello,
I am not a big fan of KSM or other menus and I use my Kobo mainly for XCSoar. How can I run Plato directly from command line ?(So I can add a menu item for running Plato to my XCSoar build) When I run it like './plato' its giving this error: Quote:
Another edit: If I don't stop nickel, nickel and plato are racing for touch events and screen updates. If I stop it, plato's ui renders very small and can't handle touch correctly any ideas? Last edited by neoberg; 10-02-2018 at 02:29 AM. |
|
10-02-2018, 04:50 AM | #200 | |
Evangelist
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
Quote:
The binary needs a few environment variables and all the resources included in plato-0.5.0.zip. |
|
Advert | |
|
10-02-2018, 06:10 AM | #201 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Oct 2018
Device: Kobo Clara HD
|
Quote:
Last edited by neoberg; 10-02-2018 at 06:12 AM. |
|
10-06-2018, 08:20 AM | #202 |
Bottom Text
Posts: 146
Karma: 332882
Join Date: Nov 2016
Device: Kobo Clara HD, Kobo Glo HD
|
Hi baskerville,
I wanted to congratulate you on making such a nice application, and add that it works well on the Clara HD. If you need anything tested, I'm more than willing to help. |
10-06-2018, 08:39 AM | #203 | |
absolute beginner
Posts: 323
Karma: 1750999
Join Date: May 2017
Location: Go with the wind (43°19'17.7"N 2°00'19.4"W)
Device: ka1
|
Quote:
Good luck. |
|
10-08-2018, 09:12 AM | #204 |
Evangelist
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
Plato 0.5.1 was released.
I should have mentioned this earlier, although I don't think it will have a tremendous impact on the user experience, but the built-in ePUB renderer will not work with books with more than 2 million pages. |
10-09-2018, 08:31 AM | #205 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Jul 2018
Device: Kobo Aura One
|
Is it possible to put the menus in Spanish?
|
10-09-2018, 04:00 PM | #206 |
Zealot
Posts: 120
Karma: 33696
Join Date: Dec 2016
Location: Germany
Device: Kobo: Libra 2, Aura One, Glo HD, Clara 2E
|
A step-by-step guide for novices would be beneficial. The guide on github is not for people who are no developers. plato.sh? plato.png? Where do I find it???? A bit confusing to me.
|
10-10-2018, 07:08 AM | #207 |
absolute beginner
Posts: 323
Karma: 1750999
Join Date: May 2017
Location: Go with the wind (43°19'17.7"N 2°00'19.4"W)
Device: ka1
|
KFMON
* Extract the full content of kfmon archive into the root directory of your device. * Extract the content of the zip into the .adds/plato directory of your device. * You need a /.adds/kfmon/config/plato.ini and an /icons/plato.png. * Eject and unplug your device. The guide for KSM and fmon. Good luck. |
10-10-2018, 10:59 AM | #208 |
Member
Posts: 21
Karma: 10
Join Date: Oct 2018
Device: Kobo Glo Clara HD
|
Plato 0.5.1 Frontlight
Hi,
First I would like to congratulate you on this project. It is a real pleasure to use with a very attractive appearance and 'feel'. But, I just installed version 0.5.1 on my Glo and the the frontlight no longer works. Pressing the light icon does nothing. I reverted to v 0.5.0 and the light works. Any ideas on what I should try to isolate the problem? My environment is: Kobo Glo Software v 4.8.11073 (b628114af7,5/8/18) KFMon v 1.2.6-1-g9ab7d3a Thanks! |
10-10-2018, 12:13 PM | #209 |
Evangelist
Posts: 443
Karma: 305160
Join Date: Aug 2015
Device: Kobo Glo HD, Kobo Aura ONE
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PocketBook-KOReader: a document reader for PDF, DJVU, EPUB, FB2, CBZ, ... (AGPLv3) | chrox | KOReader | 566 | 04-19-2024 05:28 AM |
KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) | hawhill | Kindle Developer's Corner | 1268 | 02-27-2024 11:49 AM |
Kindle -- KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) | hawhill | KOReader | 1219 | 01-27-2024 02:29 PM |
v3 vs. v3+ as a pdf/DjVu reader | hedonism_bot | HanLin eBook | 7 | 11-02-2010 08:16 PM |