From bc718257748f1ad87658e85f8c31b574afca57a9 Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Wed, 19 Sep 2018 15:20:03 -0700 Subject: [core] Bidi support for styled text. Remove use of QString from non-ICU Qt stub bidi implementation since we weren't making use of it. --- src/mbgl/text/bidi.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mbgl/text') diff --git a/src/mbgl/text/bidi.hpp b/src/mbgl/text/bidi.hpp index 59d306489c..d90f3e5d1b 100644 --- a/src/mbgl/text/bidi.hpp +++ b/src/mbgl/text/bidi.hpp @@ -14,17 +14,21 @@ class BiDiImpl; std::u16string applyArabicShaping(const std::u16string&); +using StyledText = std::pair>; + class BiDi : private util::noncopyable { public: BiDi(); ~BiDi(); std::vector processText(const std::u16string&, std::set); + std::vector processStyledText(const StyledText&, std::set); private: void mergeParagraphLineBreaks(std::set&); std::vector applyLineBreaking(std::set); std::u16string getLine(std::size_t start, std::size_t end); + std::u16string writeReverse(const std::u16string&, std::size_t, std::size_t); std::unique_ptr impl; }; -- cgit v1.2.1