X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fbufferparams.C;h=d7e58ef4d7cf6d3351cf5dc8703ae7b0a827fe94;hb=ba62665f966508db5a4de6864f4aa7374c5a5356;hp=a3af1079a817533ffe6c7ec352282151297d12f1;hpb=b15a9ade28626b1b2e331ca461d979a8d635bfca;p=lyx.git diff --git a/src/bufferparams.C b/src/bufferparams.C index a3af1079a8..d7e58ef4d7 100644 --- a/src/bufferparams.C +++ b/src/bufferparams.C @@ -829,7 +829,7 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features, // font selection must be done before loading fontenc.sty string const fonts = - loadFonts(features, fontsRoman, fontsSans, + loadFonts(fontsRoman, fontsSans, fontsTypewriter, fontsSC, fontsOSF, fontsSansScale, fontsTypewriterScale); if (!fonts.empty()) { @@ -876,7 +876,8 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features, os << "]{inputenc}\n"; texrow.newline(); } - } else if (inputenc != "default" && inputenc != "tis620-0") { + } else if (inputenc != "default" && inputenc != "tis620-0" && + inputenc != "ascii") { os << "\\usepackage[" << from_ascii(inputenc) << "]{inputenc}\n"; texrow.newline(); @@ -1331,7 +1332,7 @@ string const BufferParams::babelCall(string const & lang_opts) const } -string const BufferParams::loadFonts(LaTeXFeatures & features, string const & rm, +string const BufferParams::loadFonts(string const & rm, string const & sf, string const & tt, bool const & sc, bool const & osf, int const & sfscale, int const & ttscale) const @@ -1375,9 +1376,9 @@ string const BufferParams::loadFonts(LaTeXFeatures & features, string const & rm // Times else if (rm == "times") { // try to load the best available package - if (features.isAvailable("mathptmx")) + if (LaTeXFeatures::isAvailable("mathptmx")) os << "\\usepackage{mathptmx}\n"; - else if (features.isAvailable("mathptm")) + else if (LaTeXFeatures::isAvailable("mathptm")) os << "\\usepackage{mathptm}\n"; else os << "\\usepackage{times}\n"; @@ -1385,7 +1386,7 @@ string const BufferParams::loadFonts(LaTeXFeatures & features, string const & rm // Palatino else if (rm == "palatino") { // try to load the best available package - if (features.isAvailable("mathpazo")) { + if (LaTeXFeatures::isAvailable("mathpazo")) { os << "\\usepackage"; if (osf || sc) { os << '['; @@ -1398,7 +1399,7 @@ string const BufferParams::loadFonts(LaTeXFeatures & features, string const & rm } os << "{mathpazo}\n"; } - else if (features.isAvailable("mathpple")) + else if (LaTeXFeatures::isAvailable("mathpple")) os << "\\usepackage{mathpple}\n"; else os << "\\usepackage{palatino}\n"; @@ -1407,7 +1408,7 @@ string const BufferParams::loadFonts(LaTeXFeatures & features, string const & rm else if (rm == "utopia") { // fourier supersedes utopia.sty, but does // not work with OT1 encoding. - if (features.isAvailable("fourier") + if (LaTeXFeatures::isAvailable("fourier") && lyxrc.fontenc != "default") { os << "\\usepackage"; if (osf || sc) {