update credits
[LibreOffice.git] / icu / icu4c.8198.revert.icu5431.patch
blob629bec09958326aecf966b835cf2fe99beb0fa93
1 --- misc/icu/source/layout/IndicReordering.cpp (revision 26090)
2 +++ misc/build/icu/source/layout/IndicReordering.cpp (revision 25772)
3 @@ -126,8 +126,4 @@
4 FeatureMask fSMFeatures;
6 - LEUnicode fPreBaseConsonant;
7 - LEUnicode fPreBaseVirama;
8 - le_int32 fPBCIndex;
9 - FeatureMask fPBCFeatures;
11 void saveMatra(LEUnicode matra, le_int32 matraIndex, IndicClassTable::CharClass matraClass)
12 @@ -176,6 +172,5 @@
13 fMatraFeatures(0), fMPreOutIndex(-1), fMPreFixups(mpreFixups),
14 fVMabove(0), fVMpost(0), fVMIndex(0), fVMFeatures(0),
15 + fSMabove(0), fSMbelow(0), fSMIndex(0), fSMFeatures(0)
16 - fSMabove(0), fSMbelow(0), fSMIndex(0), fSMFeatures(0),
17 - fPreBaseConsonant(0), fPreBaseVirama(0), fPBCIndex(0), fPBCFeatures(0)
19 // nothing else to do...
20 @@ -196,6 +191,4 @@
21 fVMabove = fVMpost = 0;
22 fSMabove = fSMbelow = 0;
24 - fPreBaseConsonant = fPreBaseVirama = 0;
27 @@ -393,12 +386,4 @@
30 - void notePreBaseConsonant(le_uint32 index,LEUnicode PBConsonant, LEUnicode PBVirama, FeatureMask features)
31 - {
32 - fPBCIndex = index;
33 - fPreBaseConsonant = PBConsonant;
34 - fPreBaseVirama = PBVirama;
35 - fPBCFeatures = features;
36 - }
38 void noteBaseConsonant()
40 @@ -480,20 +465,4 @@
43 - void writePreBaseConsonant()
44 - {
45 - // The TDIL spec says that consonant + virama + RRA should produce a rakar in Malayalam. However,
46 - // it seems that almost none of the fonts for Malayalam are set up to handle this.
47 - // So, we're going to force the issue here by using the rakar as defined with RA in most fonts.
49 - if (fPreBaseConsonant == 0x0d31) { // RRA
50 - fPreBaseConsonant = 0x0d30; // RA
51 - }
53 - if (fPreBaseConsonant != 0) {
54 - writeChar(fPreBaseConsonant, fPBCIndex, fPBCFeatures);
55 - writeChar(fPreBaseVirama,fPBCIndex-1,fPBCFeatures);
56 - }
57 - }
59 le_int32 getOutputIndex()
61 @@ -754,5 +723,4 @@
65 IndicClassTable::CharClass charClass = CC_RESERVED;
66 IndicClassTable::CharClass nextClass = CC_RESERVED;
67 @@ -762,9 +730,7 @@
68 le_bool seenVattu = FALSE;
69 le_bool seenBelowBaseForm = FALSE;
70 - le_bool seenPreBaseForm = FALSE;
71 le_bool hasNukta = FALSE;
72 le_bool hasBelowBaseForm = FALSE;
73 le_bool hasPostBaseForm = FALSE;
74 - le_bool hasPreBaseForm = FALSE;
76 if (postBase < markStart && classTable->isNukta(chars[postBase])) {
77 @@ -780,20 +746,12 @@
78 hasBelowBaseForm = IndicClassTable::hasBelowBaseForm(charClass) && !hasNukta;
79 hasPostBaseForm = IndicClassTable::hasPostBaseForm(charClass) && !hasNukta;
80 - hasPreBaseForm = IndicClassTable::hasPreBaseForm(charClass) && !hasNukta;
82 if (IndicClassTable::isConsonant(charClass)) {
83 if (postBaseLimit == 0 || seenVattu ||
84 (baseConsonant > baseLimit && !classTable->isVirama(chars[baseConsonant - 1])) ||
85 + !(hasBelowBaseForm || hasPostBaseForm)) {
86 - !(hasBelowBaseForm || hasPostBaseForm || hasPreBaseForm)) {
87 break;
90 - // Note any pre-base consonants
91 - if ( baseConsonant == lastConsonant && lastConsonant > 0 &&
92 - hasPreBaseForm && classTable->isVirama(chars[baseConsonant - 1])) {
93 - output.notePreBaseConsonant(lastConsonant,chars[lastConsonant],chars[lastConsonant-1],tagArray2);
94 - seenPreBaseForm = TRUE;
96 - }
97 // consonants with nuktas are never vattus
98 seenVattu = IndicClassTable::isVattu(charClass) && !hasNukta;
99 @@ -828,12 +786,10 @@
101 // write any pre-base consonants
102 - output.writePreBaseConsonant();
104 le_bool supressVattu = TRUE;
106 for (i = baseLimit; i < baseConsonant; i += 1) {
107 LEUnicode ch = chars[i];
108 + // Don't put 'blwf' on first consonant.
109 + FeatureMask features = (i == baseLimit? tagArray2 : tagArray1);
110 - // Don't put 'pstf' or 'blwf' on anything before the base consonant.
111 - FeatureMask features = tagArray1 & ~( pstfFeatureMask | blwfFeatureMask );
113 charClass = classTable->getCharClass(ch);
114 @@ -886,5 +842,5 @@
116 // write below-base consonants
117 + if (baseConsonant != lastConsonant) {
118 - if (baseConsonant != lastConsonant && !seenPreBaseForm) {
119 for (i = bcSpan + 1; i < postBase; i += 1) {
120 output.writeChar(chars[i], i, tagArray1);
121 @@ -916,5 +872,5 @@
122 // write post-base consonants
123 // FIXME: does this put the right tags on post-base consonants?
124 + if (baseConsonant != lastConsonant) {
125 - if (baseConsonant != lastConsonant && !seenPreBaseForm) {
126 if (postBase <= lastConsonant) {
127 for (i = postBase; i <= lastConsonant; i += 1) {