commit fcc1cffb1ae1c28c7e09df5b79e195ab17434a59
Author: Günter Milde <mi...@lyx.org>
Date:   Wed Jan 10 15:31:32 2018 +0100

    Do not write LICR macro if character is encodable.
    
    No hardcoded conversion of literal dashes to
    \textemdash and \textendash macros.
---
 src/Paragraph.cpp |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 55896c9..fc5b941 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -1290,6 +1290,9 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
                // XeTeX's dash behaviour is determined via a global setting
                if (bparams.use_dash_ligatures
                    && owner_->getFontSettings(bparams, i).fontInfo().family() 
!= TYPEWRITER_FAMILY
+                       && !runparams.inIPA
+                       // TODO #10961: && not in inset Flex Code
+                       // TODO #10961: && not in layout LyXCode
                    && (!bparams.useNonTeXFonts || runparams.flavor != 
OutputParams::XETEX)) {
                        if (c == 0x2013) {
                                // en-dash
@@ -1418,14 +1421,6 @@ bool Paragraph::Private::latexSpecialT3(char_type const 
c, otexstream & os,
                os << "\\textvertline" << termcmd;
                column += 14;
                return true;
-       case 0x2013:
-               os << "\\textendash" << termcmd;
-               column += 12;
-               return true;
-       case 0x2014:
-               os << "\\textemdash" << termcmd;
-               column += 12;
-               return true;
        default:
                return false;
        }

Reply via email to