2006-08-12 01:40:14 - Ow ... my head hurts

I've been working through a few things on Newton X Press, mostly relating to the initial importing of book text and table of contents.

It turns out that the default spacing that books are rendered with on my mp2100 appears to be 1.5 line spacing, not 1.0, a couple of tweaks to my code and the on screen output of book text looks much closer to how it is rendered on the newton.

I've figured out how to use an NSOutlineView and a couple of buttons to manage the table of contents - the layout and design of how an NSOutlineView is managed from a programmer's perspective is a bit awkward, but I've seen far worse in digging through the .net API.

I had been racking my brain trying to decide how to represent the table of contents entries in the actual text - Newton Press places a little blue square (highlights a character of text?) that moves around with the rest of the text. The text itself in NXPress is stored in an NSMutableString - which provides for unlimited and arbitrary key / value pairings to be associated with any section of the text - I'll just generate my own key/value and away I go!

Fixed some redraw issues while scrolling, and added page number markers. Still stumped by fonts - it looks like I'll have to take it upon myself to generate new TrueType Fonts for everything.

The reason that I say my head hurts is because I just noticed the within-book page linking feature that Newton press supports. One can basically hyperlink any text / graphics in a book to another block of text or graphic. The problem is that this adds a block of NEWTONSCRIPT, including a chunk of what is probably pre-compiled bytecode. It looks like this chunk of code doesn't change from book to book and link to link, so I can probably copy it verbatim. If not, I'll have to reverse engineer it before I can make linking work.


Comments:


Add a comment:



Please use BBCode markup:
[url=http://blah.com]clickhere[/url], [quote=bob]blah[/quote], [quote]anonymous blah[/quote], [img=http://blah.com/smily.gif], [b]bold[/b],and [i]italic[/i].