mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix font and encoding switch problem with directionality change at inset
Also fixes #10110
This commit is contained in:
parent
4d1d07ea10
commit
3aefd7477c
@ -1087,6 +1087,12 @@ void Paragraph::Private::latexInset(BufferParams const & bparams,
|
|||||||
runparams.local_font = &basefont;
|
runparams.local_font = &basefont;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fontswitch_inset && !closeLanguage && fontswitch_inset) {
|
||||||
|
// The directionality has been switched at inset.
|
||||||
|
// Force markup inside.
|
||||||
|
runparams.local_font = &basefont;
|
||||||
|
}
|
||||||
|
|
||||||
size_t const previous_row_count = os.texrow().rows();
|
size_t const previous_row_count = os.texrow().rows();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -2660,7 +2666,8 @@ void Paragraph::latex(BufferParams const & bparams,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Switch file encoding if necessary (and allowed)
|
// Switch file encoding if necessary (and allowed)
|
||||||
if (!runparams.pass_thru && !style.pass_thru &&
|
if ((!fontswitch_inset || closeLanguage)
|
||||||
|
&& !runparams.pass_thru && !style.pass_thru &&
|
||||||
runparams.encoding->package() != Encoding::none &&
|
runparams.encoding->package() != Encoding::none &&
|
||||||
current_font.language()->encoding()->package() != Encoding::none) {
|
current_font.language()->encoding()->package() != Encoding::none) {
|
||||||
pair<bool, int> const enc_switch =
|
pair<bool, int> const enc_switch =
|
||||||
|
Loading…
Reference in New Issue
Block a user