From 2d2c0a99c35775ad3abcefccba2a1e64b354536e Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 24 Jan 2015 15:53:28 +0100 Subject: [PATCH] Fix output encoding information for non-TeX fonts XeTeX/LuaTeX on preview pane Fixes: #8919 --- src/Buffer.cpp | 5 +++++ src/BufferParams.cpp | 3 ++- status.21x | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index d629debf08..80560dd772 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1624,6 +1624,11 @@ void Buffer::writeLaTeXSource(otexstream & os, OutputParams runparams = runparams_in; + // This is necessary for LuaTeX/XeTeX with tex fonts. + // See FIXME in BufferParams::encoding() + if (runparams.isFullUnicode()) + runparams.encoding = encodings.fromLyXName("utf8-plain"); + // If we are compiling a file standalone, even if this is the // child of some other buffer, let's cut the link here, so the // file is really independent and no concurring settings from diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 0ca1364a89..fc425f90de 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -2989,7 +2989,8 @@ Encoding const & BufferParams::encoding() const // FIXME: actually, we should check for the flavor // or runparams.isFullyUnicode() here: // This check will not work with XeTeX/LuaTeX and tex fonts. - // Thus we have to reset the encoding in Buffer::makeLaTeXFile. + // Thus we have to reset the encoding in Buffer::makeLaTeXFile + // (for export) and Buffer::writeLaTeXSource (for preview). if (useNonTeXFonts) return *(encodings.fromLyXName("utf8-plain")); if (inputenc == "auto" || inputenc == "default") diff --git a/status.21x b/status.21x index e708d76e17..845a5438fe 100644 --- a/status.21x +++ b/status.21x @@ -64,6 +64,9 @@ What's new - Fix name and hint of figure captions in documents using the class aastex. +- Fix output encoding information for non-TeX fonts XeTeX/LuaTeX on preview + pane (bug 8919). + * INTERNALS -- 2.39.5