Am Montag, dem 07.02.2022 um 10:23 +0100 schrieb Jürgen Spitzmüller: > Some observations: The issue here is that the class has SANS family, > but the document sets fonts_default_family == "rmdefault". Hence, in > Paragraph::getLayoutFont(), d->layout_->font and outerfont have > family > INHERIT, but bparams.getFont() has ROMAN, which is what the returned > font gets. It should get INHERIT as well, though.
So I suppose the fix is to consider fonts_default_family for the real_outerfont in non inheritFont() insets, like the attached. Does this look correct? Jürgen
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index f178dd5eeb..48b8519cd7 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -2539,9 +2539,10 @@ void Paragraph::latex(BufferParams const & bparams, pos_type body_pos = beginOfBody(); unsigned int column = 0; - // If we are inside an non inheritFont() inset, the outerfont is the default font + // If we are inside an non inheritFont() inset, + // the outerfont is the buffer's main font Font const real_outerfont = - inInset().inheritFont() ? outerfont : Font(bparams.documentClass().defaultfont()); + inInset().inheritFont() ? outerfont : Font(bparams.getFont()); if (body_pos > 0) { // the optional argument is kept in curly brackets in
signature.asc
Description: This is a digitally signed message part
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel