EndFont
Font NotoSerifRegular
- GuiName "Noto Serif"
- Family rm
- Package noto-serif
- OsfOption osf
+ GuiName "Noto Serif"
+ Family rm
+ Package noto-serif
+ OsfOption osf
+ MoreOptions 1
+ CompleteFont noto
+EndFont
+
+AltFont noto
+ GuiName "Noto Serif"
+ Family rm
+ Package noto
+ OsfOption osf
MoreOptions 1
EndFont
Font NotoSerifMedium
- GuiName "Noto Serif (Medium)"
- Family rm
- Package noto-serif
- PackageOptions medium
- OsfDefault 0
- OsfOption osf
+ GuiName "Noto Serif (Medium)"
+ Family rm
+ Package noto-serif
+ PackageOptions medium
+ OsfDefault 0
+ OsfOption osf
MoreOptions 1
EndFont
Font NotoSerifThin
- GuiName "Noto Serif (Thin)"
- Family rm
- Package noto-serif
- PackageOptions thin
- OsfDefault 0
- OsfOption osf
+ GuiName "Noto Serif (Thin)"
+ Family rm
+ Package noto-serif
+ PackageOptions thin
+ OsfDefault 0
+ OsfOption osf
MoreOptions 1
EndFont
Font NotoSerifLight
- GuiName "Noto Serif (Light)"
- Family rm
- Package noto-serif
- PackageOptions light
- OsfDefault 0
- OsfOption osf
+ GuiName "Noto Serif (Light)"
+ Family rm
+ Package noto-serif
+ PackageOptions light
+ OsfDefault 0
+ OsfOption osf
MoreOptions 1
EndFont
Font NotoSerifExtralight
- GuiName "Noto Serif (Extralight)"
- Family rm
- Package noto-serif
- PackageOptions extralight
- OsfDefault 0
- OsfOption osf
- MoreOptions 1
-EndFont
-
-Font NotoSerif-TLF
- GuiName "Noto Serif"
- Family rm
- SwitchDefault 1
- Requires noto
- CompleteFont noto
-EndFont
-
-AltFont noto
- GuiName "Noto Serif"
+ GuiName "Noto Serif (Extralight)"
Family rm
- Package noto
+ Package noto-serif
+ PackageOptions extralight
+ OsfDefault 0
OsfOption osf
MoreOptions 1
EndFont
Package noto-sans
OsfDefault 0
OsfOption osf
- MoreOptions 1
+ MoreOptions 1
EndFont
Font NotoSansMedium
PackageOptions medium
OsfDefault 0
OsfOption osf
- MoreOptions 1
+ MoreOptions 1
EndFont
Font NotoSansThin
PackageOptions thin
OsfDefault 0
OsfOption osf
- MoreOptions 1
+ MoreOptions 1
EndFont
Font NotoSansLight
PackageOptions light
OsfDefault 0
OsfOption osf
- MoreOptions 1
+ MoreOptions 1
EndFont
Font NotoSansExtralight
PackageOptions extralight
OsfDefault 0
OsfOption osf
- MoreOptions 1
-EndFont
-
-Font NotoSans-TLF
- GuiName "Noto Sans"
- Family sf
- SwitchDefault 1
- Requires noto
+ MoreOptions 1
EndFont
Font PTSans-TLF
else:
NonTeXFonts = str2bool(get_value(document.header, "\\use_non_tex_fonts", i))
- sbfonts = ["IBMPlexSerifSemibold", "IBMPlexSansSemibold", "IBMPlexMonoSemibold" ]
-
i = find_token(document.header, "\\font_roman", 0)
if i == -1:
document.warning("Malformed LyX document: Missing \\font_roman.")
document.header[x] = "\\font_typewriter_opts \"semibold, " + sfopts[1].strip('"') + "\""
+def convert_NotoRegulars(document):
+ " Merge diverse noto reagular fonts "
+
+ i = find_token(document.header, "\\font_roman", 0)
+ if i == -1:
+ document.warning("Malformed LyX document: Missing \\font_roman.")
+ else:
+ # We need to use this regex since split() does not handle quote protection
+ romanfont = re.findall(r'[^"\s]\S*|".+?"', document.header[i])
+ roman = romanfont[1].strip('"')
+ if roman == "NotoSerif-TLF":
+ romanfont[1] = '"NotoSerifRegular"'
+ document.header[i] = " ".join(romanfont)
+
+ i = find_token(document.header, "\\font_sans", 0)
+ if i == -1:
+ document.warning("Malformed LyX document: Missing \\font_sans.")
+ else:
+ # We need to use this regex since split() does not handle quote protection
+ sffont = re.findall(r'[^"\s]\S*|".+?"', document.header[i])
+ sf = sffont[1].strip('"')
+ if sf == "NotoSans-TLF":
+ sffont[1] = '"NotoSansRegular"'
+ document.header[i] = " ".join(sffont)
+
+ i = find_token(document.header, "\\font_typewriter", 0)
+ if i == -1:
+ document.warning("Malformed LyX document: Missing \\font_typewriter.")
+ else:
+ # We need to use this regex since split() does not handle quote protection
+ ttfont = re.findall(r'[^"\s]\S*|".+?"', document.header[i])
+ tt = ttfont[1].strip('"')
+ if tt == "NotoMono-TLF":
+ ttfont[1] = '"NotoMonoRegular"'
+ document.header[i] = " ".join(ttfont)
+
+
##
# Conversion hub
#
[580, []],
[581, [convert_osf]],
[582, [convert_AdobeFonts,convert_latexFonts,convert_notoFonts,convert_CantarellFont,convert_FiraFont]],# old font re-converterted due to extra options
- [583, [convert_ChivoFont,convert_Semibolds]],
+ [583, [convert_ChivoFont,convert_Semibolds,convert_NotoRegulars]],
]
revert = [[582, [revert_ChivoFont]],