Using different entries for this new Noto-handling seems to work. Would be nice, if the previous Noto handling would disappear, but the conversion is not nice.
OK to commit?
diff --git a/lib/chkconfig.ltx b/lib/chkconfig.ltx
index d8b027f..dbdb7ed 100644
--- a/lib/chkconfig.ltx
+++ b/lib/chkconfig.ltx
@@ -485,10 +485,13 @@
\TestPackage{MinionPro}
\TestFont[rzmnr]{minion2newtx}
\TestPackage{newtxmath}
\TestPackage[binhex.tex]{binhex} % required by newtxmath
\TestPackage{noto}
+\TestPackage{noto-serif}
+\TestPackage{noto-sans}
+\TestPackage{noto-mono}
\TestPackage{paratype}
\TestFont[psyr]{symbol}
\TestPackage{tgadventor}
\TestPackage{tgbonum}
\TestPackage{tgchorus}
diff --git a/lib/latexfonts b/lib/latexfonts
index 31f0088..53032a4 100644
--- a/lib/latexfonts
+++ b/lib/latexfonts
@@ -357,10 +357,55 @@ Font newcent
GuiName "New Century Schoolbook"
Family rm
Package newcent
EndFont
+Font NotoSerifRegular
+ GuiName "Noto Serif Regular"
+ Family rm
+ Package noto-serif
+ PackageOption regular
+ OsfDefault 0
+ OsfOption osf
+EndFont
+
+Font NotoSerifMedium
+ GuiName "Noto Serif Medium"
+ Family rm
+ Package noto-serif
+ PackageOption medium
+ OsfDefault 0
+ OsfOption osf
+EndFont
+
+Font NotoSerifThin
+ GuiName "Noto Serif Thin"
+ Family rm
+ Package noto-serif
+ PackageOption thin
+ OsfDefault 0
+ OsfOption osf
+EndFont
+
+Font NotoSerifLight
+ GuiName "Noto Serif Light"
+ Family rm
+ Package noto-serif
+ PackageOption light
+ OsfDefault 0
+ OsfOption osf
+EndFont
+
+Font NotoSerifExtralight
+ GuiName "Noto Serif Extralight"
+ Family rm
+ Package noto-serif
+ PackageOption extralight
+ OsfDefault 0
+ OsfOption osf
+EndFont
+
Font NotoSerif-TLF
GuiName "Noto Serif"
Family rm
SwitchDefault 1
Requires noto
@@ -718,10 +763,58 @@ Font lmss
Family sf
SwitchDefault 1
Requires lmodern
EndFont
+Font NotoSansRegular
+ GuiName "Noto Sans Regular"
+ Family sf
+ ScaleOption scaled=$$val
+ Package noto-sans
+ OsfDefault 0
+ OsfOption osf
+EndFont
+
+Font NotoSansMedium
+ GuiName "Noto Sans Medium"
+ Family sf
+ ScaleOption scaled=$$val
+ Package noto-sans
+ OsfDefault 0
+ OsfOption osf
+EndFont
+
+Font NotoSansThin
+ GuiName "Noto Sans Thin"
+ Family sf
+ ScaleOption scaled=$$val
+ Package noto-sans
+ PackageOption thin
+ OsfDefault 0
+ OsfOption osf
+EndFont
+
+Font NotoSansLight
+ GuiName "Noto Sans Light"
+ Family sf
+ ScaleOption scaled=$$val
+ Package noto-sans
+ PackageOption light
+ OsfDefault 0
+ OsfOption osf
+EndFont
+
+Font NotoSansExtralight
+ GuiName "Noto Sans Extralight"
+ Family sf
+ ScaleOption scaled=$$val
+ Package noto-sans
+ PackageOption extralight
+ OsfDefault 0
+ OsfOption osf
+EndFont
+
Font NotoSans-TLF
GuiName "Noto Sans"
Family sf
SwitchDefault 1
Requires noto
@@ -867,10 +960,18 @@ Font luximono
Family tt
ScaleOption scaled=$$val
Package luximono
EndFont
+Font NotoMonoRegular
+ GuiName "Noto Mono Regular"
+ Family tt
+ ScaleOption scaled=$$val
+ Package noto-mono
+ PackageOption regular
+EndFont
+
Font NotoMono-TLF
GuiName "Noto Mono"
Family tt
SwitchDefault 1
Requires noto
diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py
index 3bf7a6b..6e69e36 100644
--- a/lib/lyx2lyx/lyx_2_4.py
+++ b/lib/lyx2lyx/lyx_2_4.py
@@ -156,10 +156,20 @@ def createFontMapping(fontlist):
"typewriter", "tt", "plex-mono", "scale")
elif font == 'Adobe':
fm.expandFontMapping(['ADOBESourceSerifPro'], "roman", None, "sourceserifpro")
fm.expandFontMapping(['ADOBESourceSansPro'], "sans", "sf", "sourcesanspro", "scaled")
fm.expandFontMapping(['ADOBESourceCodePro'], "typewriter", "tt", "sourcecodepro", "scaled")
+ elif font == 'Noto':
+ fm.expandFontMapping(['NotoSerifRegular,regular', 'NotoSerifMedium,medium',
+ 'NotoSerifThin,thin', 'NotoSerifLight,light',
+ 'NotoSerifExtralight,extralight'],
+ "roman", None, "noto-serif")
+ fm.expandFontMapping(['NotoSansRegular,regular', 'NotoSansMedium,medium',
+ 'NotoSansThin,thin', 'NotoSansLight,light',
+ 'NotoSansExtralight,extralight'],
+ "sans", "sf", "noto-sans", "scaled")
+ fm.expandFontMapping(['NotoMonoRegular'], "typewriter", "tt", "noto-mono", "scaled")
return fm
def convert_fonts(document, fm):
" Handle font definition to LaTeX "
@@ -271,10 +281,26 @@ def revert_fonts(document, fm, fontmap):
###
### Conversion and reversion routines
###
###############################################################################
+def convert_notoFonts(document):
+ " Handle Noto fonts definition to LaTeX "
+
+ if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
+ fm = createFontMapping(['Noto'])
+ convert_fonts(document, fm)
+
+def revert_notoFonts(document):
+ " Revert native Noto font definition to LaTeX "
+
+ if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
+ fontmap = dict()
+ fm = createFontMapping(['Noto'])
+ revert_fonts(document, fm, fontmap)
+ add_preamble_fonts(document, fontmap)
+
def convert_latexFonts(document):
" Handle DejaVu and IBMPlex fonts definition to LaTeX "
if find_token(document.header, "\\use_non_tex_fonts false", 0) != -1:
fm = createFontMapping(['DejaVu', 'IBM'])
@@ -1606,14 +1632,16 @@ convert = [
[566, [convert_hebrew_parentheses]],
[567, []],
[568, []],
[569, []],
[570, []],
- [571, []]
+ [571, []],
+ [572, [convert_notoFonts]] # Added options thin, light, extralight for Noto
]
revert = [
+ [571, [revert_notoFonts]],
[570, [revert_cmidruletrimming]],
[569, [revert_bibfileencodings]],
[568, [revert_tablestyle]],
[567, [revert_soul]],
[566, [revert_malayalam]],
diff --git a/src/version.h b/src/version.h
index 2b90096..bfdc421 100644
--- a/src/version.h
+++ b/src/version.h
@@ -30,12 +30,12 @@ extern char const * const lyx_package;
/// This is the version information shown by 'lyx -version'
extern char const * const lyx_version_info;
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
-#define LYX_FORMAT_LYX 571 // spitz: cmidrule trimming
-#define LYX_FORMAT_TEX2LYX 571
+#define LYX_FORMAT_LYX 572 // kornel: Noto fonts expanded to use more options
+#define LYX_FORMAT_TEX2LYX 572
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
#ifndef _MSC_VER
#warning "tex2lyx produces an out of date file format."
#warning "Please update tex2lyx as soon as possible, since it depends implicitly"
signature.asc
Description: This is a digitally signed message part.
