Missing widths[] after insert in TextPosition
Brought to you by:
benlitchfield
I read the source code of TextPosition.insertDiacritic(int i, TextPosition diacritic, TextNormalize normalize). I don't understand why width2[i+1] is set to 0. This will lead to an error where after I insert a character, the corresponding width is 0. If I do another insert, this yields an error. I replace that line to:
width2[i+1] = diacritic.getWidth();
Please let me know if you mean to set it to zero and if I misunderstand your implementation.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Let me paraphrase my question. I intend to group chars into words and therefore extend the TextPosition class with my own mergeDiacritic(). I want all chars within one word to be stored in one TextPosition object. The word contains the width of each char and the spacing between every two adjacent chars. That's where I found the problem of missing widths elements after merging one char.