mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
change unicode for better font support and fix some cases (#4139)
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com> Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
c714f15ce9
commit
070151fbc8
|
@ -5,7 +5,7 @@
|
||||||
- Major: Added support for Twitch's Chat Replies. [Wiki Page](https://wiki.chatterino.com/Features/#message-replies) (#3722, #3989, #4041, #4047, #4055, #4067, #4077, #3905)
|
- Major: Added support for Twitch's Chat Replies. [Wiki Page](https://wiki.chatterino.com/Features/#message-replies) (#3722, #3989, #4041, #4047, #4055, #4067, #4077, #3905)
|
||||||
- Major: Added multi-channel searching to search dialog via keyboard shortcut. (Ctrl+Shift+F by default) (#3694, #3875)
|
- Major: Added multi-channel searching to search dialog via keyboard shortcut. (Ctrl+Shift+F by default) (#3694, #3875)
|
||||||
- Major: Added support for emotes and badges from [7TV](https://7tv.app). [Wiki Page](https://wiki.chatterino.com/Third_party_services/#7tv) (#4002, #4062)
|
- Major: Added support for emotes and badges from [7TV](https://7tv.app). [Wiki Page](https://wiki.chatterino.com/Third_party_services/#7tv) (#4002, #4062)
|
||||||
- Major: Added support for Right-to-Left Languages (#3958)
|
- Major: Added support for Right-to-Left Languages (#3958, #4139)
|
||||||
- Minor: Allow hiding moderation actions in streamer mode. (#3926)
|
- Minor: Allow hiding moderation actions in streamer mode. (#3926)
|
||||||
- Minor: Added highlights for `Elevated Messages`. (#4016)
|
- Minor: Added highlights for `Elevated Messages`. (#4016)
|
||||||
- Minor: Removed total views from the usercard, as Twitch no longer updates the number. (#3792)
|
- Minor: Removed total views from the usercard, as Twitch no longer updates the number. (#3792)
|
||||||
|
|
|
@ -278,12 +278,13 @@ void MessageLayoutContainer::reorderRTL(int firstTextIndex)
|
||||||
// the second condition below covers the possible three cases:
|
// the second condition below covers the possible three cases:
|
||||||
// 1 - if we are in RTL mode (first non-neutral word is RTL)
|
// 1 - if we are in RTL mode (first non-neutral word is RTL)
|
||||||
// we render RTL, reversing LTR sequences,
|
// we render RTL, reversing LTR sequences,
|
||||||
// 2 - if we are in LTR mode (first non-neautral word is LTR or all wrods are neutral)
|
// 2 - if we are in LTR mode (first non-neutral word is LTR or all words are neutral)
|
||||||
// we render LTR, reversing RTL sequences
|
// we render LTR, reversing RTL sequences
|
||||||
// 3 - neutral words follow previous words, we reverse a neutral word when the previous word was reversed
|
// 3 - neutral words follow previous words, we reverse a neutral word when the previous word was reversed
|
||||||
|
|
||||||
// the first condition checks if a neutral word is treated as a RTL word
|
// the first condition checks if a neutral word is treated as a RTL word
|
||||||
// this is used later to add an invisible Arabic letter to fix orentation
|
// this is used later to add U+202B (RTL embedding) character signal to
|
||||||
|
// fix punctuation marks and mixing embedding LTR in an RTL word
|
||||||
// this can happen in two cases:
|
// this can happen in two cases:
|
||||||
// 1 - in RTL mode, the previous word should be RTL (i.e. not reversed)
|
// 1 - in RTL mode, the previous word should be RTL (i.e. not reversed)
|
||||||
// 2 - in LTR mode, the previous word should be RTL (i.e. reversed)
|
// 2 - in LTR mode, the previous word should be RTL (i.e. reversed)
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const QChar RTL_MARK(0x200F);
|
const QChar RTL_EMBED(0x202B);
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
@ -295,8 +294,7 @@ void TextLayoutElement::paint(QPainter &painter)
|
||||||
QString text = this->getText();
|
QString text = this->getText();
|
||||||
if (text.isRightToLeft() || this->reversedNeutral)
|
if (text.isRightToLeft() || this->reversedNeutral)
|
||||||
{
|
{
|
||||||
text.prepend(RTL_MARK);
|
text.prepend(RTL_EMBED);
|
||||||
text.append(RTL_MARK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
painter.setPen(this->color_);
|
painter.setPen(this->color_);
|
||||||
|
|
Loading…
Reference in a new issue