On Mon, Apr 11, 2005 at 10:09:03PM +0300, Martin Vermeer wrote:
> In lyxtext.h there are no fewer than four locally stored fonts.

The historical reason is that in the 1.4 cycle two approcaches to font
handling where partially merged (old non-mathed and 1.3's mathed aka
'font changed are insets'), but in a way that font changes are not
insets. 

> Of those, current_font and real_current_font are not referred to
> anywhere in the code, and I propose to remove them to reduce
> confusion.

If thy are indeed not used anywhere, the merge has progressed further
that I expected.
 
> Of the lyxtext fonts that do mean something, we have
> 
> defaultfont_: apparently the default textclass font, made available
> here.  font_: the locally stored font that was handed down from the
> surroundings to an inset's textinset.
> 
> In my understanding the original inset font error was a failure to
> hand down this surrounding font so it could be used in metrics
> computation and drawing. (Between insets, this handing down takes
> place in the MetricsInfo/PainterInfo argument).

One of the many oversights....
 
> I fixed this, but at the same time saw myself forced to do the
> combination of this and the font defined by the local text paragraphs
> in a different (IMHO usually appropriate) way.
> 
> Did I get this right?

*shrug* I don't actually fully understand the old non-math font
handling, but I do know that some people refuse to have a pure
structural approach to fonts ('font changes are represented by insets'),
so the best that could be hoped for is some kind of compromise on the
'just make it work somehow' level. If your patch does that, it'd be just
fine with me.

Andre'

Reply via email to