Fix bug discussed in this thread: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg142814.html. The problem was that the font information in InsetLayout was not being properly integrated into the routines that set the active font.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26162 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-08-14 15:24:12 +00:00
parent 771673ccbb
commit 004b672399

View File

@ -46,6 +46,8 @@
#include "TextMetrics.h"
#include "VSpace.h"
#include "insets/InsetCollapsable.h"
#include "mathed/InsetMathHull.h"
#include "support/lassert.h"
@ -81,6 +83,9 @@ FontInfo Text::layoutFont(Buffer const & buffer, pit_type const pit) const
// In case the default family has been customized
if (layout.font.family() == INHERIT_FAMILY)
lf.setFamily(buffer.params().getFont().fontInfo().family());
InsetCollapsable const * icp = pars_[pit].inInset()->asInsetCollapsable();
if (icp)
lf.update(icp->getLayout().font(), false);
return lf;
}
@ -102,6 +107,9 @@ FontInfo Text::labelFont(Buffer const & buffer, Paragraph const & par) const
// In case the default family has been customized
if (layout.labelfont.family() == INHERIT_FAMILY)
lf.setFamily(buffer.params().getFont().fontInfo().family());
InsetCollapsable const * icp = par.inInset()->asInsetCollapsable();
if (icp)
lf.update(icp->getLayout().labelfont(), false);
return lf;
}