]> git.lyx.org Git - lyx.git/commit
Adopt a 'belt and braces' approach to bidi forcing
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 27 Jan 2020 17:38:21 +0000 (18:38 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 29 Apr 2020 20:55:25 +0000 (22:55 +0200)
commite47834104a5d68e0e0a5141fa1824ce34ea2ae46
treeab17e75e0f7c909fcd8a790b03385de217f2ccd7
parent7bdbffa88fee90c7d20ac645e96ae8bd3aef1424
Adopt a 'belt and braces' approach to bidi forcing

There are two techniques that I know of for forcing the direction of a
string, regardlessly of whether its contents is naturally LtR, RtL or
undecided.

1/ The unicode LTR/LTR override characters. This is supposed to be the
   clean way, however, it does not seem to work with Qt 5.14 (see
   #11691).

2/ The undocumented QTextLayout::setFlags method. This is used
   internally and allows to pass the (undocumented) flags
   Qt::TextForceRightToLeft and Qt::TextForceLeftToRight. This was
   used until we had issues with Qt 5.11 (see #11284).

In order to get the best of both worlds, this patch allows to enable
those two methods separately, and actually enables both at the same
time by default!

Fixes bug #11691.

(cherry picked from commit 4d6041a7b68de5856b657cfd3b735596b3d7e0e0)
src/frontends/qt4/GuiFontMetrics.cpp
status.23x