On Tue, Dec 09, 2003 at 08:18:34AM +0100, Andre Poenitz spake thusly: > On Mon, Dec 08, 2003 at 02:08:03PM -0500, Kuba Ober wrote: > > Oh yes, then certainly it will work like that. Another way of doing it is > > instead of having character style insets just have character style flags and > > have the core do the job. I.e. have "bold on" and "bold off" flags. > > This does not work well with user defined styles and we don't have the > memory to associate each individual character with arbitrary data. > > Andre'
Actually I don't think that's the way it would be done. I did study the possibility to implement charstyles as ranges after John wrote his write-up, and came to the conclusion that indeed it would be doable in this way using mostly the existing char attribute infrastructure. The only thing to store for a character belonging to a charstyle would be a number pointer to an entry in the textclass'es charstyle list. (User-definable charstyles would complicate this a little, but not much.) In this approach, an LCS would be kept separately from the physical char attributes, but be merged with them at some suitable point using the realize() method to get the display font. This means that every LCS would consist of a bit pattern of physical character attributes. It would certainly have worked, but LCS's would not be nestable/overlappable, i.e., a character could only belong to one at a time. Not a real limitation IMHO. Still I like the inset approach more. - Martin
pgp00000.pgp
Description: PGP signature