On Fri, 2006-01-27 at 10:43 +0100, Helge Hafting wrote:
> Martin Vermeer wrote:
> 
> >On Thu, Jan 26, 2006 at 09:11:25AM +0100, Helge Hafting wrote:
> >  
> >
> >>Martin Vermeer wrote:

...

> >Alternatively, the attached, still bigger, patch ;-/
> >
> >
> >There seems to be a philosophical unclarity around our use of
> >defaultfont, especially where languages are concerned.
> >
> >On the one hand, the default font/language is the one that is chosen for
> >new documents when they are created. A sensible user sets it to the
> >language he uses most (e.g., Helge to Norwegian).
> >
> >  
> >
> Yes, that is how I use this too.
> 
> >Then, when writing the occasional Swedish document, you set the
> >document/buffer language to Swedish. So far, so good.
> >
> >Now what complicates things is, that defaultfont is also used to
> >*reduce* fonts against. So if you want to represent a font "minimally",
> >you reduce it to defaultfont using a statement like
> >
> >font.reduce(defaultFont());
> >
> >  
> >
> >So this is the philosophical mix-up: defaultfont.language means
> >
> >1) The most often used language; but also
> >2) the absence of explicit language information.
> >
> >What I did was to make defaultfont *only* the font that is offered when
> >creating a new doc. It has no other role. Font reduction (on-screen, or
> >in the .lyx file) always takes place against the buffer/document font.
> >  
> >
> Perfect.  That is the way it must be.
> 
> >This concerns of course especially the language attribute.
> >
> >See the patch.
> >
> >1) When creating a new lyxtext, language info is taken from
> >bufferparams (though the added lang parameter).
> >
> >2) When creating a new paragraph, same thing.
> >
> >3) The current cursor is now handed through to tabular inset cells too.
> >Fixes the L-cursor problem in tabular.
> >
> >4) etc.
> >  
> >
> The list of fixes look nice, but it still doesn't compile when this patch
> is applied to todays cvs.
> 
> 
> pariterator.C:183:2: warning: #warning const correctness!
> if g++ -DHAVE_CONFIG_H -I. -I. -I.  -Winvalid-pch --include=./pch.h 
> -I../boost -
> Wextra -Wall    -I/usr/X11R6/include -fno-exceptions -O2 -MT 
> rowpainter.o -MD -M
> P -MF ".deps/rowpainter.Tpo" -c -o rowpainter.o rowpainter.C; \
>         then mv -f ".deps/rowpainter.Tpo" ".deps/rowpainter.Po"; else rm 
> -f ".de
> ps/rowpainter.Tpo"; exit 1; fi
> rowpainter.C: In member function ‘void<unnamed>::RowPainter::paintText()’:
> rowpainter.C:659: error: ‘const class LyXText’ has no member named 
> ‘defaultfont_
> ’
> rowpainter.C:712: error: ‘const class LyXText’ has no member named 
> ‘defaultfont_
> ’

Probably an interference with the row-cache-within-inset patch, which
has also a big presence in rowpainter.

Just replace all occurrences of defaultfont_ with bufferFont().

HTH Martin

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to