]> git.lyx.org Git - features.git/commitdiff
Fix output encoding information for non-TeX fonts XeTeX/LuaTeX on preview pane
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 24 Jan 2015 14:53:28 +0000 (15:53 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 10 Feb 2015 10:26:15 +0000 (11:26 +0100)
Fixes: #8919
src/Buffer.cpp
src/BufferParams.cpp
status.21x

index d629debf08ba527996efe879fcb4a2fa6fbc71e1..80560dd772ae02c4c2aebd826fc16ccee0732396 100644 (file)
@@ -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
index 0ca1364a89b2908652417ecfe7bd09bb58608b81..fc425f90de0d5295d1d0c8525848bfe19fd4e37b 100644 (file)
@@ -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")
index e708d76e17dce9105de426c1082922c012e76243..845a5438feb7b3e272bec2c28e2cb6cc42ff3d91 100644 (file)
@@ -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