* 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
This commit is contained in:
Jürgen Spitzmüller 2010-11-29 07:52:58 +00:00
parent 1073e98e67
commit 5c02ca57d4

View File

@ -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();
}