]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
Use unsigned values for enum
[lyx.git] / src / Font.cpp
index 941f94a36c49822591ccd045684a7f8e49c5c5e2..476ce372753bac4b2d15a2b97bfaafbb3dc1f288 100644 (file)
@@ -340,7 +340,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
        // the numbers are written Left-to-Right. ArabTeX package
        // and bidi (polyglossia with XeTeX) reorder the number automatically
        // but the packages used for Hebrew and Farsi (Arabi) do not.
-       if (!(runparams.use_polyglossia && runparams.flavor == OutputParams::XETEX)
+       if (!runparams.useBidiPackage()
            && !runparams.pass_thru
            && bits_.number() == FONT_ON
            && prev.fontInfo().number() != FONT_ON
@@ -507,7 +507,7 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams,
        // the numbers are written Left-to-Right. ArabTeX package
        // and bidi (polyglossia with XeTeX) reorder the number automatically
        // but the packages used for Hebrew and Farsi (Arabi) do not.
-       if (!(runparams.use_polyglossia && runparams.flavor == OutputParams::XETEX)
+       if (!runparams.useBidiPackage()
            && !runparams.pass_thru
            && bits_.number() == FONT_ON
            && next.fontInfo().number() != FONT_ON
@@ -538,8 +538,7 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams,
 
        if (closeLanguage
            && language() != base.language() && language() != next.language()
-           && (language()->encoding()->package() != Encoding::CJK
-                       || bparams.useNonTeXFonts)) {
+           && (language()->encoding()->package() != Encoding::CJK)) {
                os << '}';
                ++count;
                bool const using_begin_end =