[prev in list] [next in list] [prev in thread] [next in thread] 

List:       berlin-design
Subject:    Re: textKit working :)
From:       Stefan Seefeld <seefelds () MAGELLAN ! UMontreal ! CA>
Date:       1999-04-26 18:43:10
[Download RAW message or body]

Graydon Hoare wrote:

> The only other approach I can see is appending a zero-size container
> to the scene graph with a specific font specifier in it and the text
> chunks as children, or putting a font specifier in each text chunk or
> something -- honestly it doesn't seem like either approach is much
> different (although they avoid putting state in the drawingKit, which
> I *would* prefer to avoid)

I see. The wrapping container solution isn't really one because containers
have to have the size which matches the overall size of their children after
having done layout. Every other implementation breaks the layout protocol.
Further, you'd get into trouble when trying to find possible line breaks
in an editor or so.
The second alternative, putting a font descriptor into every glyph, would
be possible but this reduces the 'shareability' of the glyph. Hmm, have to think
about it. It seems that it depends on the use of glyphs. When glyphs always go
into polygraphics it's no problem at all. What if I wan't to put a glyph into
a MonoGraphic ? I would have to wrap the glyph into a PolyGraphic which contains
the font setting graphic and the actual glyph.
On the other hand, if we don't expect to have millions of different fonts (font 
descriptors) in use, the overhead of making the font descriptor part of the
'internal state' of Glyphs would be ok. (by the way, if you have the font descriptor
within the glyph, you get the same problem as with giving the DrawingKit a state:
you would have to check for every glyph that the correct font descriptor is activ)

So, after all, it seems that your solution is the best.

Stefan

_______________________________________________________              
              
Stefan Seefeld
Departement de Physique
Universite de Montreal
email: seefelds@magellan.umontreal.ca

_______________________________________________________

      ...ich hab' noch einen Koffer in Berlin...


--  
To UNSUBSCRIBE, email to design-request@berlin-consortium.org
with a subject of "unsubscribe". Trouble? Contact listmaster@berlin-consortium.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic