64 for (
wchar_t c : m_Str) {
65 if (bidi.AppendChar(c))
66 m_Order.push_back(bidi.GetSegmentInfo());
69 m_Order.push_back(bidi.GetSegmentInfo());
71 size_t nR2L = std::count_if(
72 m_Order.begin(), m_Order.end(), [](
const CFX_BidiChar::Segment& seg) {
73 return seg.direction == CFX_BidiChar::Direction::kRight;
76 size_t nL2R = std::count_if(
77 m_Order.begin(), m_Order.end(), [](
const CFX_BidiChar::Segment& seg) {
78 return seg.direction == CFX_BidiChar::Direction::kLeft;
81 if (nR2L > 0 && nR2L >= nL2R)