- tie(tagsToOpen, tagsToClose) = computeDocBookFontSwitch(font_old, font, default_family, fs);
-
- // FIXME XHTML
- // Other such tags? What about the other text ranges?
-
- vector<xml::EndFontTag>::const_iterator cit = tagsToClose.begin();
- vector<xml::EndFontTag>::const_iterator cen = tagsToClose.end();
- for (; cit != cen; ++cit)
- *xs << *cit;
+ if (!ignore_fonts) {
+ tie(tagsToOpen, tagsToClose) = computeDocBookFontSwitch(font_old, font, default_family, fs);
+
+ // FIXME XHTML
+ // Other such tags? What about the other text ranges?
+
+ vector<xml::EndFontTag>::const_iterator cit = tagsToClose.begin();
+ vector<xml::EndFontTag>::const_iterator cen = tagsToClose.end();
+ for (; cit != cen; ++cit)
+ *xs << *cit;
+
+ // Deal with the delayed characters *after* closing font tags.
+ if (!delayedChars.empty()) {
+ for (char_type c: delayedChars)
+ *xs << c;
+ delayedChars.clear();
+ }