Class ArabicLigaturizer
java.lang.Object
com.itextpdf.text.pdf.languages.ArabicLigaturizer
- All Implemented Interfaces:
LanguageProcessor
Shape arabic characters. This code was inspired by an LGPL'ed C library:
Pango ( see http://www.pango.com/ ). Note that the code of this class is
the original work of Paulo Soares.
- Author:
- Paulo Soares
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intDigit type option: Use Arabic-Indic digits (U+0660...U+0669).static final intDigit type option: Use Eastern (Extended) Arabic-Indic digits (U+06f0...U+06f9).static final intBit mask for digit type options.static final intDigit shaping option: Replace Arabic-Indic digits by European digits (U+0030...U+0039).static final intDigit shaping option: Replace European digits (U+0030...U+0039) by Arabic-Indic digits.static final intDigit shaping option: Replace European digits (U+0030...U+0039) by Arabic-Indic digits if the most recent strongly directional character is an Arabic letter (its Bidi direction value is RIGHT_TO_LEFT_ARABIC).static final intDigit shaping option: Replace European digits (U+0030...U+0039) by Arabic-Indic digits if the most recent strongly directional character is an Arabic letter (its Bidi direction value is RIGHT_TO_LEFT_ARABIC).static final intBit mask for digit shaping options.protected intprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intarabic_shape(char[] src, int srcoffset, int srclength, char[] dest, int destoffset, int destlength, int level) static CharactergetReverseMapping(char c) booleanisRTL()Arabic is written from right to left.Processes a Stringstatic voidprocessNumbers(char[] text, int offset, int length, int options)
-
Field Details
-
ar_nothing
public static final int ar_nothing- See Also:
-
ar_novowel
public static final int ar_novowel- See Also:
-
ar_composedtashkeel
public static final int ar_composedtashkeel- See Also:
-
ar_lig
public static final int ar_lig- See Also:
-
DIGITS_EN2AN
public static final int DIGITS_EN2ANDigit shaping option: Replace European digits (U+0030...U+0039) by Arabic-Indic digits.- See Also:
-
DIGITS_AN2EN
public static final int DIGITS_AN2ENDigit shaping option: Replace Arabic-Indic digits by European digits (U+0030...U+0039).- See Also:
-
DIGITS_EN2AN_INIT_LR
public static final int DIGITS_EN2AN_INIT_LRDigit shaping option: Replace European digits (U+0030...U+0039) by Arabic-Indic digits if the most recent strongly directional character is an Arabic letter (its Bidi direction value is RIGHT_TO_LEFT_ARABIC). The initial state at the start of the text is assumed to be not an Arabic, letter, so European digits at the start of the text will not change. Compare to DIGITS_ALEN2AN_INIT_AL.- See Also:
-
DIGITS_EN2AN_INIT_AL
public static final int DIGITS_EN2AN_INIT_ALDigit shaping option: Replace European digits (U+0030...U+0039) by Arabic-Indic digits if the most recent strongly directional character is an Arabic letter (its Bidi direction value is RIGHT_TO_LEFT_ARABIC). The initial state at the start of the text is assumed to be an Arabic, letter, so European digits at the start of the text will change. Compare to DIGITS_ALEN2AN_INT_LR.- See Also:
-
DIGITS_MASK
public static final int DIGITS_MASKBit mask for digit shaping options.- See Also:
-
DIGIT_TYPE_AN
public static final int DIGIT_TYPE_ANDigit type option: Use Arabic-Indic digits (U+0660...U+0669).- See Also:
-
DIGIT_TYPE_AN_EXTENDED
public static final int DIGIT_TYPE_AN_EXTENDEDDigit type option: Use Eastern (Extended) Arabic-Indic digits (U+06f0...U+06f9).- See Also:
-
DIGIT_TYPE_MASK
public static final int DIGIT_TYPE_MASKBit mask for digit type options.- See Also:
-
options
protected int options -
runDirection
protected int runDirection
-
-
Constructor Details
-
ArabicLigaturizer
public ArabicLigaturizer() -
ArabicLigaturizer
public ArabicLigaturizer(int runDirection, int options)
-
-
Method Details
-
arabic_shape
public static int arabic_shape(char[] src, int srcoffset, int srclength, char[] dest, int destoffset, int destlength, int level) -
processNumbers
public static void processNumbers(char[] text, int offset, int length, int options) -
getReverseMapping
-
process
Description copied from interface:LanguageProcessorProcesses a String- Specified by:
processin interfaceLanguageProcessor- Parameters:
s- the original String- Returns:
- the processed String
-
isRTL
public boolean isRTL()Arabic is written from right to left.- Specified by:
isRTLin interfaceLanguageProcessor- Returns:
- true
- See Also:
-