Andre Poenitz wrote:
On Sun, Oct 28, 2007 at 09:37:02PM +0100, Abdelrazak Younes wrote:
Andre Poenitz wrote:
On Sun, Oct 28, 2007 at 08:05:10PM +0100, Abdelrazak Younes
wrote:
Anyway, I think the language and font information should not be
in the same class. I don't understand why we are forced to set
a font when we only want to set the language for example. What
we need is a templated 'Range' class that will work with Fonts
and Languages. Basically, the current FontList will be a
specialisation of this template:

typedef Range<FontInfo> FontList;

And we need the same thing for languages:

typedef Range<Language> LanguageList;

Ideas, comments?
And that doesn't fit into a single class? "Attributes"?
Well that's what we have right now with the Font class (which
should be renamed to Attributes actually). The idea is to
dissociate attributes that
are truly independent: I may want a font change between pos 10 and
20 and a
language change between 15 and 25. This is in effect a way to
support overlapping ranges.

But than you'd need seperate Range 'containers' for font changes, for
language changes, for purple markers, for chequered backrounds etc. Adding a new context would mean a new container or somthing similar ugly.

In my mind there would be only three: Font, Language and Change Traking;
I am not a proponent of charstyle as attributes. But even though I was,
implementing them generically should be doable.

I think I prefer the notion of a 'Attribute'.

So each and every Attribute change will have a full entry in the
Attribute list, with full instantiation of every Attributes: Font,
Language, CT, purple   markers, etc. This means an awful lot of
redundancies and this will soon become a nightmare to handle IMO. You
can taste this already with the language/font change mix.

Abdel.

Reply via email to