commit 27e0279e24a2281596c5fe9c28858ca9c66a3382
Author: Juergen Spitzmueller <[email protected]>
Date:   Sat Jul 13 17:46:43 2019 +0200

    tex2lyx: extend support for some osf fonts.
---
 src/tex2lyx/Preamble.cpp |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp
index 89a120d..a5906d7 100644
--- a/src/tex2lyx/Preamble.cpp
+++ b/src/tex2lyx/Preamble.cpp
@@ -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;

Reply via email to