]> git.lyx.org Git - features.git/commitdiff
tex2lyx: extend support for some osf fonts.
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 13 Jul 2019 15:46:43 +0000 (17:46 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:36 +0000 (15:48 +0200)
src/tex2lyx/Preamble.cpp

index 89a120d8de6ab2ecf48a85f6a59dca53bbe9cbe5..a5906d7c7bfe059909c42a21490db813300612d7 100644 (file)
@@ -854,6 +854,23 @@ void Preamble::handle_package(Parser &p, string const & name,
                }
                // noto as typewriter is handled in handling of \ttdefault
                // special cases are handled in handling of \rmdefault and \sfdefault
+               vector<string> allopts = getVectorFromString(opts);
+               string xopts;
+               for (auto const & opt : allopts) {
+                       if (opt == "rm")
+                               continue;
+                       if (opt == "sf")
+                               continue;
+                       if (opt == "nott")
+                               continue;
+                       if (opt == "osf") {
+                               h_font_osf = "true";
+                               continue;
+                       }
+                       if (!xopts.empty())
+                               xopts += ", ";
+                       xopts += opt;
+               }
        }
 
        if (name == "paratype") {
@@ -941,6 +958,10 @@ void Preamble::handle_package(Parser &p, string const & name,
                vector<string> allopts = getVectorFromString(opts);
                string xopts;
                for (auto const & opt : allopts) {
+                       if (opt == "osf") {
+                               h_font_osf = "true";
+                               continue;
+                       }
                        if (!xopts.empty())
                                xopts += ", ";
                        xopts += opt;