mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-12 22:14:35 +00:00
tex2lyx: support cantarell font
This commit is contained in:
parent
f404b57de2
commit
b50336c0b0
@ -148,7 +148,7 @@ const char * const known_roman_font_packages[] = { "ae", "beraserif", "bookman",
|
|||||||
"tgpagella", "tgschola", "tgtermes", "utopia", "xcharter", 0 };
|
"tgpagella", "tgschola", "tgtermes", "utopia", "xcharter", 0 };
|
||||||
|
|
||||||
const char * const known_sans_font_packages[] = { "avant", "berasans", "biolinum",
|
const char * const known_sans_font_packages[] = { "avant", "berasans", "biolinum",
|
||||||
"biolinum-type1", "cmbr", "cmss", "DejaVuSans", "DejaVuSansCondensed", "helvet", "iwona", "iwonac", "iwonal", "iwonalc",
|
"biolinum-type1", "cantarell", "cmbr", "cmss", "DejaVuSans", "DejaVuSansCondensed", "helvet", "iwona", "iwonac", "iwonal", "iwonalc",
|
||||||
"kurier", "kurierc", "kurierl", "kurierlc", "lmss", "noto", "noto-sans", "PTSans",
|
"kurier", "kurierc", "kurierl", "kurierlc", "lmss", "noto", "noto-sans", "PTSans",
|
||||||
"tgadventor", "tgheros", "uop", 0 };
|
"tgadventor", "tgheros", "uop", 0 };
|
||||||
|
|
||||||
@ -1088,6 +1088,27 @@ void Preamble::handle_package(Parser &p, string const & name,
|
|||||||
h_font_sans_osf = "true";
|
h_font_sans_osf = "true";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name == "cantarell") {
|
||||||
|
for (auto const & opt : allopts) {
|
||||||
|
if (opt == "defaultsans")
|
||||||
|
continue;
|
||||||
|
if (prefixIs(opt, "oldstyle")) {
|
||||||
|
h_font_sans_osf = "true";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (prefixIs(opt, "scale=")) {
|
||||||
|
scale_as_percentage(opt, h_font_sf_scale[0]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!xopts.empty())
|
||||||
|
xopts += ", ";
|
||||||
|
xopts += opt;
|
||||||
|
}
|
||||||
|
if (!xopts.empty())
|
||||||
|
h_font_sans_opts = xopts;
|
||||||
|
options.clear();
|
||||||
|
}
|
||||||
|
|
||||||
if (name == "PTSans") {
|
if (name == "PTSans") {
|
||||||
h_font_sans[0] = "PTSans-TLF";
|
h_font_sans[0] = "PTSans-TLF";
|
||||||
if (options.size() >= 1) {
|
if (options.size() >= 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user