]> git.lyx.org Git - features.git/commitdiff
Check script char fontenc from main language.
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 5 May 2018 13:26:37 +0000 (15:26 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 5 May 2018 13:26:37 +0000 (15:26 +0200)
src/Paragraph.cpp

index 307f8f4549bdbb383e6544e563ac559f925a84dc..7aa0d1fc565e3bdac26b01970fbb357e26cd62f4 100644 (file)
@@ -913,7 +913,7 @@ int Paragraph::Private::latexSurrogatePair(BufferParams const & bparams,
        if (runparams.local_font)
                fontenc = runparams.local_font->language()->fontenc(bparams);
        else
-               fontenc = runparams.main_fontenc;
+               fontenc = bparams.language->fontenc(bparams);
        docstring scriptmacro;
        docstring cb;
        if (script == "textgreek" || script == "textcyrillic") {
@@ -1395,10 +1395,7 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
                        }
                }
                string fontenc;
-               if (running_font.language()->lang() == bparams.language->lang())
-                       fontenc = runparams.main_fontenc;
-               else
-                       fontenc = running_font.language()->fontenc(bparams);
+               fontenc = running_font.language()->fontenc(bparams);
                // "Script chars" need to embraced in \textcyrillic and \textgreek notwithstanding
                // whether they are encodable or not (it only depends on the font encoding)
                if (!runparams.isFullUnicode() && Encodings::isKnownScriptChar(c, script)) {