Aqua-Soft Forums: On Screen - Reader Project - Aqua-Soft Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

On Screen - Reader Project Rate Topic: -----

#1 User is offline   atreiu Icon

  • Group: Member
  • Posts: 510
  • Joined: 01-November 08

Posted 22 February 2009 - 12:46 PM

Hi Developers ;),

I want to discuss an Application, that I'm thinking about these days... I haven't started yet, I only have the idea, and need some ideas on how to approach the realization.

Programming language will be Delphi, Windows the OS. Main Target Systems are "Netbook" Computers (Small Laptops with lower Screen resolution and lower performance).

Project Description:
I'm a big fan of Free Books and Literature, like they are available on Wikisource.org etc. One thing i really miss while reading Text online, is the aesthetic feeling. Reading a text like this in the browser is just not very pleasing.
So i want to write an Application, that shows any plain-text (maybe rtf, too) in a beautiful and book-like way. With pages, nice font & paragraphs and a page-flapping animation. It should be VERY easy to handle (not many options/customization for the end-users). It shall behave similar to this flash-application. Possible additional features would be things like: bookmarks, highlighting, search, different themes...

Questions to you:
  • Do you think, such an App would be useful? Or is there already a good solution available?
  • How should I show the Text? Should I use TMemo, try to draw it myself on a Canvas (much more difficult), or do you know another component i could use?
  • How can i realize the page-flapping?
  • Any other ideas about this project?

Thanks, Atreiu.

This post has been edited by atreiu: 22 February 2009 - 12:47 PM

0

#2 User is offline   matonga Icon

  • Group: Developers
  • Posts: 1,286
  • Joined: 04-September 06

Posted 22 February 2009 - 03:40 PM

View Postatreiu, on Feb 22nd 2009, 09:46 AM, said:

Questions to you:
  • Do you think, such an App would be useful? Or is there already a good solution available?
  • How should I show the Text? Should I use TMemo, try to draw it myself on a Canvas (much more difficult), or do you know another component i could use?
  • How can i realize the page-flapping?
  • Any other ideas about this project?

Thanks, Atreiu.


  • Boy, I think this is a really great idea!
  • If I where you I'd definitely use GdiPlus and text antialias without hinting. Font size should be big (but not too big), line inter-spacing should be about 150%, lines should change background color on hover, and font name should not be Arial, Times or Tahoma/Verdana but rather some custom font, a serif font. Of course this would be the defaults and the user would be able to customize all that.
  • May I implement that for you with DirectX? :)
  • Oops... ok, get some of comments in above lines and put them here.


I'd like to write more, but there is a barbecue going on here and... sorry... must leave... food!!!
0

#3 User is offline   atreiu Icon

  • Group: Member
  • Posts: 510
  • Joined: 01-November 08

Posted 22 February 2009 - 05:38 PM

View Postmatonga, on Feb 22nd 2009, 04:40 PM, said:

  • Boy, I think this is a really great idea!
  • If I where you I'd definitely use GdiPlus and text antialias without hinting. Font size should be big (but not too big), line inter-spacing should be about 150%, lines should change background color on hover, and font name should not be Arial, Times or Tahoma/Verdana but rather some custom font, a serif font. Of course this would be the defaults and the user would be able to customize all that.
  • May I implement that for you with DirectX? :)
  • Oops... ok, get some of comments in above lines and put them here.

I'd like to write more, but there is a barbecue going on here and... sorry... must leave... food!!!

Hey Matonga,

Sure, it would be great if you could implement the flapping :) Yeah, Gdi+ was what i thought, too. I'm only frightened how to do intends, spacings etc... But I'll try. I will do some Interface-Sketches and maybe start with the coding in the next days, then post my progress here. For Your DirectX flapping, I guess you will need the GBitmaps of the currently shown and the previous/next pages, right?

Cheers and Bon Appetite ;)
0

#4 User is offline   atreiu Icon

  • Group: Member
  • Posts: 510
  • Joined: 01-November 08

Posted 23 February 2009 - 09:33 AM

Does anybody know how to draw a String with Alignment = Justify via GDIPlus?

PS: I attached 2 interface-sketches

Attached File(s)


0

#5 User is offline   dreadnaut Icon

  • Group: Member
  • Posts: 614
  • Joined: 28-September 04

Posted 23 February 2009 - 01:28 PM

View Postatreiu, on Feb 23rd 2009, 10:33 AM, said:

Does anybody know how to draw a String with Alignment = Justify via GDIPlus?

PS: I attached 2 interface-sketches


I would suggest smaller widgets, and longer lines: around 11-14 words per line is supposed to be the best. Justification is good for eye-candy, but not necessary for ease of use - if you can't do it properly, avoiding vertical trails, just go for left-justified.
0

#6 User is offline   matonga Icon

  • Group: Developers
  • Posts: 1,286
  • Joined: 04-September 06

Posted 23 February 2009 - 02:01 PM

I think the sketches are perfect as they are.

