java.lang.Object
org.sejda.sambox.util.BidiUtils
see http://translationtherapy.com/understanding-how-to-work-with-bi-directionality-bidi-text/ and
https://docs.oracle.com/javase/tutorial/2d/text/textlayoutbidirectionaltext.html for some info related to BiDi
contents
- Author:
- Andrea Vacondio
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringvisualToLogical(String text) Handles the LTR and RTL direction of the given words.
-
Method Details
-
visualToLogical
Handles the LTR and RTL direction of the given words. The whole implementation stands and falls with the given word. If the word is a full line, the results will be the best. If the word contains of single words or characters, the order of the characters in a word or words in a line may wrong, due to RTL and LTR marks and characters! Based on http://www.nesterovsky-bros.com/weblog/2013/07/28/VisualToLogicalConversionInJava.aspx- Parameters:
text- The word that shall be processed- Returns:
- new word with the correct direction of the containing characters
-