|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.gvt.text.ArabicTextHandler
Handles the processing of arabic text. In particular it determines the form each arabic char should take. It also contains methods for substituting plain arabic glyphs with their shaped forms. This is needed when the arabic text is rendered using an AWT font.
Constructor Summary | |
ArabicTextHandler()
|
Method Summary | |
static boolean |
arabicChar(char c)
Returns true if the char is a standard arabic char. |
static boolean |
arabicCharTransparent(char c)
Returns true if the char is transparent. |
static java.text.AttributedString |
assignArabicForms(java.text.AttributedString as)
If the AttributedString contains any arabic chars, assigns an arabic form attribute, ie. |
static boolean |
charStartsLigature(char c)
Returns true if a ligature exists that starts with the specified character. |
static boolean |
containsArabic(java.text.AttributedCharacterIterator aci)
Returns true if the ACI contains any arabic characters. |
static boolean |
containsArabic(java.text.AttributedString as)
Returns true if the string contains any arabic characters. |
static java.lang.String |
createSubstituteString(java.text.AttributedCharacterIterator aci)
Where possible substitues plain arabic glyphs with their shaped forms. |
static int |
getNumChars(char c)
Returns the number of characters the glyph for the specified character represents. |
static int |
getSubstituteChar(java.lang.String unicode,
int form)
Will try and find a substitute character of the specified form. |
static boolean |
isLigature(char c)
Returns true if the glyph for the specified character respresents a ligature. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ArabicTextHandler()
Method Detail |
public static java.text.AttributedString assignArabicForms(java.text.AttributedString as)
as
- The string to attach the arabic form attributes to.public static boolean arabicChar(char c)
c
- The character to test.public static boolean containsArabic(java.text.AttributedString as)
as
- The string to test.public static boolean containsArabic(java.text.AttributedCharacterIterator aci)
aci
- The AttributedCharacterIterator to test.public static boolean arabicCharTransparent(char c)
c
- The character to test.public static int getSubstituteChar(java.lang.String unicode, int form)
unicode
- The unicode value of the glyph to try and replace. It
may be ligature and so may contain more than one character.form
- Indicates the required arabic form.
(isolated = 1, final = 2, initial = 3, medial = 4)public static java.lang.String createSubstituteString(java.text.AttributedCharacterIterator aci)
aci
- Contains the text to process. Arabic form attributes
should already be assigned to each arabic character.public static boolean charStartsLigature(char c)
c
- The character to test.public static int getNumChars(char c)
c
- The character to test.public static boolean isLigature(char c)
c
- The character to test.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |