i += 1
+def revert_noto(document):
+ " Revert Noto font definitions to LaTeX "
+
+ if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
+ preamble = ""
+ i = find_token(document.header, "\\font_roman \"NotoSerif-TLF\"", 0)
+ if i != -1:
+ add_to_preamble(document, ["\\renewcommand{\\rmdefault}{NotoSerif-TLF}"])
+ document.header[i] = document.header[i].replace("NotoSerif-TLF", "default")
+ i = find_token(document.header, "\\font_sans \"NotoSans-TLF\"", 0)
+ if i != -1:
+ add_to_preamble(document, ["\\renewcommand{\\sfdefault}{NotoSans-TLF}"])
+ document.header[i] = document.header[i].replace("NotoSans-TLF", "default")
+ i = find_token(document.header, "\\font_typewriter \"NotoMono-TLF\"", 0)
+ if i != -1:
+ add_to_preamble(document, ["\\renewcommand{\\ttdefault}{NotoMono-TLF}"])
+ document.header[i] = document.header[i].replace("NotoMono-TLF", "default")
+
+
##
# Conversion hub
#
[532, [convert_literalparam]],
[533, []],
[534, []],
- [535, [convert_dashligatures]]
+ [535, [convert_dashligatures]],
+ [536, []]
]
revert = [
+ [535, [revert_noto]],
[534, [revert_dashligatures]],
[533, [revert_chapterbib]],
[532, [revert_multibib]],
const char * const known_roman_fonts[] = { "ae", "beraserif", "bookman",
"ccfonts", "chancery", "charter", "cmr", "cochineal", "crimson", "fourier",
"garamondx", "libertine", "libertine-type1", "lmodern", "mathdesign", "mathpazo",
-"mathptmx", "newcent", "tgbonum", "tgchorus", "tgpagella", "tgschola", "tgtermes",
-"utopia", 0};
+"mathptmx", "newcent", "NotoSerif-TLF", "tgbonum", "tgchorus", "tgpagella", "tgschola",
+"tgtermes", "utopia", 0};
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", "NotoSans-TLF", "tgadventor", "tgheros", 0};
const char * const known_typewriter_fonts[] = { "beramono", "cmtl", "cmtt",
"courier", "lmtt", "luximono", "fourier", "libertineMono-type1", "lmodern",
-"mathpazo", "mathptmx", "newcent", "tgcursor", "txtt", 0};
+"mathpazo", "mathptmx", "newcent", "NotoMono-TLF", "tgcursor", "txtt", 0};
const char * const known_math_fonts[] = { "eulervm", "newtxmath", 0};
h_font_osf = "true";
}
+ if (name == "noto") {
+ // noto can have several options
+ if (opts.empty())
+ h_font_roman[0] = "NotoSerif-TLF";
+ string::size_type pos = opts.find("rm");
+ if (pos != string::npos)
+ h_font_roman[0] = "NotoSerif-TLF";
+ pos = opts.find("sf");
+ if (pos != string::npos)
+ h_font_sans[0] = "NotoSans-TLF";
+ pos = opts.find("nott");
+ if (pos != string::npos) {
+ h_font_roman[0] = "NotoSerif-TLF";
+ h_font_sans[0] = "NotoSans-TLF";
+ }
+ // noto as typewriter is handled in handling of \ttdefault
+ // special cases are handled in handling of \rmdefault and \sfdefault
+ }
+
// sansserif fonts
if (is_known(name, known_sans_fonts)) {
h_font_sans[0] = name;