[FriBidi] multiple line
Yuri D.
kotuk81 at gmail.com
Mon Sep 18 11:24:36 UTC 2017
Hi,
I wonder what is the correct input to the FRIBIDI library while parsing the
levels for multiple lines?
Should I send each line separately or I can send all the lines in the same
string?
I'm running the code below:
FriBidiChar* unicodeString = new FriBidiChar[textLength];
FriBidiCharType* bidiTypes = new FriBidiCharType[textLength];
FriBidiLevel* bidiLevels = new FriBidiLevel[textLength];
std::string text = "some.\ncar.\nhere.";
// Convert string to unicode
FriBidiStrIndex len = fribidi_charset_to_unicode(FRIBIDI_CHAR_SET_UTF8,
text.c_str(), (FriBidiStrIndex)text.length(), unicodeString);
// Get BIDI types
fribidi_get_bidi_types(unicodeString, (uint32_t)text.size(), bidiTypes);
// Get BIDI levels
FriBidiLevel resolveParDir = fribidi_get_par_embedding_levels(bidiTypes,
(uint32_t)text.size(), *FRIBIDI_PAR_RTL*, bidiLevels);
And in the result, I get the BIDI levels below:
2 2 2 2 1 1 0 0 0 0 1 0 0 0 0 0
The question is: why I have a level change for the first '.' but not for
the following '.'?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fribidi/attachments/20170918/b8421639/attachment.html>
More information about the fribidi
mailing list