TamilFormatter.java
2.87 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
102
103
104
105
106
107
108
109
110
111
/*
* 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 TamilFormatter
extends IndicFormatter {
protected int splitVowelsAndNormalize(AttributedRun run, int start, int limit) {
block5 : while (start < limit) {
int usv = run.elementAt(start);
switch (usv) {
case 3018: {
run.replace(start, new int[]{3014, 3006});
++limit;
start += 2;
continue block5;
}
case 3019: {
run.replace(start, new int[]{3015, 3006});
++limit;
start += 2;
continue block5;
}
case 3020: {
run.replace(start, new int[]{3014, 3031});
++limit;
start += 2;
continue block5;
}
}
++start;
}
return limit;
}
protected int nukta() {
return 2748;
}
protected int virama() {
return 2765;
}
protected boolean isConsonant(int usv) {
return 2965 <= usv && usv <= 3001 || 9676 == usv;
}
protected boolean hasNukta(int usv) {
return false;
}
protected int removeNukta(int usv) {
return usv;
}
protected boolean isMark(int usv) {
return 3006 <= usv && usv <= 3020 || 3031 <= usv && usv <= 3031;
}
protected boolean isIndependentVowel(int usv) {
return 2949 <= usv && usv <= 2964 || 9676 == usv;
}
protected IndicFormatter.Position getPosition(int usv) {
switch (usv) {
case 3014:
case 3015:
case 3016: {
return IndicFormatter.Position.left;
}
case 3008: {
return IndicFormatter.Position.topMatra;
}
case 2946: {
return IndicFormatter.Position.topOther;
}
case 3009:
case 3010: {
return IndicFormatter.Position.bottom;
}
case 3006:
case 3007: {
return IndicFormatter.Position.rightMatra;
}
case 3031: {
return IndicFormatter.Position.rightOther;
}
}
return IndicFormatter.Position.any;
}
protected IndicFormatter.Shape rephLike(int usv) {
return IndicFormatter.Shape.any;
}
protected boolean subjoins(int usv) {
return false;
}
protected boolean postjoins(int usv) {
return false;
}
protected boolean postjoinsIndependentVowels(int usv) {
return false;
}
}