From 5c02ca57d415dfe1546d754772308d3a29018f78 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 29 Nov 2010 07:52:58 +0000 Subject: [PATCH] * BufferParams.cpp: use polyglossia only with nonTeXFonts. Now the UG compiles with XeTeX and tex fonts. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36578 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferParams.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index ec64e3919e..4ab49508aa 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -1188,7 +1188,8 @@ void BufferParams::validate(LaTeXFeatures & features) const features.require("color"); } - if (features.runparams().flavor == OutputParams::XETEX) + if (features.runparams().flavor == OutputParams::XETEX + && useNonTeXFonts) features.require("polyglossia"); if (language->lang() == "vietnamese") @@ -1339,11 +1340,7 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features, texrow.newline(); // end of \documentclass defs - // Fontspec must also be loaded if XeTeX is used with tex fonts - // (in order to prevent later loading which overrides the tex - // fonts) - if (features.runparams().flavor == OutputParams::XETEX - || useNonTeXFonts) { + if (useNonTeXFonts) { os << "\\usepackage{fontspec}\n"; texrow.newline(); } -- 2.39.2