summaryrefslogtreecommitdiff
path: root/modules/indic
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-01-16 20:20:35 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-01-16 20:20:35 +0000
commita0225fbf560de93c7b41acf9dbf01c9d99173af9 (patch)
treebb8f58010c8801a27545728393253b6c4722c6c4 /modules/indic
parent0ee36da9691c2311d2134fd61f222ea3bed5827e (diff)
downloadpango-a0225fbf560de93c7b41acf9dbf01c9d99173af9.tar.gz
*.c, *.h: Replace preceding sequences of 8 spaces with tabs.
2007-01-16 Behdad Esfahbod <behdad@gnome.org> *.c, *.h: Replace preceding sequences of 8 spaces with tabs. svn path=/trunk/; revision=2165
Diffstat (limited to 'modules/indic')
-rw-r--r--modules/indic/indic-fc.c4
-rw-r--r--modules/indic/indic-lang.c98
-rw-r--r--modules/indic/indic-ot-class-tables.c84
-rw-r--r--modules/indic/indic-ot.c224
4 files changed, 205 insertions, 205 deletions
diff --git a/modules/indic/indic-fc.c b/modules/indic/indic-fc.c
index cdfa7696..5d81c6c4 100644
--- a/modules/indic/indic-fc.c
+++ b/modules/indic/indic-fc.c
@@ -155,7 +155,7 @@ maybe_add_GSUB_feature (PangoOTRuleset *ruleset,
static void
maybe_add_GPOS_feature (PangoOTRuleset *ruleset,
- PangoOTInfo *info,
+ PangoOTInfo *info,
guint script_index,
PangoOTTag feature_tag,
gulong property_bit)
@@ -274,7 +274,7 @@ set_glyphs (PangoFont *font,
(!process_zwj || wcs[i] != 0x200D))
glyph = PANGO_GLYPH_EMPTY;
else
- {
+ {
glyph = pango_fc_font_get_glyph (fc_font, wcs[i]);
if (!glyph)
diff --git a/modules/indic/indic-lang.c b/modules/indic/indic-lang.c
index 89ab301f..132bedc8 100644
--- a/modules/indic/indic-lang.c
+++ b/modules/indic/indic-lang.c
@@ -154,58 +154,58 @@ indic_engine_break (PangoEngineLang *engine,
attrs[i].is_mandatory_break = FALSE;
}
else if (prev_wc != 0 && (this_wc == 0x200D || this_wc == 0x200C))
- {
- if (next_wc != 0)
- {
- if (next_next_wc == 0)
- {
- attrs[i].is_cursor_position = FALSE;
- attrs[i].is_char_break = FALSE;
- attrs[i].is_line_break = FALSE;
- attrs[i].is_mandatory_break = FALSE;
-
- i++;
-
- attrs[i].is_cursor_position = FALSE;
- attrs[i].is_char_break = FALSE;
- attrs[i].is_line_break = FALSE;
- attrs[i].is_mandatory_break = FALSE;
- }
- else if ((next_next_wc != 0) &&
- (next_wc == 0x09CD || /* Bengali */
- next_wc == 0x0ACD || /* Gujarati */
- next_wc == 0x094D || /* Hindi */
- next_wc == 0x0CCD || /* Kannada */
- next_wc == 0x0D4D || /* Malayalam */
- next_wc == 0x0B4D || /* Oriya */
- next_wc == 0x0A4D || /* Punjabi */
- next_wc == 0x0BCD || /* Tamil */
- next_wc == 0x0C4D || /* Telugu */
- next_wc == 0x0DCA)) /*Sinhala*/
- {
- attrs[i].is_cursor_position = FALSE;
- attrs[i].is_char_break = FALSE;
- attrs[i].is_line_break = FALSE;
- attrs[i].is_mandatory_break = FALSE;
-
- i++;
-
- attrs[i].is_cursor_position = FALSE;
- attrs[i].is_char_break = FALSE;
- attrs[i].is_line_break = FALSE;
- attrs[i].is_mandatory_break = FALSE;
-
- i++;
- attrs[i].is_cursor_position = FALSE;
- }
- }
- else
- {
- attrs[i].is_cursor_position = FALSE;
+ {
+ if (next_wc != 0)
+ {
+ if (next_next_wc == 0)
+ {
+ attrs[i].is_cursor_position = FALSE;
+ attrs[i].is_char_break = FALSE;
+ attrs[i].is_line_break = FALSE;
+ attrs[i].is_mandatory_break = FALSE;
+
+ i++;
+
+ attrs[i].is_cursor_position = FALSE;
+ attrs[i].is_char_break = FALSE;
+ attrs[i].is_line_break = FALSE;
+ attrs[i].is_mandatory_break = FALSE;
+ }
+ else if ((next_next_wc != 0) &&
+ (next_wc == 0x09CD || /* Bengali */
+ next_wc == 0x0ACD || /* Gujarati */
+ next_wc == 0x094D || /* Hindi */
+ next_wc == 0x0CCD || /* Kannada */
+ next_wc == 0x0D4D || /* Malayalam */
+ next_wc == 0x0B4D || /* Oriya */
+ next_wc == 0x0A4D || /* Punjabi */
+ next_wc == 0x0BCD || /* Tamil */
+ next_wc == 0x0C4D || /* Telugu */
+ next_wc == 0x0DCA)) /*Sinhala*/
+ {
+ attrs[i].is_cursor_position = FALSE;
+ attrs[i].is_char_break = FALSE;
+ attrs[i].is_line_break = FALSE;
+ attrs[i].is_mandatory_break = FALSE;
+
+ i++;
+
+ attrs[i].is_cursor_position = FALSE;
+ attrs[i].is_char_break = FALSE;
+ attrs[i].is_line_break = FALSE;
+ attrs[i].is_mandatory_break = FALSE;
+
+ i++;
+ attrs[i].is_cursor_position = FALSE;
+ }
+ }
+ else
+ {
+ attrs[i].is_cursor_position = FALSE;
attrs[i].is_char_break = FALSE;
attrs[i].is_line_break = FALSE;
attrs[i].is_mandatory_break = FALSE;
- }
+ }
}
}
}
diff --git a/modules/indic/indic-ot-class-tables.c b/modules/indic/indic-ot-class-tables.c
index fe664bc9..5c561765 100644
--- a/modules/indic/indic-ot-class-tables.c
+++ b/modules/indic/indic-ot-class-tables.c
@@ -245,7 +245,7 @@ static const IndicOTSplitMatra tamlSplitTable[] = {{0x0BC6, 0x0BBE}, {0x0BC7, 0x
static const IndicOTSplitMatra teluSplitTable[] = {{0x0C46, 0x0C56}};
static const IndicOTSplitMatra kndaSplitTable[] = {{0x0CBF, 0x0CD5}, {0x0CC6, 0x0CD5}, {0x0CC6, 0x0CD6}, {0x0CC6, 0x0CC2},
- {0x0CC6, 0x0CC2, 0x0CD5}};
+ {0x0CC6, 0x0CC2, 0x0CD5}};
static const IndicOTSplitMatra mlymSplitTable[] = {{0x0D46, 0x0D3E}, {0x0D47, 0x0D3E}, {0x0D46, 0x0D57}};
@@ -279,7 +279,7 @@ static const IndicOTSplitMatra sinhSplitTable[] = {{0x0DD9, 0x0DCA}, {0x0DD9, 0x
/* Add a little macro to compute lastChar based on size of the charClasses * table */
#define INDIC_OT_CLASS_TABLE_DEFINE(name, firstChar, worstCaseExpansion, scriptFlags, charClasses, splitMatraTable) \
const IndicOTClassTable name = {firstChar, firstChar + G_N_ELEMENTS (charClasses) - 1, \
- worstCaseExpansion, scriptFlags, charClasses, splitMatraTable}
+ worstCaseExpansion, scriptFlags, charClasses, splitMatraTable}
INDIC_OT_CLASS_TABLE_DEFINE (deva_class_table, 0x0900, 2, DEVA_SCRIPT_FLAGS, devaCharClasses, NULL);
INDIC_OT_CLASS_TABLE_DEFINE (beng_class_table, 0x0980, 3, BENG_SCRIPT_FLAGS, bengCharClasses, bengSplitTable);
INDIC_OT_CLASS_TABLE_DEFINE (guru_class_table, 0x0A00, 2, GURU_SCRIPT_FLAGS, guruCharClasses, NULL);
@@ -427,15 +427,15 @@ gboolean indic_ot_has_below_base_form(const IndicOTClassTable *class_table, guni
IndicOTCharClass indic_ot_get_char_class(const IndicOTClassTable *class_table, gunichar ch)
{
if (ch == C_SIGN_ZWJ) {
- return CF_CONSONANT | CC_ZERO_WIDTH_MARK;
+ return CF_CONSONANT | CC_ZERO_WIDTH_MARK;
}
if (ch == C_SIGN_ZWNJ) {
- return CC_ZERO_WIDTH_MARK;
+ return CC_ZERO_WIDTH_MARK;
}
if (ch < class_table->firstChar || ch > class_table->lastChar) {
- return CC_RESERVED;
+ return CC_RESERVED;
}
return class_table->charClasses[ch - class_table->firstChar];
@@ -464,57 +464,57 @@ glong indic_ot_find_syllable(const IndicOTClassTable *class_table, const gunicha
gint8 state = 0;
while (cursor < char_count) {
- IndicOTCharClass char_class = indic_ot_get_char_class(class_table, chars[cursor]);
+ IndicOTCharClass char_class = indic_ot_get_char_class(class_table, chars[cursor]);
- state = stateTable[state][char_class & CF_CLASS_MASK];
+ state = stateTable[state][char_class & CF_CLASS_MASK];
- /*for the components of split matra*/
+ /*for the components of split matra*/
if ((char_count >= cursor + 3) &&
(chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DCF && chars[cursor + 2] == 0x0DCA)) { /*for 3 split matra of Sinhala*/
return cursor + 3;
}
else if ((char_count >= cursor + 3) &&
- (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CC2 && chars[cursor + 2] == 0x0CD5)) { /*for 3 split matra of Kannada*/
+ (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CC2 && chars[cursor + 2] == 0x0CD5)) { /*for 3 split matra of Kannada*/
return cursor + 3;
}
- /*for 2 split matra*/
+ /*for 2 split matra*/
else if (char_count >= cursor + 2) {
- /*for Bengali*/
- if ((chars[cursor] == 0x09C7 && chars[cursor + 1] == 0x09BE) ||
- (chars[cursor] == 0x09C7 && chars[cursor + 1] == 0x09D7) ||
- /*for Oriya*/
- (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B3E) ||
- (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B56) ||
- (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B57) ||
- /*for Tamil*/
- (chars[cursor] == 0x0BC6 && chars[cursor + 1] == 0x0BBE) ||
- (chars[cursor] == 0x0BC6 && chars[cursor + 1] == 0x0BD7) ||
- (chars[cursor] == 0x0BC7 && chars[cursor + 1] == 0x0BBE) ||
- /*for Malayalam*/
- (chars[cursor] == 0x0D46 && chars[cursor + 1] == 0x0D3E) ||
- (chars[cursor] == 0x0D46 && chars[cursor + 1] == 0x0D57) ||
- (chars[cursor] == 0x0D47 && chars[cursor + 1] == 0x0D3E) ||
- /*for Sinhala*/
- (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DCA) ||
- (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DCF) ||
- (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DDF) ||
- (chars[cursor] == 0x0DDC && chars[cursor + 1] == 0x0DCA) ||
- /*for Telugu*/
- (chars[cursor] == 0x0C46 && chars[cursor + 1] == 0x0C56) ||
- /*for Kannada*/
- (chars[cursor] == 0x0CBF && chars[cursor + 1] == 0x0CD5) ||
- (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CD5) ||
- (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CD6) ||
- (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CC2) ||
- (chars[cursor] == 0x0CCA && chars[cursor + 1] == 0x0CD5))
+ /*for Bengali*/
+ if ((chars[cursor] == 0x09C7 && chars[cursor + 1] == 0x09BE) ||
+ (chars[cursor] == 0x09C7 && chars[cursor + 1] == 0x09D7) ||
+ /*for Oriya*/
+ (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B3E) ||
+ (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B56) ||
+ (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B57) ||
+ /*for Tamil*/
+ (chars[cursor] == 0x0BC6 && chars[cursor + 1] == 0x0BBE) ||
+ (chars[cursor] == 0x0BC6 && chars[cursor + 1] == 0x0BD7) ||
+ (chars[cursor] == 0x0BC7 && chars[cursor + 1] == 0x0BBE) ||
+ /*for Malayalam*/
+ (chars[cursor] == 0x0D46 && chars[cursor + 1] == 0x0D3E) ||
+ (chars[cursor] == 0x0D46 && chars[cursor + 1] == 0x0D57) ||
+ (chars[cursor] == 0x0D47 && chars[cursor + 1] == 0x0D3E) ||
+ /*for Sinhala*/
+ (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DCA) ||
+ (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DCF) ||
+ (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DDF) ||
+ (chars[cursor] == 0x0DDC && chars[cursor + 1] == 0x0DCA) ||
+ /*for Telugu*/
+ (chars[cursor] == 0x0C46 && chars[cursor + 1] == 0x0C56) ||
+ /*for Kannada*/
+ (chars[cursor] == 0x0CBF && chars[cursor + 1] == 0x0CD5) ||
+ (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CD5) ||
+ (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CD6) ||
+ (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CC2) ||
+ (chars[cursor] == 0x0CCA && chars[cursor + 1] == 0x0CD5))
return cursor + 2;
}
- if (state < 0) {
- break;
- }
+ if (state < 0) {
+ break;
+ }
- cursor += 1;
+ cursor += 1;
}
return cursor;
diff --git a/modules/indic/indic-ot.c b/modules/indic/indic-ot.c
index 3b392674..477c53e9 100644
--- a/modules/indic/indic-ot.c
+++ b/modules/indic/indic-ot.c
@@ -89,17 +89,17 @@ static void saveMatra(Output *output, gunichar matra, IndicOTCharClass matraClas
{
/* FIXME: check if already set, or if not a matra... */
if (IS_M_PRE(matraClass)) {
- output->fMpre = matra;
+ output->fMpre = matra;
} else if (IS_M_BELOW(matraClass)) {
- output->fMbelow = matra;
+ output->fMbelow = matra;
} else if (IS_M_ABOVE(matraClass)) {
- output->fMabove = matra;
+ output->fMabove = matra;
} else if (IS_M_POST(matraClass)) {
- output->fMpost = matra;
+ output->fMpost = matra;
} else if (IS_LENGTH_MARK(matraClass)) {
- output->fLengthMark = matra;
+ output->fLengthMark = matra;
} else if (IS_AL_LAKUNA(matraClass)) {
- output->fAlLakuna = matra;
+ output->fAlLakuna = matra;
}
}
@@ -117,19 +117,19 @@ static gboolean noteMatra(Output *output, const IndicOTClassTable *classTable, g
IndicOTCharClass matraClass = indic_ot_get_char_class(classTable, matra);
if (IS_MATRA(matraClass)) {
- if (IS_SPLIT_MATRA(matraClass)) {
- const IndicOTSplitMatra *splitMatra = indic_ot_get_split_matra(classTable, matraClass);
- int i;
+ if (IS_SPLIT_MATRA(matraClass)) {
+ const IndicOTSplitMatra *splitMatra = indic_ot_get_split_matra(classTable, matraClass);
+ int i;
- for (i = 0; i < 3 && (*splitMatra)[i] != 0; i += 1) {
- gunichar piece = (*splitMatra)[i];
- IndicOTCharClass pieceClass = indic_ot_get_char_class(classTable, piece);
+ for (i = 0; i < 3 && (*splitMatra)[i] != 0; i += 1) {
+ gunichar piece = (*splitMatra)[i];
+ IndicOTCharClass pieceClass = indic_ot_get_char_class(classTable, piece);
- saveMatra(output, piece, pieceClass);
- }
- } else {
- saveMatra(output, matra, matraClass);
- }
+ saveMatra(output, piece, pieceClass);
+ }
+ } else {
+ saveMatra(output, matra, matraClass);
+ }
return TRUE;
} else
@@ -139,7 +139,7 @@ static gboolean noteMatra(Output *output, const IndicOTClassTable *classTable, g
static void noteBaseConsonant(Output *output)
{
if (output->fMPreFixups && output->fMPreOutIndex >= 0) {
- indic_mprefixups_add(output->fMPreFixups, output->fOutIndex, output->fMPreOutIndex);
+ indic_mprefixups_add(output->fMPreFixups, output->fOutIndex, output->fMPreOutIndex);
}
}
@@ -167,9 +167,9 @@ static void swapChars(Output *output, int a, int b)
static void writeChar(Output *output, gunichar ch, guint32 charIndex, gulong charTags)
{
if (output->fOutChars != NULL) {
- output->fOutChars[output->fOutIndex] = ch;
- output->fCharIndices[output->fOutIndex] = output->fOriginalOffsets[charIndex];
- output->fCharTags[output->fOutIndex] = charTags;
+ output->fOutChars[output->fOutIndex] = ch;
+ output->fCharIndices[output->fOutIndex] = output->fOriginalOffsets[charIndex];
+ output->fCharTags[output->fOutIndex] = charTags;
}
output->fOutIndex += 1;
@@ -178,47 +178,47 @@ static void writeChar(Output *output, gunichar ch, guint32 charIndex, gulong cha
static void writeMpre(Output *output)
{
if (output->fMpre != 0) {
- gulong tags = output->fMatraTags;
+ gulong tags = output->fMatraTags;
if (output->fMatraWordStart)
tags &= ~init;
- output->fMPreOutIndex = output->fOutIndex;
- writeChar(output, output->fMpre, output->fMatraIndex, tags);
+ output->fMPreOutIndex = output->fOutIndex;
+ writeChar(output, output->fMpre, output->fMatraIndex, tags);
}
}
static void writeMbelow(Output *output)
{
if (output->fMbelow != 0) {
- writeChar(output, output->fMbelow, output->fMatraIndex, output->fMatraTags);
+ writeChar(output, output->fMbelow, output->fMatraIndex, output->fMatraTags);
}
}
static void writeMabove(Output *output)
{
if (output->fMabove != 0) {
- writeChar(output, output->fMabove, output->fMatraIndex, output->fMatraTags);
+ writeChar(output, output->fMabove, output->fMatraIndex, output->fMatraTags);
}
}
static void writeMpost(Output *output)
{
if (output->fMpost != 0) {
- writeChar(output, output->fMpost, output->fMatraIndex, output->fMatraTags);
+ writeChar(output, output->fMpost, output->fMatraIndex, output->fMatraTags);
}
}
static void writeLengthMark(Output *output)
{
if (output->fLengthMark != 0) {
- writeChar(output, output->fLengthMark, output->fMatraIndex, output->fMatraTags);
+ writeChar(output, output->fLengthMark, output->fMatraIndex, output->fMatraTags);
}
}
static void writeAlLakuna(Output *output)
{
if (output->fAlLakuna != 0) {
- writeChar(output, output->fAlLakuna, output->fMatraIndex, output->fMatraTags);
+ writeChar(output, output->fAlLakuna, output->fMatraIndex, output->fMatraTags);
}
}
@@ -244,87 +244,87 @@ glong indic_ot_reorder(const gunichar *chars, const glong *utf8_offsets, glong c
initOutput(&output, utf8_offsets, out_chars, char_indices, char_tags, mpreFixups);
while (prev < char_count) {
- glong syllable = indic_ot_find_syllable(class_table, chars, prev, char_count);
- glong matra, vmabove, vmpost = syllable;
+ glong syllable = indic_ot_find_syllable(class_table, chars, prev, char_count);
+ glong matra, vmabove, vmpost = syllable;
- while (vmpost > prev && indic_ot_is_vm_post(class_table, chars[vmpost - 1])) {
- vmpost -= 1;
- }
+ while (vmpost > prev && indic_ot_is_vm_post(class_table, chars[vmpost - 1])) {
+ vmpost -= 1;
+ }
- vmabove = vmpost;
- while (vmabove > prev && indic_ot_is_vm_above(class_table, chars[vmabove - 1])) {
- vmabove -= 1;
- }
+ vmabove = vmpost;
+ while (vmabove > prev && indic_ot_is_vm_above(class_table, chars[vmabove - 1])) {
+ vmabove -= 1;
+ }
- matra = vmabove - 1;
+ matra = vmabove - 1;
initMatra(&output, prev, blwf_p, !last_in_word);
- while (noteMatra(&output, class_table, chars[matra]) &&
- matra != prev)
- matra--;
+ while (noteMatra(&output, class_table, chars[matra]) &&
+ matra != prev)
+ matra--;
last_in_word = TRUE;
- switch (indic_ot_get_char_class(class_table, chars[prev]) & CF_CLASS_MASK) {
- case CC_RESERVED:
+ switch (indic_ot_get_char_class(class_table, chars[prev]) & CF_CLASS_MASK) {
+ case CC_RESERVED:
last_in_word = FALSE;
/* Fall through */
- case CC_INDEPENDENT_VOWEL:
- case CC_ZERO_WIDTH_MARK:
- for (i = prev; i < syllable; i += 1) {
- writeChar(&output, chars[i], /*i*/ prev, blwf_p);
- }
-
- break;
-
- case CC_MODIFYING_MARK_ABOVE:
- case CC_MODIFYING_MARK_POST:
- case CC_NUKTA:
- case CC_VIRAMA:
- case CC_AL_LAKUNA:
- writeChar(&output, C_DOTTED_CIRCLE, prev, blwf_p);
- writeChar(&output, chars[prev], prev, blwf_p);
- break;
-
- case CC_DEPENDENT_VOWEL:
- writeMpre(&output);
- writeChar(&output, C_DOTTED_CIRCLE, prev, blwf_p);
- writeMbelow(&output);
- writeMabove(&output);
- writeMpost(&output);
- writeLengthMark(&output);
- writeAlLakuna(&output);
- break;
-
- case CC_CONSONANT:
- case CC_CONSONANT_WITH_NUKTA:
- {
- guint32 length = vmabove - prev;
- glong lastConsonant = vmabove - 1;
- glong baseLimit = prev;
- glong baseConsonant, postBase, postBaseLimit;
+ case CC_INDEPENDENT_VOWEL:
+ case CC_ZERO_WIDTH_MARK:
+ for (i = prev; i < syllable; i += 1) {
+ writeChar(&output, chars[i], /*i*/ prev, blwf_p);
+ }
+
+ break;
+
+ case CC_MODIFYING_MARK_ABOVE:
+ case CC_MODIFYING_MARK_POST:
+ case CC_NUKTA:
+ case CC_VIRAMA:
+ case CC_AL_LAKUNA:
+ writeChar(&output, C_DOTTED_CIRCLE, prev, blwf_p);
+ writeChar(&output, chars[prev], prev, blwf_p);
+ break;
+
+ case CC_DEPENDENT_VOWEL:
+ writeMpre(&output);
+ writeChar(&output, C_DOTTED_CIRCLE, prev, blwf_p);
+ writeMbelow(&output);
+ writeMabove(&output);
+ writeMpost(&output);
+ writeLengthMark(&output);
+ writeAlLakuna(&output);
+ break;
+
+ case CC_CONSONANT:
+ case CC_CONSONANT_WITH_NUKTA:
+ {
+ guint32 length = vmabove - prev;
+ glong lastConsonant = vmabove - 1;
+ glong baseLimit = prev;
+ glong baseConsonant, postBase, postBaseLimit;
gboolean seenVattu, seenBelowBaseForm, supressVattu;
glong bcSpan;
- /* Check for REPH at front of syllable */
- if (length > 2 && indic_ot_is_reph(class_table, chars[prev]) && indic_ot_is_virama(class_table, chars[prev + 1])) {
- baseLimit += 2;
-
- /* Check for eyelash RA, if the script supports it */
- if ((class_table->scriptFlags & SF_EYELASH_RA) != 0 &&
- chars[baseLimit] == C_SIGN_ZWJ) {
- if (length > 3) {
- baseLimit += 1;
- } else {
- baseLimit -= 2;
- }
- }
- }
+ /* Check for REPH at front of syllable */
+ if (length > 2 && indic_ot_is_reph(class_table, chars[prev]) && indic_ot_is_virama(class_table, chars[prev + 1])) {
+ baseLimit += 2;
+
+ /* Check for eyelash RA, if the script supports it */
+ if ((class_table->scriptFlags & SF_EYELASH_RA) != 0 &&
+ chars[baseLimit] == C_SIGN_ZWJ) {
+ if (length > 3) {
+ baseLimit += 1;
+ } else {
+ baseLimit -= 2;
+ }
+ }
+ }
- while (lastConsonant > baseLimit && !indic_ot_is_consonant(class_table, chars[lastConsonant])) {
- lastConsonant -= 1;
- }
+ while (lastConsonant > baseLimit && !indic_ot_is_consonant(class_table, chars[lastConsonant])) {
+ lastConsonant -= 1;
+ }
- baseConsonant = lastConsonant;
- postBase = lastConsonant + 1;
+ baseConsonant = lastConsonant;
+ postBase = lastConsonant + 1;
postBaseLimit = class_table->scriptFlags & SF_POST_BASE_LIMIT_MASK;
seenVattu = false;
@@ -412,7 +412,7 @@ glong indic_ot_reorder(const gunichar *chars, const glong *utf8_offsets, glong c
}
}
- /* note the base consonant for post-GSUB fixups */
+ /* note the base consonant for post-GSUB fixups */
noteBaseConsonant(&output);
/* write base consonant */
@@ -420,7 +420,7 @@ glong indic_ot_reorder(const gunichar *chars, const glong *utf8_offsets, glong c
writeChar(&output, chars[i], /*i*/ prev, nukt_p);
}
- /* for the special conjuction of Cons+0x0d4d+0x0d31 or Cons+0x0d4d+0x0d30 of Malayalam */
+ /* for the special conjuction of Cons+0x0d4d+0x0d31 or Cons+0x0d4d+0x0d30 of Malayalam */
if ((baseConsonant - 2 >= 0) &&
(chars[baseConsonant - 1] == 0x0d4d) &&
((chars[baseConsonant] == 0x0d31) ||
@@ -429,25 +429,25 @@ glong indic_ot_reorder(const gunichar *chars, const glong *utf8_offsets, glong c
(chars[baseConsonant - 2] <= 0x0d39))) {
swapChars (&output, -1, -3);
- if (mpreFixups) {
+ if (mpreFixups) {
if (mpreFixups->fFixupCount > 0) {
- mpreFixups->fFixupCount--;
+ mpreFixups->fFixupCount--;
}
- }
+ }
}
if ((class_table->scriptFlags & SF_MATRAS_AFTER_BASE) != 0) {
gboolean is_for_0C48 = FALSE;
- if (output.fOutChars != NULL) { /*for 0x0C48 of Telugu*/
+ if (output.fOutChars != NULL) { /*for 0x0C48 of Telugu*/
int t;
for (t = prev; t < syllable; t++) {
- if (chars[t] == 0x0C48) {
+ if (chars[t] == 0x0C48) {
writeMabove(&output);
writeMbelow(&output);
writeMpost(&output);
- is_for_0C48 = TRUE;
- break;
+ is_for_0C48 = TRUE;
+ break;
}
}
}
@@ -532,15 +532,15 @@ glong indic_ot_reorder(const gunichar *chars, const glong *utf8_offsets, glong c
writeChar(&output, chars[i], /*i*/ prev, blwf_p);
}
- break;
- }
+ break;
+ }
- default:
- break;
- }
+ default:
+ break;
+ }
- prev = syllable;
+ prev = syllable;
}
if (outMPreFixups) {