fixed rtl mixed support mode so that words are properly placed in the sentence

This commit is contained in:
Mark Vejvoda
2013-11-14 22:19:40 +00:00
parent f0737ac682
commit 429db5ff66

View File

@@ -404,6 +404,7 @@ void Font::bidi_cvt(string &str_) {
//printf("Line: %d [%s]\n",lineIndex,str_.c_str()); //printf("Line: %d [%s]\n",lineIndex,str_.c_str());
vector<string> words; vector<string> words;
if(Font::fontSupportMixedRightToLeft == true) {
if(str_.find(" ") != str_.npos) { if(str_.find(" ") != str_.npos) {
Tokenize(str_,words," "); Tokenize(str_,words," ");
@@ -411,6 +412,10 @@ void Font::bidi_cvt(string &str_) {
else { else {
words.push_back(str_); words.push_back(str_);
} }
}
else {
words.push_back(str_);
}
vector<string> wordList; vector<string> wordList;
wordList.reserve(words.size()); wordList.reserve(words.size());