TeluguFormatter.java
2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.fontengine.inlineformatting.infontformatting;
import com.adobe.fontengine.inlineformatting.AttributedRun;
import com.adobe.fontengine.inlineformatting.infontformatting.IndicFormatter;
public class TeluguFormatter
extends IndicFormatter {
protected int splitVowelsAndNormalize(AttributedRun run, int start, int limit) {
block3 : while (start < limit) {
int usv = run.elementAt(start);
switch (usv) {
case 3144: {
run.replace(start, new int[]{3142, 3158});
++limit;
start += 2;
continue block3;
}
}
++start;
}
return limit;
}
protected int nukta() {
return -1;
}
protected int virama() {
return 3149;
}
protected boolean isConsonant(int usv) {
return 3093 <= usv && usv <= 3129 || 9676 == usv;
}
protected boolean hasNukta(int usv) {
return false;
}
protected int removeNukta(int usv) {
return usv;
}
protected boolean isMark(int usv) {
return 3073 <= usv && usv <= 3075 || 3134 <= usv && usv <= 3158;
}
protected boolean isIndependentVowel(int usv) {
return 3077 <= usv && usv <= 3092 || 9676 == usv;
}
protected IndicFormatter.Position getPosition(int usv) {
switch (usv) {
case 3134:
case 3135:
case 3136:
case 3142:
case 3143:
case 3146:
case 3147:
case 3148: {
return IndicFormatter.Position.topMatra;
}
case 3158: {
return IndicFormatter.Position.bottom;
}
case 3137:
case 3138:
case 3139:
case 3140: {
return IndicFormatter.Position.rightMatra;
}
case 3073:
case 3074:
case 3075: {
return IndicFormatter.Position.rightOther;
}
}
return IndicFormatter.Position.any;
}
protected IndicFormatter.Shape rephLike(int usv) {
return IndicFormatter.Shape.any;
}
protected boolean subjoins(int usv) {
return this.isConsonant(usv);
}
protected boolean postjoins(int usv) {
return false;
}
protected boolean postjoinsIndependentVowels(int usv) {
return false;
}
}