Short lines (no more than about 10 words per line) allow for easy speed reading (http://en.wikipedia....i/Speed_reading).

For justifying text with GDI+ I guess you'll have to use MeasureString for each word and do the spacing manually (yeah, I know: itsucks... plus it breaks precise word interspacing with antialias).

Also, it would be good to incorporate then extra inter-spacing after commas, dots, and other punctuation signs.

I'll see if I can come with a demo this afternoon.

Let's stay tuned.

It would be good to have this project developed with gcc and sdl, to be able to compile it for Mac OS X (and Linux) (I dunno there is a text reader like this for any platform). But I think this is asking too much.

@atreiu:

Yeah, I will need four GpBitmaps really:

Current two pages (as seen in your screenshot), and next two pages (the back of the right side page, and the front of the next page).

I'll post a demo on that too.
0

#7 User is offline   atreiu Icon

  • Group: Member
  • Posts: 510
  • Joined: 01-November 08

Posted 23 February 2009 - 03:02 PM

@Matonga:
Thanks for the Info!

I would love to make this platform independent, but I never coded in C++ or C before, so I can't really use GCC, and I never did something platform independent before. Anyway, this might be a good chance to try it, even if it will take a lot longer :D

Have you any experience in X-Coding with Lazarus? This could be my first choice. SDL supports Pascal, so there should be no problem here (besides, that this is new for me, too ;) )
0

#8 User is offline   matonga Icon

  • Group: Developers
  • Posts: 1,286
  • Joined: 04-September 06

Posted 23 February 2009 - 03:34 PM

Yeah, but if I were you I would just do this app for Windows as usual.

Later we can try to write an open-source cross-platform version of it. If you want to go the pascal way there too, I'd suggest using FreePascal instead.

Also, Cairo Graphics is a good cross-platform alternative to the way GDI+ renders antialiased text and graphics. And OpenGL can be used for page animation and displaying of user interface... mmm... this begins really complicated.

Please write the Windows version first, or this app may never see the light (I mean, be even pre-beta released). :P
0

#9 User is offline   herd Icon

  • Group: Developers
  • Posts: 999
  • Joined: 02-November 03

Posted 23 February 2009 - 10:53 PM

Hi,

good idea indeed.
Given the low resolution of netbooks, perhaps fitting two pages is not
the best idea: Consider rotating one page 90°s and let the user hold the lightweight
netbook like a real book...

If it's really going to be cross platform, starting with the Linux version and cross-compiling
from there on would be better route to go, like pidgin, gimp and inkscape already do.
0

#10 User is offline   matonga Icon

  • Group: Developers
  • Posts: 1,286
  • Joined: 04-September 06

Posted 23 February 2009 - 11:47 PM

View Postherd, on Feb 23rd 2009, 07:53 PM, said:

If it's really going to be cross platform, starting with the Linux version and cross-compiling
from there on would be better route to go, like pidgin, gimp and inkscape already do.


Why? Why start with Linux version first, when you can start with fully cross-platfrom from scratch? An app using SDL, gcc, OpenGL and stdio/stdlib/string can be truly cross-platfrom without requiring additional code (maybe just different LDFLAGS for each platform in the Makefile).

Posted Image

Edit:

@atreiu:

I did justify text with GDI+ by hand, but it is terribly slow by now.

I'll send you code as soon as I optimize it... yuck it really sucks by now.

http://www.matiasmor...moforatreiu.rar

Posted Image

Edit:

@atreiu:

Ok, this is working much better:

http://www.matiasmor...oforatreiu2.rar

Mmm... let's see:

There is a TBook class, which contains many TPage instances.

Each TPage has a lot of TLine instances. Well... they are not instances... I used record types to avoid brutal memory consumption, the only one class is TBook. And each TLine has a lot of TWord's, a height and an interspacing, which varies with each line, making all lines justified.

If you're interested in this, I'll send you the code... but you mentioned to add support for RTF... this means bold text and such stuff... and... man that will be really complicated, hahaha.

Whatever, expect a PM soon. ;)
0

#11 User is offline   maxxarcher Icon

  • Group: Member
  • Posts: 2
  • Joined: 04-March 09

Posted 12 March 2009 - 07:47 AM

Hi atreiu/matonga,

Have U checked the TRichView component already (trichview.com)? This comp has probably everything you could wish for, a document could even have controls...

Cheers, Maxx
0

#12 User is offline   matonga Icon

  • Group: Developers
  • Posts: 1,286
  • Joined: 04-September 06

Posted 14 March 2009 - 01:00 PM

I see two problems with this TRichView component:

1. Screenshots show non-antialiased fonts.
2. It seems you have to order it... If atreiu wants to put money on it and do development on his own with that component, I don't care, but I don't have money to buy a € 465 license. :(
0

#13 User is offline   maxxarcher Icon

  • Group: Member
  • Posts: 2
  • Joined: 04-March 09

Posted 14 March 2009 - 09:52 PM

Well, I DO have a life time (non-commercial) licence of the component. Bought it years ago and own the latest release. It would seem, imo, a tremendous waste of effort to recreate code that's already there. Maybe I can help you out...

How far are U guys anyway?
0

#14 User is offline   matonga Icon

  • Group: Developers
  • Posts: 1,286
  • Joined: 04-September 06

Posted 20 March 2009 - 08:15 PM

I wrote an algorithm to print book pages with GDI+, text with justified alignment. It currently supports only non-formatted text.

I don't know how far has atreiu done, or what's going on with this project. It seems to be abandoned (I mean the project).

Posted Image

EDIT

I've found a way to render .pdf pages into textures. It doesn't require Adobe Reader. It failed to render 3 of 5 pages from 1 of about 30 .pdf files. This is about... let's see... half these pdf are about 200 pages... 3/(30*100) = 0.1%, so I don't really care (also those pages failed to render in everything else than Adobe Reader, anyway).

By combining this with cute 3d hardware accelerated page transition animations I think I can get this project going on. Anyone else is still interested in this?

Also this same stuff would help to make Windows show pdf icons a-la Mac OS X (with page borders, second page behind bent upper-right corner, etc...).
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic