[LyX/master] prioretize-user-font-options

Juergen Spitzmueller spitz at lyx.org
Fri Aug 11 08:00:31 UTC 2023


commit 9f29fb33d1d9d4b42420e4ee950d4b36145fbb28
Author: Udi Fogiel <udifoglle at gmail.com>
Date:   Fri Jul 7 00:47:20 2023 +0300

    prioretize-user-font-options
---
 src/BufferParams.cpp |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index ec4d290..875b8d0 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -3527,11 +3527,11 @@ string const BufferParams::loadFonts(LaTeXFeatures & features) const
 				os << "\\babelfont{rm}[";
 			else
 				os << "\\setmainfont[";
-			if (!font_roman_opts.empty())
-				os << font_roman_opts << ',';
 			os << texmapping;
 			if (fonts_roman_osf)
 				os << ",Numbers=OldStyle";
+			if (!font_roman_opts.empty())
+				os << ',' << font_roman_opts;
 			os << "]{" << parseFontName(fontsRoman()) << "}\n";
 		}
 		if (fontsSans() != "default") {
@@ -3545,10 +3545,10 @@ string const BufferParams::loadFonts(LaTeXFeatures & features) const
 				   << float(fontsSansScale()) / 100 << ',';
 				if (fonts_sans_osf)
 					os << "Numbers=OldStyle,";
+				os << texmapping;
 				if (!font_sans_opts.empty())
-					os << font_sans_opts << ',';
-				os << texmapping << "]{"
-				   << sans << "}\n";
+					os << ',' << font_sans_opts;
+				os << "]{" << sans << "}\n";
 			} else {
 				if (babelfonts)
 					os << "\\babelfont{sf}[";
@@ -3556,10 +3556,10 @@ string const BufferParams::loadFonts(LaTeXFeatures & features) const
 					os << "\\setsansfont[";
 				if (fonts_sans_osf)
 					os << "Numbers=OldStyle,";
+				os << texmapping;
 				if (!font_sans_opts.empty())
-					os << font_sans_opts << ',';
-				os << texmapping << "]{"
-				   << sans << "}\n";
+					os << ',' << font_sans_opts;
+				os << "]{" << sans << "}\n";
 			}
 		}
 		if (fontsTypewriter() != "default") {


More information about the lyx-cvs mailing list