gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progress of text system


From: Alexander Malmberg
Subject: Re: Progress of text system
Date: Mon, 03 Mar 2003 16:24:55 +0100

Fred Kiefer wrote:
> 
> Hi Alexander,
> 
> I didn't find any time to test the text system in the past days, so I
> was pretty impressed by doing it today. It now is lightning fast. This
> is far more than just usable. Thank you!

I'm glad to hear that. :)

It would still be very interesting to know where the new bottlenecks are
when editing, so I'm still interested in profiling data (haven't been
able to get anything but bogus data here, eg. always 0.0 for elapsed
time).

> There are a few layout glitches left, for example first line indentation
> gets lost while editing the next line, but most of them wont be to hard
> to resolve.

This was caused by a typo in the typesetter. Should work now.

(BTW, when testing this I had to create an .rtf file that had a first
line indent set. Is there any way of changing the first line indent
using the ruler? Is there supposed to be?)

> As I wrote in the previous mails, I would have prefered a glyph handling
> that was closer to the way Apple does it, but this is only my personal
> view. I still disagree on the class hierarchy though (see at end of this
> mail).

[snip]
> Just when I thought, I did understand the reason behind this class
> split, I get confused again. So NSStringDrawing will be implemented via
> NSLayoutManager not GSLayoutManager, but where is than the example for
> the use of GSLayoutManager? Sorry, is it just me being dump? Or is it
> rather that an example is hard to find?

The string drawing is an example of using the text system without a text
view. There was no example of subclassing GSLayoutManager (except
NSLayoutManager) when I wrote this. I have now written one:

http://w1.423.telia.com/~u42308495/alex/IdeographicViewer-0.1.tar.gz

(screenshot:
http://w1.423.telia.com/~u42308495/alex/IdeographicViewer1.png)

The example uses a custom typesetter and layout manager pair (for
top-down, right-to-left, vertical layout if cjk scripts; fairly simple,
there are several more advanced features of typesetting such scripts
that aren't handled). It is heavily commented to show how this is done.
Hopefully, the comments make it easy to follow the overall structure of
the example even if the details are ignored (if not, tell me what's
unclear and I'll try to clarify). Feedback is appreciated.

> (BTW the control view for the drawing of attachments must come from a
> focusView call. Otherwise attachments wont work in non text view
> environments)

True, but this applies to drawing in general: if you don't have focus
locked on a view, the DPS* calls won't work. Did you have any specific
troublesome case in mind?

- Alexander Malmberg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]