pos_type body_pos = beginOfBody();
unsigned int column = 0;
- // If we are inside an inset, the real outerfont is local_font
- Font const real_outerfont = (runparams.local_font != nullptr)
+ // If we are inside an non inheritFont() inset, the real outerfont is local_font
+ Font const real_outerfont = (!inInset().inheritFont()
+ && runparams.local_font != nullptr)
? Font(runparams.local_font->fontInfo()) : outerfont;
if (body_pos > 0) {
++column;
// 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;
bool const in_ct_deletion = (bparams.output_changes
std::tuple<vector<xml::FontTag>, vector<xml::EndFontTag>> computeDocBookFontSwitch(FontInfo const & font_old,
Font const & font,
std::string const & default_family,
- DocBookFontState fs)
+ DocBookFontState & fs)
{
vector<xml::FontTag> tagsToOpen;
vector<xml::EndFontTag> tagsToClose;
if (font_old.strikeout() != curstate)
doFontSwitchDocBook(tagsToOpen, tagsToClose, fs.sout_flag, curstate, xml::FT_SOUT);
+ // xout
+ curstate = font.fontInfo().xout();
+ if (font_old.xout() != curstate)
+ doFontSwitchDocBook(tagsToOpen, tagsToClose, fs.xout_flag, curstate, xml::FT_XOUT);
+
// double underbar
curstate = font.fontInfo().uuline();
if (font_old.uuline() != curstate)
if (old_fs != fs.curr_fs) {
if (fs.shap_flag) {
OptionalFontType tag = fontShapeToXml(old_fs);
- if (tag.has_value) {
+ if (tag.has_value)
tagsToClose.push_back(docbookEndFontTag(tag.ft));
- }
fs.shap_flag = false;
}
OptionalFontType tag = fontShapeToXml(fs.curr_fs);
- if (tag.has_value) {
+ if (tag.has_value)
tagsToOpen.push_back(docbookStartFontTag(tag.ft));
- }
}
// Font family
if (old_fam != fs.curr_fam) {
if (fs.faml_flag) {
OptionalFontType tag = fontFamilyToXml(old_fam);
- if (tag.has_value) {
+ if (tag.has_value)
tagsToClose.push_back(docbookEndFontTag(tag.ft));
- }
fs.faml_flag = false;
}
switch (fs.curr_fam) {
if (old_size != fs.curr_size) {
if (fs.size_flag) {
OptionalFontType tag = fontSizeToXml(old_size);
- if (tag.has_value) {
+ if (tag.has_value)
tagsToClose.push_back(docbookEndFontTag(tag.ft));
- }
fs.size_flag = false;
}
return std::tuple<vector<xml::FontTag>, vector<xml::EndFontTag>>(tagsToOpen, tagsToClose);
}
-}// anonymous namespace
+} // anonymous namespace
void Paragraph::simpleDocBookOnePar(Buffer const & buf,