Sign in to follow this  
Followers 0

On Screen - Reader Project

14 posts in this topic

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:

  1. Do you think, such an App would be useful? Or is there already a good solution available?
  2. 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?
  3. How can i realize the page-flapping?
  4. Any other ideas about this project?

Thanks, Atreiu.

Edited by atreiu
0

Share this post


Link to post
Share on other sites
Questions to you:

  1. Do you think, such an App would be useful? Or is there already a good solution available?
  2. 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?
  3. How can i realize the page-flapping?
  4. Any other ideas about this project?

Thanks, Atreiu.

  1. Boy, I think this is a really great idea!
  2. 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.
  3. May I implement that for you with DirectX? :)
  4. 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

Share this post


Link to post
Share on other sites
  1. Boy, I think this is a really great idea!
  2. 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.
  3. May I implement that for you with DirectX? :)
  4. 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

Share this post


Link to post
Share on other sites

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

PS: I attached 2 interface-sketches

post-90085-1235381549_thumb.png

post-90085-1235381573_thumb.png

0

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.org/wiki/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

Share this post


Link to post
Share on other sites

@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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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).

aquasoft-separator.png

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.matiasmoreno.com.ar/demoforatreiu.rar

aquasoft-separator.png

Edit:

@atreiu:

Ok, this is working much better:

http://www.matiasmoreno.com.ar/demoforatreiu2.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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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).

aquasoft-separator.png

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0