From: Jürgen Spitzmüller Date: Sat, 21 Jun 2008 07:12:56 +0000 (+0000) Subject: * Paragraph.cpp (latexSurrogatePair): X-Git-Tag: 1.6.10~4310 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=49e4763f6b68c51c2dad9c69587f070ce8391f53;p=features.git * Paragraph.cpp (latexSurrogatePair): - do not use braces for combinated characters that are natively output (as unicode glyphs) (fixes part of bug 4946) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25347 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index eb966b8029..6522bbfe72 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -499,7 +499,12 @@ int Paragraph::Private::latexSurrogatePair(odocstream & os, char_type c, // Is this correct WRT change tracking? docstring const latex1 = encoding.latexChar(next); docstring const latex2 = encoding.latexChar(c); - os << latex1 << '{' << latex2 << '}'; + if (docstring(1, next) == latex1) { + // the encoding supports the combination + os << latex2 << latex1; + return latex1.length() + latex2.length(); + } else + os << latex1 << '{' << latex2 << '}'; return latex1.length() + latex2.length() + 2; }