]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
Ignore ligature breaks and hyphenations during simple search (fixes #1468).
[lyx.git] / src / BufferParams.cpp
index 9630d631198a126f2abc78de40d2ccfc576a9f5e..e5c701ac9d7c9e18bd77b48a06e4961a96ceb3db 100644 (file)
@@ -2394,9 +2394,8 @@ string const BufferParams::font_encoding() const
 
 string BufferParams::babelCall(string const & lang_opts, bool const langoptions) const
 {
-       string lang_pack = lyxrc.language_package;
-       if (lang_pack != "\\usepackage{babel}")
-               return lang_pack;
+       if (lyxrc.language_package_selection == LyXRC::LP_CUSTOM)
+               return lyxrc.language_custom_package;
        // suppress the babel call if there is no BabelName defined
        // for the document language in the lib/languages file and if no
        // other languages are used (lang_opts is then empty)
@@ -2407,7 +2406,7 @@ string BufferParams::babelCall(string const & lang_opts, bool const langoptions)
        // be submitted to babel itself (not the class).
        if (langoptions)
                return "\\usepackage[" + lang_opts + "]{babel}";
-       return lang_pack;
+       return "\\usepackage{babel}";
 }
 
 
@@ -2548,9 +2547,12 @@ string const BufferParams::loadFonts(string const & rm,
        ostringstream os;
 
        if (xetex) {
-               if (rm != "default")
-                       os << "\\setmainfont[Mapping=tex-text]{"
-                          << parseFontName(rm) << "}\n";
+               if (rm != "default") {
+                       os << "\\setmainfont[Mapping=tex-text";
+                       if (osf)
+                               os << ",Numbers=OldStyle";
+                       os << "]{" << parseFontName(rm) << "}\n";
+               }
                if (sf != "default") {
                        string const sans = parseFontName(sf);
                        if (sfscale != 100)
@@ -2573,8 +2575,6 @@ string const BufferParams::loadFonts(string const & rm,
                                os << "\\setmonofont[Mapping=tex-text]{"
                                   << mono << "}\n";
                }
-               if (osf)
-                       os << "\\defaultfontfeatures{Numbers=OldStyle}\n";
                return os.str();
        }