]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
return from switch
[lyx.git] / src / Font.cpp
index 476ce372753bac4b2d15a2b97bfaafbb3dc1f288..c344ac9ea8155a458b3d425f617b0061ac699da7 100644 (file)
@@ -228,8 +228,13 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
            && language() != prev.language()) {
                if (!language()->polyglossia().empty()) {
                        string tmp = "\\text" + language()->polyglossia();
-                       if (!language()->polyglossiaOpts().empty())
+                       if (!language()->polyglossiaOpts().empty()) {
                                tmp += "[" + language()->polyglossiaOpts() + "]";
+                               if (runparams.use_hyperref && runparams.moving_arg)
+                                       // We need to strip the command for
+                                       // the pdf string, see #11813
+                                       tmp = "\\texorpdfstring{" + tmp + "}{}";
+                       }
                        tmp += "{";
                        os << from_ascii(tmp);
                        count += tmp.length();
@@ -773,7 +778,7 @@ ostream & operator<<(ostream & os, FontInfo const & f)
 ostream & operator<<(ostream & os, Font const & font)
 {
        return os << font.bits_
-               << " lang: " << (font.lang_ ? font.lang_->lang() : 0);
+               << " lang: " << (font.lang_ ? font.lang_->lang() : nullptr);
 }