On Mon, Nov 05, 2007 at 07:59:08PM +0100, Enrico Forestieri wrote:
> On Sun, Nov 04, 2007 at 05:47:59PM +0100, Enrico Forestieri wrote:
> 
> > On Sun, Nov 04, 2007 at 04:20:39PM +0100, Jürgen Spitzmüller wrote:
> > 
> > > > http://www.lyx.org/trac/changeset/21225 - Fix IEEEtran layout by loading
> > > > counters before the sectioning styles, in order to avoid having sections
> > > > numbered as 0.X instead of simply X.
> > > 
> > > Enrico?
> > 
> > Not needed in 1.5. In general, layouts in 1.6 need an overhaul. For example,
> > the title in the scrbook class is not rendered in the right size on screen.
> 
> It's not a layout problem but rather a genuine bug:
> http://bugzilla.lyx.org/show_bug.cgi?id=4329


It's due to lyxRead() returning a reset font every time it is called.

Attached something that seems to work, at least in the scrbook case. A
bit brute-forceish, but if it works...

- Martin 

Index: Layout.cpp
===================================================================
--- Layout.cpp	(revision 21402)
+++ Layout.cpp	(working copy)
@@ -204,6 +204,7 @@
 			continue;
 		default: break;
 		}
+		FontInfo f;
 		switch (static_cast<LayoutTags>(le)) {
 		case LT_END:		// end of structure
 			finished = true;
@@ -311,16 +312,25 @@
 			break;
 
 		case LT_FONT:
-			font = lyxRead(lexrc);
+			f = lyxRead(lexrc);
+			f.reduce(sane_font);
+			f.realize(font);
+			font = f;
 			labelfont = font;
 			break;
 
 		case LT_TEXTFONT:
-			font = lyxRead(lexrc);
+			f = lyxRead(lexrc);
+			f.reduce(sane_font);
+			f.realize(font);
+			font = f;
 			break;
 
 		case LT_LABELFONT:
-			labelfont = lyxRead(lexrc);
+			f = lyxRead(lexrc);
+			f.reduce(sane_font);
+			f.realize(font);
+			labelfont = f;
 			break;
 
 		case LT_NEXTNOINDENT:	// Indent next paragraph?

Reply via email to