Package com.itextpdf.text.pdf.languages
Class IndicLigaturizer
java.lang.Object
com.itextpdf.text.pdf.languages.IndicLigaturizer
- All Implemented Interfaces:
LanguageProcessor
- Direct Known Subclasses:
DevanagariLigaturizer
,GujaratiLigaturizer
Superclass for processors that can convert a String of bytes in an Indic
language to a String in the same language of which the bytes are reordered
for rendering using a font that contains the necessary glyphs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
protected char[]
The table mapping specific character indexes to the characters in a specific language.static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isRTL()
Indic languages are written from right to left.protected boolean
IsSwaraLetter
(char ch) Checks if a character is vowel letter.protected boolean
IsSwaraMatra
(char ch) Checks if a character is vowel sign.protected boolean
IsVyanjana
(char ch) Checks if a character is consonant letter.Reorders the bytes in a String making Indic ligaturesprivate static void
swap
(StringBuilder s, int i, int j) Swaps two characters in a StringBuilder object
-
Field Details
-
MATRA_AA
public static final int MATRA_AA- See Also:
-
MATRA_I
public static final int MATRA_I- See Also:
-
MATRA_E
public static final int MATRA_E- See Also:
-
MATRA_AI
public static final int MATRA_AI- See Also:
-
MATRA_HLR
public static final int MATRA_HLR- See Also:
-
MATRA_HLRR
public static final int MATRA_HLRR- See Also:
-
LETTER_A
public static final int LETTER_A- See Also:
-
LETTER_AU
public static final int LETTER_AU- See Also:
-
LETTER_KA
public static final int LETTER_KA- See Also:
-
LETTER_HA
public static final int LETTER_HA- See Also:
-
HALANTA
public static final int HALANTA- See Also:
-
langTable
protected char[] langTableThe table mapping specific character indexes to the characters in a specific language.
-
-
Constructor Details
-
IndicLigaturizer
public IndicLigaturizer()
-
-
Method Details
-
process
Reorders the bytes in a String making Indic ligatures- Specified by:
process
in interfaceLanguageProcessor
- Parameters:
s
- the original String- Returns:
- the ligaturized String
-
isRTL
public boolean isRTL()Indic languages are written from right to left.- Specified by:
isRTL
in interfaceLanguageProcessor
- Returns:
- false
- See Also:
-
IsSwaraLetter
protected boolean IsSwaraLetter(char ch) Checks if a character is vowel letter.- Parameters:
ch
- the character that needs to be checked- Returns:
- true if the characters is a vowel letter
-
IsSwaraMatra
protected boolean IsSwaraMatra(char ch) Checks if a character is vowel sign.- Parameters:
ch
- the character that needs to be checked- Returns:
- true if the characters is a vowel sign
-
IsVyanjana
protected boolean IsVyanjana(char ch) Checks if a character is consonant letter.- Parameters:
ch
- the character that needs to be checked- Returns:
- true if the chracter is a consonant letter
-
swap
Swaps two characters in a StringBuilder object- Parameters:
s
- the StringBuilderi
- the index of one characterj
- the index of the other character
-