diff options
Diffstat (limited to 'src/mbgl/text/bidi.hpp')
-rw-r--r-- | src/mbgl/text/bidi.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mbgl/text/bidi.hpp b/src/mbgl/text/bidi.hpp index d90f3e5d1b..5ce2887db8 100644 --- a/src/mbgl/text/bidi.hpp +++ b/src/mbgl/text/bidi.hpp @@ -14,6 +14,10 @@ class BiDiImpl; std::u16string applyArabicShaping(const std::u16string&); +// StyledText pairs each code point in a string with an integer indicating +// the styling options to use for rendering that code point +// The data structure is intended to accomodate the reordering/interleaving +// of formatting that can happen when BiDi rearranges inputs using StyledText = std::pair<std::u16string, std::vector<uint8_t>>; class BiDi : private util::noncopyable { @@ -21,7 +25,10 @@ public: BiDi(); ~BiDi(); + // Given text in logical ordering and a set of line break points, + // return a set of lines in visual order with bidi and line breaking applied std::vector<std::u16string> processText(const std::u16string&, std::set<std::size_t>); + // Same as processText but preserves per-code-point formatting information std::vector<StyledText> processStyledText(const StyledText&, std::set<std::size_t>); private: |