Next attempt at correctly setting fonts in insets depending on inheritFont()

This commit is contained in:
Juergen Spitzmueller 2020-08-02 10:12:19 +02:00
parent 10bbf9e62b
commit aba8c81290
2 changed files with 6 additions and 3 deletions

View File

@ -2393,8 +2393,9 @@ void Paragraph::latex(BufferParams const & bparams,
pos_type body_pos = beginOfBody(); pos_type body_pos = beginOfBody();
unsigned int column = 0; unsigned int column = 0;
// If we are inside an inset, the real outerfont is local_font // If we are inside an non inheritFont() inset, the real outerfont is local_font
Font const real_outerfont = (runparams.local_font != nullptr) Font const real_outerfont = (!inInset().inheritFont()
&& runparams.local_font != nullptr)
? Font(runparams.local_font->fontInfo()) : outerfont; ? Font(runparams.local_font->fontInfo()) : outerfont;
if (body_pos > 0) { if (body_pos > 0) {
@ -2558,7 +2559,7 @@ void Paragraph::latex(BufferParams const & bparams,
++column; ++column;
// Fully instantiated font // Fully instantiated font
Font const current_font = getFont(bparams, i, real_outerfont); Font const current_font = getFont(bparams, i, outerfont);
Font const last_font = running_font; Font const last_font = running_font;
bool const in_ct_deletion = (bparams.output_changes bool const in_ct_deletion = (bparams.output_changes

View File

@ -80,6 +80,8 @@ public:
UpdateType utype, TocBackend & backend) const; UpdateType utype, TocBackend & backend) const;
/// ///
void metrics(MetricsInfo &, Dimension &) const; void metrics(MetricsInfo &, Dimension &) const;
/// Needs to be same as InsetTabular
bool inheritFont() const { return false; }
private: private:
/// unimplemented /// unimplemented
InsetTableCell(); InsetTableCell();