]> git.lyx.org Git - features.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>
Thu, 18 Jun 2020 13:48:51 +0000 (15:48 +0200)
commit2ea5f1f4105487ae4af4bf62bce4d5e7c5502b60
tree4a64fe3065d812948d4e81ec42e57b5ab13dcb0a
parent24fe40b8f8ad50a4187ce4a9498a56639d9a13f4
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!

(hopefully) Fixes bug #11691.
src/frontends/qt/GuiFontMetrics.cpp