]> git.lyx.org Git - features.git/commitdiff
Add sans serif font series "Chivo"
authorKornel Benko <kornel@lyx.org>
Wed, 17 Jul 2019 16:02:22 +0000 (18:02 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:37 +0000 (15:48 +0200)
lib/chkconfig.ltx
lib/doc/LaTeXConfig.lyx
lib/latexfonts
src/LaTeXFonts.cpp
src/tex2lyx/Preamble.cpp
src/version.h

index a8e8247871274b4ef253e5ad5f918b37cf93a11a..19256a3681a91e98c062cb88cafeea3a8d80af5b 100644 (file)
 %\TestFont[glic1000]{cbgreek}% for Greek % suported by LyX but too large to force downloading
 \TestPackage{cantarell}
 \TestPackage{ccfonts}
+\TestPackage{Chivo}
 \TestFont[ccr10]{concrete} % required by ccfonts
 \TestFont[eorm10]{ecc} % required by ccfonts
 \TestPackage[ot1ccr.fd]{concmath} % required by ccfonts
index 41241f5b9ff56af4d31419918d64f1be71137bac..69c65abcb61a44a1b3fccb6bf2a399a1a881cec2 100644 (file)
@@ -1,5 +1,5 @@
 #LyX 2.4 created this file. For more info see https://www.lyx.org/
-\lyxformat 582
+\lyxformat 583
 \begin_document
 \begin_header
 \save_transient_properties true
@@ -445,6 +445,39 @@ Notes: Cantarell is a contemporary humanist sans serif, and is used by the
 
 \end_layout
 
+\begin_layout Subsection
+
+\change_inserted -1174727462 1563362850
+Chivo
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -1174727462 1563363590
+Found: 
+\begin_inset Info
+type  "package"
+arg   "Chivo"
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -1174727462 1563363604
+CTAN: fonts/Chivo
+\end_layout
+
+\begin_layout Description
+
+\change_inserted -1174727462 1563363027
+Notes: Chivo is a set of fourteen fonts provided by Héctor Gatti & [Omnibus-Type
+](http://www.omnibus-type.com/fonts/chivo.php) Team under the Open Font License
+ [(OFL)](http://scripts.sil.org/OFL), version 1.1.
+ The fonts are copyright (c) 2011-2019, Omnibus-Type.
+\end_layout
+
 \begin_layout Subsection
 CM bright
 \end_layout
index 1d7903f2f171dc7755ca10575fff5c9e006da998..a5bef04a09a4c1b3690b2396f5ddce6174c2140a 100644 (file)
@@ -653,6 +653,50 @@ Font cantarell
        ScaleOption     scale=$$val
 EndFont
 
+Font ChivoThin
+       GuiName          "Chivo (Thin)"
+       Family           sf
+       OsfOption       oldstyle
+       Package          Chivo
+       PackageOption    "thin"
+       MoreOptions      1
+       FontEncoding     OT1,LY1,T1,TS1
+       ScaleOption      scale=$$val
+EndFont
+
+Font ChivoLight
+       GuiName          "Chivo (Light)"
+       Family           sf
+       OsfOption       oldstyle
+       Package          Chivo
+       PackageOption    "light"
+       MoreOptions      1
+       FontEncoding     OT1,LY1,T1,TS1
+       ScaleOption      scale=$$val
+EndFont
+
+Font Chivo
+       GuiName          "Chivo"
+       Family           sf
+       OsfOption       oldstyle
+       Package          Chivo
+       PackageOption    "regular"
+       MoreOptions      1
+       FontEncoding     OT1,LY1,T1,TS1
+       ScaleOption      scale=$$val
+EndFont
+
+Font ChivoMedium
+       GuiName          "Chivo (Medium)"
+       Family           sf
+       OsfOption       oldstyle
+       Package          Chivo
+       PackageOption    "medium"
+       MoreOptions      1
+       FontEncoding     OT1,LY1,T1,TS1
+       ScaleOption      scale=$$val
+EndFont
+
 Font cmbr
        GuiName          "CM Bright"
        Family           sf
index 29d454dfb3066736586b2488c6f1b15784b5365d..824986052ac7b3e2259d5821725f25f13cf3bc3f 100644 (file)
@@ -388,6 +388,7 @@ bool LaTeXFont::readFont(Lexer & lex)
                { "ot1font",              LF_OT1_FONT },
                { "package",              LF_PACKAGE },
                { "packageoption",        LF_PACKAGEOPTION },
+               { "packageoptions",       LF_PACKAGEOPTION },
                { "preamble",             LF_PREAMBLE },
                { "provides",             LF_PROVIDES },
                { "requires",             LF_REQUIRES },
index 1525112a460d9d462e8b31c500c2ef6a5dc510f9..2f4342f4127240dd84a9d75a031f5a986498f47d 100644 (file)
@@ -148,7 +148,7 @@ const char * const known_roman_font_packages[] = { "ae", "beraserif", "bookman",
 "tgpagella", "tgschola", "tgtermes", "utopia", "xcharter", 0 };
 
 const char * const known_sans_font_packages[] = { "avant", "berasans", "biolinum",
-"biolinum-type1", "cantarell", "cmbr", "cmss", "DejaVuSans", "DejaVuSansCondensed", "FiraSans", "helvet", "iwona",
+"biolinum-type1", "cantarell", "Chivo", "cmbr", "cmss", "DejaVuSans", "DejaVuSansCondensed", "FiraSans", "helvet", "iwona",
 "iwonac", "iwonal", "iwonalc", "kurier", "kurierc", "kurierl", "kurierlc", "lmss", "noto", "noto-sans", "PTSans",
 "tgadventor", "tgheros", "uop", 0 };
 
@@ -1135,6 +1135,38 @@ void Preamble::handle_package(Parser &p, string const & name,
                options.clear();
        }
 
+       if (name == "Chivo") {
+               h_font_roman[0] = "Chivo";
+               for (auto const & opt : allopts) {
+                       if (opt == "thin") {
+                               h_font_roman[0] = "ChivoThin";
+                               continue;
+                       }
+                       if (opt == "light") {
+                               h_font_roman[0] = "ChivoLight";
+                               continue;
+                       }
+                       if (opt == "regular") {
+                               h_font_roman[0] = "Chivo";
+                               continue;
+                       }
+                       if (opt == "medium") {
+                               h_font_roman[0] = "ChivoMedium";
+                               continue;
+                       }
+                       if (prefixIs(opt, "oldstyle")) {
+                               h_font_sans_osf = "true";
+                               continue;
+                       }
+                       if (!xopts.empty())
+                               xopts += ", ";
+                       xopts += opt;
+               }
+               if (!xopts.empty())
+                       h_font_sans_opts = xopts;
+               options.clear();
+       }
+
        if (name == "PTSans") {
                h_font_sans[0] = "PTSans-TLF";
        }
index 1fb7c5d5f05bfdda10e1f8fef8f9f952aedcff2a..e957b7ad2172fe7a7ec524b77f50edd97f46c358 100644 (file)
@@ -32,8 +32,8 @@ extern char const * const lyx_version_info;
 
 // Do not remove the comment below, so we get merge conflict in
 // independent branches. Instead add your own.
-#define LYX_FORMAT_LYX 582 // Kornel: Add cantarell sans serif font
-#define LYX_FORMAT_TEX2LYX 582
+#define LYX_FORMAT_LYX 583 // Kornel: Add Chivo sans serif font
+#define LYX_FORMAT_TEX2LYX 583
 
 #if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
 #ifndef _MSC_VER