From 49e4763f6b68c51c2dad9c69587f070ce8391f53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Sat, 21 Jun 2008 07:12:56 +0000 Subject: [PATCH] * 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 --- src/Paragraph.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.39.2