diff --git a/lib/latexfonts b/lib/latexfonts index 53032a441c..4ca3188a40 100644 --- a/lib/latexfonts +++ b/lib/latexfonts @@ -779,6 +779,7 @@ Font NotoSansMedium Family sf ScaleOption scaled=$$val Package noto-sans + PackageOption medium OsfDefault 0 OsfOption osf EndFont diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp index 3114552afc..db715a1e7c 100644 --- a/src/tex2lyx/Preamble.cpp +++ b/src/tex2lyx/Preamble.cpp @@ -868,6 +868,18 @@ void Preamble::handle_package(Parser &p, string const & name, else if (opts.find("semibold") != string::npos) h_font_roman[0] = "IBMPlexSerifSemibold"; } + if (name == "noto-serif") { + if (opts.empty()) + h_font_roman[0] = "NotoSerifRegular"; + else if (opts.find("thin") != string::npos) + h_font_roman[0] = "NotoSerifThin"; + else if (opts.find("medium") != string::npos) + h_font_roman[0] = "NotoSerifMedium"; + else if (opts.find("light") != string::npos) + h_font_roman[0] = "NotoSerifLight"; + else if (opts.find("extralight") != string::npos) + h_font_roman[0] = "NotoSerifExtralight"; + } // sansserif fonts if (is_known(name, known_sans_fonts)) { @@ -920,6 +932,17 @@ void Preamble::handle_package(Parser &p, string const & name, h_font_sf_scale[1] = scale; } } + if (name == "noto-sans") { + h_font_sans[0] = "NotoSansRegular"; + if (opts.find("medium") != string::npos) + h_font_sans[0] = "NotoSansMedium"; + else if (opts.find("thin") != string::npos) + h_font_sans[0] = "NotoSansThin"; + else if (opts.find("light") != string::npos) + h_font_sans[0] = "NotoSansLight"; + else if (opts.find("extralight") != string::npos) + h_font_sans[0] = "NotoSansExtralight"; + } // typewriter fonts if (is_known(name, known_typewriter_fonts)) { @@ -970,6 +993,10 @@ void Preamble::handle_package(Parser &p, string const & name, } } + if (name == "noto-mono") { + h_font_typewriter[0] = "NotoMonoRegular"; + } + // font uses old-style figure if (name == "eco") h_font_osf = "true";