rp.local_font = &font;
rp.intitle = style->intitle;
pimpl_->simpleTeXSpecialChars(buf, bparams, doc_encoding, os,
- texrow, rp, font, running_font,
+ texrow, rp, running_font,
basefont, outerfont, open_font,
runningChangeType, *style, i, column, c);
}
odocstream & os,
TexRow & texrow,
OutputParams const & runparams,
- LyXFont & font,
LyXFont & running_font,
LyXFont & basefont,
LyXFont const & outerfont,
os, basefont, basefont, bparams);
open_font = false;
}
- basefont = owner_->getLayoutFont(bparams, outerfont);
- running_font = basefont;
- if (font.family() == LyXFont::TYPEWRITER_FAMILY)
+ if (running_font.family() == LyXFont::TYPEWRITER_FAMILY)
os << '~';
+ basefont = owner_->getLayoutFont(bparams, outerfont);
+ running_font = basefont;
+
if (runparams.moving_arg)
os << "\\protect ";
break;
}
// Typewriter font also has them
- if (font.family() == LyXFont::TYPEWRITER_FAMILY) {
+ if (running_font.family() == LyXFont::TYPEWRITER_FAMILY) {
os.put(c);
break;
}
break;
case '-': // "--" in Typewriter mode -> "-{}-"
- if (i <= size() - 2
- && getChar(i + 1) == '-'
- && font.family() == LyXFont::TYPEWRITER_FAMILY) {
+ if (i <= size() - 2 &&
+ getChar(i + 1) == '-' &&
+ running_font.family() == LyXFont::TYPEWRITER_FAMILY) {
os << "-{}";
column += 2;
} else {
// I assume this is hack treating typewriter as verbatim
// FIXME UNICODE: This can fail if c cannot be encoded
// in the current encoding.
- if (font.family() == LyXFont::TYPEWRITER_FAMILY) {
+ if (running_font.family() == LyXFont::TYPEWRITER_FAMILY) {
if (c != '\0') {
os.put(c);
}
}
if (pnr == phrases_nr && c != '\0') {
- Encoding const & encoding = getEncoding(bparams, doc_encoding, font);
+ Encoding const & encoding =
+ getEncoding(bparams, doc_encoding, running_font);
if (i < size() - 1) {
char_type next = getChar(i + 1);
if (Encodings::isCombiningChar(next)) {
void simpleTeXSpecialChars(Buffer const &, BufferParams const &,
Encoding const &, odocstream &,
TexRow & texrow, OutputParams const &,
- LyXFont & font, LyXFont & running_font,
+ LyXFont & running_font,
LyXFont & basefont,
LyXFont const & outerfont,
bool & open_font,