On Thu, Feb 02, 2006 at 04:56:39PM +0100, Jean-Marc Lasgouttes wrote: > >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> Jean-Marc, I think this is the version of reference to review. > Martin> (Do we still make 1.4.0, or shall we play safe? But it's quite > Martin> irritating as it is. Do we want the possible embarrassment or > Martin> the certain annoyance?) > > There are some things that kind of annoy me (and no, I did not try it! > I want to guess what could go wrong). > > 1/ could you describe how current font is used now? I thought it was > only useful when inserting new text (font at cursor position) and now > I do not know anymore.
I understand it that way too. I think it determines what font will be
applied to the next character inserted. real_current_font stands for
"realized c.f.", i.e., it doesn't contain inherits anymore. Otherwise
the same. But I'm not quite sure myself either.
BTW about the font used for inserted new stuff, in paragraph_pimpl.C's
insertChar around line 270, the paragraph font table is *not* updated
when a character (or inset!) is appended. This leaves the par in a state
where the last character has no font info of its own, and takes it (...
making a long story short ...) from the first character position,
through getParLanguage and getFirstFontSettings.
Now, for characters, this is fixed in insetChar in text.C, around line
1183, where the character is inserted _with font_. The same does not
happen for insets... my patch corrects this in doInsertInset in text3.C.
> 2/ instead of LyXText::bufferFont, I would have preffered a real
> Buffer::defaultFont. At least is makes it clear that the font is the
> same for all LyXTexts in the same buffer.
Hmmm... shouldn't that be BufferParams::defaultFont? Doable I suppose,
either way. Not worth doing now, IMHO.
> 3/ getFirstFontSettings could maybe have a BufferParam as parameter
> instead of directly a language (less risk of passing a bogus value).
I had that originally and got rid of it. How would that work, passing a
bogus value, that wouldn't work also with a BufferParams?
I'll revert it if you insist ;-)
> 4/ what is the use of noFontChange now?
It tells the surrounding text / rowpainter that external font attributes
should not be propagated into the inset. E.g.,
a) place an inset into a standard paragraph, convert it to Section, and
see how the text inside the inset does *not* become big and bold. Or
b) insert an inset into an italicised paragraph, and see how the text
you type inside it is *not* italicised.
c) (unrelated to this patch) if you output to LaTeX such an inset
embedded in a piece of text that's emphasized in some way, the LaTeX
emphasize environment will stop at the start of the inset (i.e. a "}" is
inserted) and will be resumed after it (i.e., an "\emph{" or whatever
will be inserted).
Does this help?
- Martin
pgpVdY7P9l9Cj.pgp
Description: PGP signature
