]> git.lyx.org Git - features.git/commitdiff
* XeTeX: OldStyleNumbers argument must be specified as \setmainfont option (bug 7041).
authorJürgen Spitzmüller <spitz@lyx.org>
Sat, 20 Nov 2010 14:53:34 +0000 (14:53 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Sat, 20 Nov 2010 14:53:34 +0000 (14:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36408 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferParams.cpp

index 17e7bf769e585eab1508e2f30a04610133b873ec..e5c701ac9d7c9e18bd77b48a06e4961a96ceb3db 100644 (file)
@@ -2547,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)
@@ -2572,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();
        }