Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 156846 Details for
Bug 238896
[ml_IN] vowel is applied for Chillu consonant instead of consonant [Vowel assignment issue with pango]
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
my patch
bug238896_223169_223170.patch (text/plain), 7.71 KB, created by
Liang Zhang
on 2007-06-13 06:39:11 UTC
(
hide
)
Description:
my patch
Filename:
MIME Type:
Creator:
Liang Zhang
Created:
2007-06-13 06:39:11 UTC
Size:
7.71 KB
patch
obsolete
>--- mprefixups.c.orig 2007-06-04 15:03:24.000000000 +0800 >+++ mprefixups.c 2007-06-13 14:10:00.000000000 +0800 >@@ -26,12 +26,6 @@ > #include "mprefixups.h" > #include <stdio.h> > >-struct _FixupData >-{ >- glong fBaseIndex; >- glong fMPreIndex; >-}; >- > MPreFixups *indic_mprefixups_new(glong char_count) > { > MPreFixups *mprefixups = g_new (MPreFixups, 1); >@@ -81,8 +75,18 @@ > pango_ot_buffer_get_glyphs (buffer, &glyphs, &n_glyphs); > > for (i = 0; i < n_glyphs; i++) { >- if (baseGlyph < 0 && glyphs[i].cluster == baseIndex) >- baseGlyph = i; >+ if (baseGlyph < 0) { >+ if (glyphs[i].cluster == baseIndex) >+ baseGlyph = i; >+ else if ((i == n_glyphs - 2) && >+ (glyphs[i + 1].cluster > baseIndex ) && >+ (glyphs[i].cluster + 2 <= baseIndex)) { >+ baseGlyph = i; >+ } >+ else if (i == n_glyphs - 1 && glyphs[i].cluster + 2 <= baseIndex) { >+ baseGlyph = i; >+ } >+ } > if (glyphs[i].cluster == mpreIndex) { > if (mpreGlyph < 0) > mpreGlyph = i; >--- mprefixups.h.orig 2007-06-12 15:20:32.000000000 +0800 >+++ mprefixups.h 2007-06-12 15:21:39.000000000 +0800 >@@ -32,6 +32,12 @@ > > typedef struct _FixupData FixupData; > >+struct _FixupData >+{ >+ glong fBaseIndex; >+ glong fMPreIndex; >+}; >+ > struct _MPreFixups { > glong fFixupCount; > FixupData *fFixupData; >--- indic-ot-class-tables.c.orig 2007-06-13 14:00:25.000000000 +0800 >+++ indic-ot-class-tables.c 2007-06-13 14:01:26.000000000 +0800 >@@ -270,7 +270,7 @@ > #define TAML_SCRIPT_FLAGS (SF_MPRE_FIXUP | SF_NO_POST_BASE_LIMIT) > #define TELU_SCRIPT_FLAGS (SF_MATRAS_AFTER_BASE | 3) > #define KNDA_SCRIPT_FLAGS (SF_MATRAS_AFTER_BASE | 3) >-#define MLYM_SCRIPT_FLAGS (SF_MPRE_FIXUP | SF_NO_POST_BASE_LIMIT ) >+#define MLYM_SCRIPT_FLAGS (SF_MPRE_FIXUP | SF_NO_POST_BASE_LIMIT | SF_PROCESS_ZWJ) > #define SINH_SCRIPT_FLAGS (SF_MPRE_FIXUP | SF_NO_POST_BASE_LIMIT | SF_PROCESS_ZWJ) > > /* >--- indic-ot.c.orig 2007-05-31 14:05:23.000000000 +0800 >+++ indic-ot.c 2007-06-13 14:03:36.000000000 +0800 >@@ -390,8 +390,8 @@ > } > > supressVattu = IS_VATTU(charClass); >- } else if (IS_VIRAMA(charClass) && chars[i + 1] == C_SIGN_ZWNJ) >- { >+ } >+ else if (IS_VIRAMA(charClass) && chars[i + 1] == C_SIGN_ZWNJ) { > tag = nukt_p; > } > >@@ -420,6 +420,22 @@ > writeChar(&output, chars[i], /*i*/ prev, nukt_p); > } > >+ /* for the special conjuction of Cons+0x0d4d+0x0d31 of Malayalam */ >+ if ((baseConsonant - 2 >= 0) && >+ (chars[baseConsonant - 1] == 0x0d4d) && >+ (chars[baseConsonant] == 0x0d31) && >+ ((chars[baseConsonant - 2] >= 0x0d15) && >+ (chars[baseConsonant - 2] <= 0x0d39) && >+ ((chars[baseConsonant - 2] != 0x0d31) && >+ (chars[baseConsonant - 2] != 0x0d36) && >+ (chars[baseConsonant - 2] != 0x0d38)))) { >+ swapChars (&output, -1, -3); >+ >+ if (mpreFixups) { >+ mpreFixups->fFixupData[mpreFixups->fFixupCount - 1].fBaseIndex -= 2; >+ } >+ } >+ > if ((class_table->scriptFlags & SF_MATRAS_AFTER_BASE) != 0) { > gboolean is_for_0C48 = FALSE; > if (output.fOutChars != NULL) { /*for 0x0C48 of Telugu*/ >@@ -523,7 +539,6 @@ > break; > } > >- > prev = syllable; > } > >--- indic-fc.c.orig 2007-06-06 15:40:35.000000000 +0800 >+++ indic-fc.c 2007-06-13 14:11:23.000000000 +0800 >@@ -219,14 +219,18 @@ > FT_Face face; > PangoOTRulesetDescription desc; > const PangoOTRuleset *ruleset; >- PangoOTBuffer *buffer; >- glong i, n_chars, n_glyphs; >+ PangoOTBuffer *buffer, *buffer_temp; >+ glong i, n_chars, n_glyphs_sy, syllable, char_count, prev = 0, n_glyphs = 0; > gulong *tags = NULL; >- gunichar *wc_in = NULL, *wc_out = NULL; >+ gunichar *wc_in = NULL, *wc_out = NULL, *wc_temp = NULL; > glong *utf8_offsets = NULL; > glong *indices = NULL; > IndicEngineFc *indic_shape_engine = NULL; > MPreFixups *mprefixups; >+ >+ PangoOTGlyph *glyphs_temp; >+ int n_glyphs_temp; >+ GSList *indices_g = NULL; > > g_return_if_fail (font != NULL); > g_return_if_fail (text != NULL); >@@ -240,22 +244,10 @@ > > indic_shape_engine = (IndicEngineFc *) engine; > >- wc_in = expand_text (text, length, &utf8_offsets, &n_chars); >+ wc_in = expand_text (text, length, &utf8_offsets, &n_chars); > >- n_glyphs = indic_ot_reorder (wc_in, utf8_offsets, n_chars, indic_shape_engine->classTable, NULL, NULL, NULL, NULL); >- >- wc_out = g_new (gunichar, n_glyphs); >- indices = g_new (glong, n_glyphs); >- tags = g_new (gulong, n_glyphs); >- >- n_glyphs = indic_ot_reorder (wc_in, utf8_offsets, n_chars, indic_shape_engine->classTable, wc_out, indices, tags, &mprefixups); >- >- pango_glyph_string_set_size (glyphs, n_glyphs); > buffer = pango_ot_buffer_new (fc_font); > >- set_glyphs(font, wc_out, tags, n_glyphs, buffer, >- (indic_shape_engine->classTable->scriptFlags & SF_PROCESS_ZWJ) != 0); >- > desc.script = analysis->script; > desc.language = analysis->language; > >@@ -269,32 +261,73 @@ > desc.other_features = NULL; > > ruleset = pango_ot_ruleset_get_for_description (pango_ot_info_get (face), &desc); >+ >+ while (prev < n_chars) { >+ syllable = indic_ot_find_syllable(indic_shape_engine->classTable, wc_in, prev, n_chars); >+ char_count = syllable - prev; >+ wc_temp = g_new (gunichar, char_count); >+ for (i = 0; i < char_count; i++) { >+ wc_temp[i] = wc_in[i + prev]; >+ } >+ >+ n_glyphs_sy = indic_ot_reorder (wc_temp, utf8_offsets, char_count, indic_shape_engine->classTable, NULL, NULL, NULL, NULL); >+ wc_out = g_new (gunichar, n_glyphs_sy); >+ indices = g_new (glong, n_glyphs_sy); >+ tags = g_new (gulong, n_glyphs_sy); >+ >+ n_glyphs_sy = indic_ot_reorder (wc_temp, utf8_offsets, char_count, indic_shape_engine->classTable, wc_out, indices, tags, &mprefixups); >+ >+ for (i = 0; i < n_glyphs_sy; i++) { >+ g_slist_append(indices_g, GINT_TO_POINTER(indices[i])); >+ } >+ >+ n_glyphs += n_glyphs_sy; >+ >+ buffer_temp = pango_ot_buffer_new (fc_font); >+ >+ set_glyphs(font, wc_out, tags, n_glyphs_sy, buffer_temp, >+ (indic_shape_engine->classTable->scriptFlags & SF_PROCESS_ZWJ) != 0); >+ >+ /* do gsub processing */ >+ pango_ot_ruleset_substitute (ruleset, buffer_temp); >+ >+ /* Fix pre-modifiers for some scripts before base consonant */ >+ if (mprefixups) >+ { >+ indic_mprefixups_apply (mprefixups, buffer_temp); >+ indic_mprefixups_free (mprefixups); >+ } >+ >+ /* do gpos processing */ >+ pango_ot_ruleset_position (ruleset, buffer_temp); >+ >+ pango_ot_buffer_get_glyphs (buffer_temp, &glyphs_temp, &n_glyphs_temp); >+ >+ for (i = 0; i < n_glyphs_temp; i++) { >+ pango_ot_buffer_add_glyph (buffer, glyphs_temp[i].glyph, glyphs_temp[i].properties, glyphs_temp[i].cluster); >+ } >+ >+ prev = syllable; >+ >+ pango_ot_buffer_destroy (buffer_temp); >+ g_free (wc_temp); >+ g_free (tags); >+ g_free (indices); >+ g_free (wc_out); >+ } > >- /* do gsub processing */ >- pango_ot_ruleset_substitute (ruleset, buffer); >- >- /* Fix pre-modifiers for some scripts before base consonant */ >- if (mprefixups) >- { >- indic_mprefixups_apply (mprefixups, buffer); >- indic_mprefixups_free (mprefixups); >- } >- >- /* do gpos processing */ >- pango_ot_ruleset_position (ruleset, buffer); >+ pango_glyph_string_set_size (glyphs, n_glyphs); > > pango_ot_buffer_output (buffer, glyphs); > > /* Get the right log_clusters values */ > for (i = 0; i < glyphs->num_glyphs; i += 1) >- glyphs->log_clusters[i] = indices[glyphs->log_clusters[i]]; >+ glyphs->log_clusters[i] = g_slist_nth_data(indices_g, glyphs->log_clusters[i]); > > pango_fc_font_unlock_face (fc_font); > > pango_ot_buffer_destroy (buffer); >- g_free (tags); >- g_free (indices); >- g_free (wc_out); >+ g_slist_free(indices_g); > g_free (wc_in); > g_free (utf8_offsets); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238896
: 156846 |
363287