On 27-Jul-2001 Jean-Marc Lasgouttes wrote:

> The interesting methods in LyX Font are
> 
>       /** Reduce font to fall back to template where possible.
>           Equal fields are reduced to INHERIT */
>       void reduce(LyXFont const & tmplt);
>  
>       /// Realize font from a template (INHERIT are realized)
>       LyXFont & realize(LyXFont const & tmplt);

Well I've seen them but where do we get the template from? Well I know that
too it's just the it seems to me that the whole language stuff and inherit
ignore or whatever is a bit (not to say more) hackish.

> I think that an insettext should have a base font (where the color and
> language and other things would be given) and the text in the inset
> text should be reduce()'d against that. So the font properties would
> be properties of the inset and not of the font.

But we have this it's just not handled right now. You'll see that we have
a LyXFont parameter for some functions. But maybe you're right the inset
should have a Font and a setFont(LyXFont) method which set's the font of
that inset (without the need to ask the owner what font-environment we're
inside!) and when we have a fontchange and at that character position is
an inset the font should be set also inside the inset with the above call.

This done we don't need the fontparameter of the various draw, ascent, ...
methods as we always know our font and can then handle it in the various
export or write methods.

         Jürgen

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. Jürgen Vigna        E-Mail:  [EMAIL PROTECTED]
Italienallee 13/N       Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen           Web:     http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

Peers's Law:
        The solution to a problem changes the nature of the problem.

Reply via email to