+ if (name == "cantarell") {
+ for (auto const & opt : allopts) {
+ if (opt == "defaultsans")
+ 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 == "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";
+ }
+
+ if (name == "FiraSans") {
+ h_font_sans_osf = "true";
+ for (auto const & opt : allopts) {
+ if (opt == "book") {
+ h_font_sans[0] = "FiraSansBook";
+ continue;
+ }
+ if (opt == "thin") {
+ continue;
+ }
+ if (opt == "extralight") {
+ h_font_sans[0] = "FiraSansExtralight";
+ continue;
+ }
+ if (opt == "light") {
+ h_font_sans[0] = "FiraSansLight";
+ continue;
+ }
+ if (opt == "ultralight") {
+ h_font_sans[0] = "FiraSansUltralight";
+ continue;
+ }
+ if (opt == "thin") {
+ h_font_sans[0] = "FiraSansThin";
+ continue;
+ }
+ if (opt == "lf" || opt == "lining") {
+ h_font_sans_osf = "false";
+ continue;
+ }
+ if (!xopts.empty())
+ xopts += ", ";
+ xopts += opt;
+ }
+ if (!xopts.empty())
+ h_font_sans_opts = xopts;
+ options.clear();
+ }
+
+ if (name == "plex-sans") {
+ h_font_sans[0] = "IBMPlexSans";
+ for (auto const & opt : allopts) {
+ if (opt == "condensed") {
+ h_font_sans[0] = "IBMPlexSansCondensed";
+ continue;
+ }
+ if (opt == "thin") {
+ h_font_sans[0] = "IBMPlexSansThin";
+ continue;
+ }
+ if (opt == "extralight") {
+ h_font_sans[0] = "IBMPlexSansExtraLight";
+ continue;
+ }
+ if (opt == "light") {
+ h_font_sans[0] = "IBMPlexSansLight";
+ continue;
+ }
+ if (!xopts.empty())
+ xopts += ", ";
+ xopts += opt;
+ }
+ if (!xopts.empty())
+ h_font_sans_opts = xopts;
+ options.clear();
+ }
+
+ if (name == "noto-sans") {
+ h_font_sans[0] = "NotoSansRegular";
+ for (auto const & opt : allopts) {
+ if (opt == "regular")
+ continue;
+ if (opt == "medium") {
+ h_font_sans[0] = "NotoSansMedium";
+ continue;
+ }
+ if (opt == "thin") {
+ h_font_sans[0] = "NotoSansThin";
+ continue;
+ }
+ if (opt == "extralight") {
+ h_font_sans[0] = "NotoSansExtralight";
+ continue;
+ }
+ if (opt == "light") {
+ h_font_sans[0] = "NotoSansLight";
+ continue;
+ }
+ if (opt == "osf") {
+ h_font_sans_osf = "true";
+ continue;
+ }
+ if (!xopts.empty())
+ xopts += ", ";
+ xopts += opt;
+ }
+ if (!xopts.empty())
+ h_font_sans_opts = xopts;
+ options.clear();
+ }
+
+ if (name == "sourcesanspro") {
+ h_font_sans[0] = "ADOBESourceSansPro";
+ for (auto const & opt : allopts) {
+ if (opt == "osf") {
+ h_font_sans_osf = "true";
+ continue;
+ }
+ if (!xopts.empty())
+ xopts += ", ";
+ xopts += opt;
+ }
+ if (!xopts.empty())
+ h_font_sans_opts = xopts;
+ options.clear();
+ }
+
+ //