]> git.lyx.org Git - features.git/commitdiff
tex2lyx: support for the libertine fonts
authorUwe Stöhr <uwestoehr@lyx.org>
Thu, 20 Nov 2014 01:01:05 +0000 (02:01 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Thu, 20 Nov 2014 01:01:05 +0000 (02:01 +0100)
- all libertine font variants are now supported

src/tex2lyx/Preamble.cpp
src/tex2lyx/TODO.txt

index 145b17b2c8519825ec96cf891d0e4cf8af21b8e4..a727cd39fd49548f88c0dec13fb9757f536e9c81 100644 (file)
@@ -133,11 +133,12 @@ const char * const known_roman_fonts[] = { "ae", "beraserif", "bookman",
 
 const char * const known_sans_fonts[] = { "avant", "berasans", "biolinum-type1",
 "cmbr", "cmss", "helvet", "iwona", "iwonac", "iwonal", "iwonalc", "kurier",
-"kurierc", "kurierl", "kurierlc", "lmss", "tgadventor", "tgheros", 0};
+"kurierc", "kurierl", "kurierlc", "lmss", "tgadventor",
+"tgheros", 0};
 
 const char * const known_typewriter_fonts[] = { "beramono", "cmtl", "cmtt",
-"courier", "lmtt", "luximono", "fourier", "lmodern", "mathpazo", "mathptmx",
-"newcent", "tgcursor", "txtt", 0};
+"courier", "lmtt", "luximono", "fourier", "libertineMono-type1", "lmodern",
+"mathpazo", "mathptmx", "newcent", "tgcursor", "txtt", 0};
 
 const char * const known_math_fonts[] = { "eulervm", "newtxmath", 0};
 
@@ -727,14 +728,19 @@ void Preamble::handle_package(Parser &p, string const & name,
        // sansserif fonts
        if (is_known(name, known_sans_fonts)) {
                h_font_sans = name;
-               if (options.size() == 1) {
+               if (options.size() >= 1) {
                        if (scale_as_percentage(opts, h_font_sf_scale))
                                options.clear();
                }
        }
 
-       if (name == "biolinum-type1")
+       if (name == "biolinum-type1") {
                h_font_sans = "biolinum";
+               // biolinum can have several options, e.g. [osf,scaled=0.97]
+               string::size_type pos = opts.find("osf");
+               if (pos != string::npos)
+                       h_font_osf = "true";
+       }
 
        // typewriter fonts
        if (is_known(name, known_typewriter_fonts)) {
@@ -742,13 +748,17 @@ void Preamble::handle_package(Parser &p, string const & name,
                // fourier as typewriter is handled in handling of \ttdefault
                if (name != "fourier") {
                        h_font_typewriter = name;
-                       if (options.size() == 1) {
+                       if (options.size() >= 1) {
                                if (scale_as_percentage(opts, h_font_tt_scale))
                                        options.clear();
                        }
                }
        }
 
+       if (name == "libertineMono-type1") {
+               h_font_typewriter = "libertine-mono";
+       }
+
        // font uses old-style figure
        if (name == "eco")
                h_font_osf = "true";
index 974dcce9bf3d88e74bd98730a1a6dc8945e08843..61df01b3917bf6be01757765d4c018b3a3bf5cd1 100644 (file)
@@ -80,13 +80,6 @@ Format LaTeX feature                        LyX feature
 459    beamer: \begin{frame},               \begin_layout Frame
        \begin{frame}[plain],                \begin_layout PlainFrame
        \begin{frame}[fragile]               \begin_layout FragileFrame
-462    New libertine LaTeX fonts:
-       \usepackage[scale|scaled|ttscale=$val]{libertineMono-type1}
-                                            \font_typewriter
-                                            \font_tt_scale
-       \usepackage[scale|scaled=$val]{biolinum-type1}
-                                            \font_sans
-                                            \font_sf_scale
 466   Powerdot updates:                     
       \pause[]                              layout Pause
       \onslide{}{}                          InsetFlex, InsetArgument