diff options
Diffstat (limited to 'modules/indic')
-rw-r--r-- | modules/indic/bengali-x.c | 49 | ||||
-rw-r--r-- | modules/indic/bengali.c | 49 | ||||
-rw-r--r-- | modules/indic/devanagari-x.c | 49 | ||||
-rw-r--r-- | modules/indic/devanagari.c | 49 | ||||
-rw-r--r-- | modules/indic/gujarati-x.c | 49 | ||||
-rw-r--r-- | modules/indic/gujarati.c | 49 | ||||
-rw-r--r-- | modules/indic/gurmukhi-x.c | 49 | ||||
-rw-r--r-- | modules/indic/gurmukhi.c | 49 | ||||
-rw-r--r-- | modules/indic/myanmar-x.c | 49 | ||||
-rw-r--r-- | modules/indic/myanmar.c | 49 | ||||
-rw-r--r-- | modules/indic/pango-indic-script.h | 5 |
11 files changed, 20 insertions, 475 deletions
diff --git a/modules/indic/bengali-x.c b/modules/indic/bengali-x.c index 05e430f3..1336d4a1 100644 --- a/modules/indic/bengali-x.c +++ b/modules/indic/bengali-x.c @@ -278,56 +278,13 @@ pango_indic_engine_x_new () PangoEngineShape *result; result = g_new (PangoEngineShape, 1); result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; + result->engine.type = PANGO_ENGINE_TYPE_SHAPE; result->engine.length = sizeof (result); result->script_shape = pango_indic_engine_shape; result->get_coverage = pango_indic_engine_get_coverage; return (PangoEngine *) result; } -static void -pango_indic_engine_break (const char *text, - int len, - PangoAnalysis * analysis, PangoLogAttr * attrs) -{ - const char *cur = text; - gint i = 0; - gunichar wc; - - while (*cur && cur - text < len) - { - wc = g_utf8_get_char (cur); - if (wc == (gunichar)-1) - break; /* FIXME: ERROR */ - - attrs[i].is_white = (wc == ' ' || wc == '\t' || wc == 'n') ? 1 : 0; - attrs[i].is_break = (i > 0 && attrs[i - 1].is_white) || - attrs[i].is_white; - attrs[i].is_char_stop = 1; - attrs[i].is_word_stop = (i == 0) || attrs[i - 1].is_white; - /* actually, is_word_stop in not correct, but simple and good enough. */ - - i++; - cur = g_utf8_next_char (cur); - } -} - - -static PangoEngine * -pango_indic_engine_lang_new () -{ - PangoEngineLang *result; - - result = g_new (PangoEngineLang, 1); - - result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; - result->engine.length = sizeof (result); - result->script_break = pango_indic_engine_break; - - return (PangoEngine *) result; -} - #ifdef MODULE_PREFIX #define MODULE_ENTRY(func) _pango_pango_##func #else @@ -344,9 +301,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo ** engines, int *n_engines) PangoEngine * MODULE_ENTRY(script_engine_load) (const char *id) { - if (!strcmp (id, SCRIPT_STRING "ScriptEngineLang")) - return pango_indic_engine_lang_new (); - else if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) + if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) return pango_indic_engine_x_new (); else return NULL; diff --git a/modules/indic/bengali.c b/modules/indic/bengali.c index 05e430f3..1336d4a1 100644 --- a/modules/indic/bengali.c +++ b/modules/indic/bengali.c @@ -278,56 +278,13 @@ pango_indic_engine_x_new () PangoEngineShape *result; result = g_new (PangoEngineShape, 1); result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; + result->engine.type = PANGO_ENGINE_TYPE_SHAPE; result->engine.length = sizeof (result); result->script_shape = pango_indic_engine_shape; result->get_coverage = pango_indic_engine_get_coverage; return (PangoEngine *) result; } -static void -pango_indic_engine_break (const char *text, - int len, - PangoAnalysis * analysis, PangoLogAttr * attrs) -{ - const char *cur = text; - gint i = 0; - gunichar wc; - - while (*cur && cur - text < len) - { - wc = g_utf8_get_char (cur); - if (wc == (gunichar)-1) - break; /* FIXME: ERROR */ - - attrs[i].is_white = (wc == ' ' || wc == '\t' || wc == 'n') ? 1 : 0; - attrs[i].is_break = (i > 0 && attrs[i - 1].is_white) || - attrs[i].is_white; - attrs[i].is_char_stop = 1; - attrs[i].is_word_stop = (i == 0) || attrs[i - 1].is_white; - /* actually, is_word_stop in not correct, but simple and good enough. */ - - i++; - cur = g_utf8_next_char (cur); - } -} - - -static PangoEngine * -pango_indic_engine_lang_new () -{ - PangoEngineLang *result; - - result = g_new (PangoEngineLang, 1); - - result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; - result->engine.length = sizeof (result); - result->script_break = pango_indic_engine_break; - - return (PangoEngine *) result; -} - #ifdef MODULE_PREFIX #define MODULE_ENTRY(func) _pango_pango_##func #else @@ -344,9 +301,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo ** engines, int *n_engines) PangoEngine * MODULE_ENTRY(script_engine_load) (const char *id) { - if (!strcmp (id, SCRIPT_STRING "ScriptEngineLang")) - return pango_indic_engine_lang_new (); - else if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) + if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) return pango_indic_engine_x_new (); else return NULL; diff --git a/modules/indic/devanagari-x.c b/modules/indic/devanagari-x.c index 028c432e..6ff9bcc9 100644 --- a/modules/indic/devanagari-x.c +++ b/modules/indic/devanagari-x.c @@ -331,56 +331,13 @@ pango_indic_engine_x_new () PangoEngineShape *result; result = g_new (PangoEngineShape, 1); result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; + result->engine.type = PANGO_ENGINE_TYPE_SHAPE; result->engine.length = sizeof (result); result->script_shape = pango_indic_engine_shape; result->get_coverage = pango_indic_engine_get_coverage; return (PangoEngine *) result; } -static void -pango_indic_engine_break (const char *text, - int len, - PangoAnalysis * analysis, PangoLogAttr * attrs) -{ - const char *cur = text; - gint i = 0; - gunichar wc; - - while (*cur && cur - text < len) - { - wc = g_utf8_get_char (cur); - if (wc == (gunichar)-1) - break; /* FIXME: ERROR */ - - attrs[i].is_white = (wc == ' ' || wc == '\t' || wc == 'n') ? 1 : 0; - attrs[i].is_break = (i > 0 && attrs[i - 1].is_white) || - attrs[i].is_white; - attrs[i].is_char_stop = 1; - attrs[i].is_word_stop = (i == 0) || attrs[i - 1].is_white; - /* actually, is_word_stop in not correct, but simple and good enough. */ - - i++; - cur = g_utf8_next_char (cur); - } -} - - -static PangoEngine * -pango_indic_engine_lang_new () -{ - PangoEngineLang *result; - - result = g_new (PangoEngineLang, 1); - - result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; - result->engine.length = sizeof (result); - result->script_break = pango_indic_engine_break; - - return (PangoEngine *) result; -} - #ifdef MODULE_PREFIX #define MODULE_ENTRY(func) _pango_pango_indic_##func #else @@ -397,9 +354,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo ** engines, int *n_engines) PangoEngine * MODULE_ENTRY(script_engine_load) (const char *id) { - if (!strcmp (id, SCRIPT_STRING "ScriptEngineLang")) - return pango_indic_engine_lang_new (); - else if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) + if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) return pango_indic_engine_x_new (); else return NULL; diff --git a/modules/indic/devanagari.c b/modules/indic/devanagari.c index 028c432e..6ff9bcc9 100644 --- a/modules/indic/devanagari.c +++ b/modules/indic/devanagari.c @@ -331,56 +331,13 @@ pango_indic_engine_x_new () PangoEngineShape *result; result = g_new (PangoEngineShape, 1); result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; + result->engine.type = PANGO_ENGINE_TYPE_SHAPE; result->engine.length = sizeof (result); result->script_shape = pango_indic_engine_shape; result->get_coverage = pango_indic_engine_get_coverage; return (PangoEngine *) result; } -static void -pango_indic_engine_break (const char *text, - int len, - PangoAnalysis * analysis, PangoLogAttr * attrs) -{ - const char *cur = text; - gint i = 0; - gunichar wc; - - while (*cur && cur - text < len) - { - wc = g_utf8_get_char (cur); - if (wc == (gunichar)-1) - break; /* FIXME: ERROR */ - - attrs[i].is_white = (wc == ' ' || wc == '\t' || wc == 'n') ? 1 : 0; - attrs[i].is_break = (i > 0 && attrs[i - 1].is_white) || - attrs[i].is_white; - attrs[i].is_char_stop = 1; - attrs[i].is_word_stop = (i == 0) || attrs[i - 1].is_white; - /* actually, is_word_stop in not correct, but simple and good enough. */ - - i++; - cur = g_utf8_next_char (cur); - } -} - - -static PangoEngine * -pango_indic_engine_lang_new () -{ - PangoEngineLang *result; - - result = g_new (PangoEngineLang, 1); - - result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; - result->engine.length = sizeof (result); - result->script_break = pango_indic_engine_break; - - return (PangoEngine *) result; -} - #ifdef MODULE_PREFIX #define MODULE_ENTRY(func) _pango_pango_indic_##func #else @@ -397,9 +354,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo ** engines, int *n_engines) PangoEngine * MODULE_ENTRY(script_engine_load) (const char *id) { - if (!strcmp (id, SCRIPT_STRING "ScriptEngineLang")) - return pango_indic_engine_lang_new (); - else if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) + if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) return pango_indic_engine_x_new (); else return NULL; diff --git a/modules/indic/gujarati-x.c b/modules/indic/gujarati-x.c index 0b72babd..639f5e61 100644 --- a/modules/indic/gujarati-x.c +++ b/modules/indic/gujarati-x.c @@ -307,56 +307,13 @@ pango_indic_engine_x_new () PangoEngineShape *result; result = g_new (PangoEngineShape, 1); result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; + result->engine.type = PANGO_ENGINE_TYPE_SHAPE; result->engine.length = sizeof (result); result->script_shape = pango_indic_engine_shape; result->get_coverage = pango_indic_engine_get_coverage; return (PangoEngine *) result; } -static void -pango_indic_engine_break (const char *text, - int len, - PangoAnalysis * analysis, PangoLogAttr * attrs) -{ - const char *cur = text; - gint i = 0; - gunichar wc; - - while (*cur && cur - text < len) - { - wc = g_utf8_get_char (cur); - if (wc == (gunichar)-1) - break; /* FIXME: ERROR */ - - attrs[i].is_white = (wc == ' ' || wc == '\t' || wc == 'n') ? 1 : 0; - attrs[i].is_break = (i > 0 && attrs[i - 1].is_white) || - attrs[i].is_white; - attrs[i].is_char_stop = 1; - attrs[i].is_word_stop = (i == 0) || attrs[i - 1].is_white; - /* actually, is_word_stop in not correct, but simple and good enough. */ - - i++; - cur = g_utf8_next_char (cur); - } -} - - -static PangoEngine * -pango_indic_engine_lang_new () -{ - PangoEngineLang *result; - - result = g_new (PangoEngineLang, 1); - - result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; - result->engine.length = sizeof (result); - result->script_break = pango_indic_engine_break; - - return (PangoEngine *) result; -} - #ifdef MODULE_PREFIX #define MODULE_ENTRY(func) _pango_pango_indic_##func #else @@ -373,9 +330,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo ** engines, int *n_engines) PangoEngine * MODULE_ENTRY(script_engine_load) (const char *id) { - if (!strcmp (id, SCRIPT_STRING "ScriptEngineLang")) - return pango_indic_engine_lang_new (); - else if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) + if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) return pango_indic_engine_x_new (); else return NULL; diff --git a/modules/indic/gujarati.c b/modules/indic/gujarati.c index 0b72babd..639f5e61 100644 --- a/modules/indic/gujarati.c +++ b/modules/indic/gujarati.c @@ -307,56 +307,13 @@ pango_indic_engine_x_new () PangoEngineShape *result; result = g_new (PangoEngineShape, 1); result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; + result->engine.type = PANGO_ENGINE_TYPE_SHAPE; result->engine.length = sizeof (result); result->script_shape = pango_indic_engine_shape; result->get_coverage = pango_indic_engine_get_coverage; return (PangoEngine *) result; } -static void -pango_indic_engine_break (const char *text, - int len, - PangoAnalysis * analysis, PangoLogAttr * attrs) -{ - const char *cur = text; - gint i = 0; - gunichar wc; - - while (*cur && cur - text < len) - { - wc = g_utf8_get_char (cur); - if (wc == (gunichar)-1) - break; /* FIXME: ERROR */ - - attrs[i].is_white = (wc == ' ' || wc == '\t' || wc == 'n') ? 1 : 0; - attrs[i].is_break = (i > 0 && attrs[i - 1].is_white) || - attrs[i].is_white; - attrs[i].is_char_stop = 1; - attrs[i].is_word_stop = (i == 0) || attrs[i - 1].is_white; - /* actually, is_word_stop in not correct, but simple and good enough. */ - - i++; - cur = g_utf8_next_char (cur); - } -} - - -static PangoEngine * -pango_indic_engine_lang_new () -{ - PangoEngineLang *result; - - result = g_new (PangoEngineLang, 1); - - result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; - result->engine.length = sizeof (result); - result->script_break = pango_indic_engine_break; - - return (PangoEngine *) result; -} - #ifdef MODULE_PREFIX #define MODULE_ENTRY(func) _pango_pango_indic_##func #else @@ -373,9 +330,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo ** engines, int *n_engines) PangoEngine * MODULE_ENTRY(script_engine_load) (const char *id) { - if (!strcmp (id, SCRIPT_STRING "ScriptEngineLang")) - return pango_indic_engine_lang_new (); - else if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) + if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) return pango_indic_engine_x_new (); else return NULL; diff --git a/modules/indic/gurmukhi-x.c b/modules/indic/gurmukhi-x.c index 7d75e505..108053b0 100644 --- a/modules/indic/gurmukhi-x.c +++ b/modules/indic/gurmukhi-x.c @@ -221,56 +221,13 @@ pango_indic_engine_x_new () PangoEngineShape *result; result = g_new (PangoEngineShape, 1); result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; + result->engine.type = PANGO_ENGINE_TYPE_SHAPE; result->engine.length = sizeof (result); result->script_shape = pango_indic_engine_shape; result->get_coverage = pango_indic_engine_get_coverage; return (PangoEngine *) result; } -static void -pango_indic_engine_break (const char *text, - int len, - PangoAnalysis * analysis, PangoLogAttr * attrs) -{ - const char *cur = text; - gint i = 0; - gunichar wc; - - while (*cur && cur - text < len) - { - wc = g_utf8_get_char (cur); - if (wc == (gunichar)-1) - break; /* FIXME: ERROR */ - - attrs[i].is_white = (wc == ' ' || wc == '\t' || wc == 'n') ? 1 : 0; - attrs[i].is_break = (i > 0 && attrs[i - 1].is_white) || - attrs[i].is_white; - attrs[i].is_char_stop = 1; - attrs[i].is_word_stop = (i == 0) || attrs[i - 1].is_white; - /* actually, is_word_stop in not correct, but simple and good enough. */ - - i++; - cur = g_utf8_next_char (cur); - } -} - - -static PangoEngine * -pango_indic_engine_lang_new () -{ - PangoEngineLang *result; - - result = g_new (PangoEngineLang, 1); - - result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; - result->engine.length = sizeof (result); - result->script_break = pango_indic_engine_break; - - return (PangoEngine *) result; -} - #ifdef MODULE_PREFIX #define MODULE_ENTRY(func) _pango_pango_##func #else @@ -287,9 +244,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo ** engines, int *n_engines) PangoEngine * MODULE_ENTRY(script_engine_load) (const char *id) { - if (!strcmp (id, SCRIPT_STRING "ScriptEngineLang")) - return pango_indic_engine_lang_new (); - else if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) + if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) return pango_indic_engine_x_new (); else return NULL; diff --git a/modules/indic/gurmukhi.c b/modules/indic/gurmukhi.c index 7d75e505..108053b0 100644 --- a/modules/indic/gurmukhi.c +++ b/modules/indic/gurmukhi.c @@ -221,56 +221,13 @@ pango_indic_engine_x_new () PangoEngineShape *result; result = g_new (PangoEngineShape, 1); result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; + result->engine.type = PANGO_ENGINE_TYPE_SHAPE; result->engine.length = sizeof (result); result->script_shape = pango_indic_engine_shape; result->get_coverage = pango_indic_engine_get_coverage; return (PangoEngine *) result; } -static void -pango_indic_engine_break (const char *text, - int len, - PangoAnalysis * analysis, PangoLogAttr * attrs) -{ - const char *cur = text; - gint i = 0; - gunichar wc; - - while (*cur && cur - text < len) - { - wc = g_utf8_get_char (cur); - if (wc == (gunichar)-1) - break; /* FIXME: ERROR */ - - attrs[i].is_white = (wc == ' ' || wc == '\t' || wc == 'n') ? 1 : 0; - attrs[i].is_break = (i > 0 && attrs[i - 1].is_white) || - attrs[i].is_white; - attrs[i].is_char_stop = 1; - attrs[i].is_word_stop = (i == 0) || attrs[i - 1].is_white; - /* actually, is_word_stop in not correct, but simple and good enough. */ - - i++; - cur = g_utf8_next_char (cur); - } -} - - -static PangoEngine * -pango_indic_engine_lang_new () -{ - PangoEngineLang *result; - - result = g_new (PangoEngineLang, 1); - - result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; - result->engine.length = sizeof (result); - result->script_break = pango_indic_engine_break; - - return (PangoEngine *) result; -} - #ifdef MODULE_PREFIX #define MODULE_ENTRY(func) _pango_pango_##func #else @@ -287,9 +244,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo ** engines, int *n_engines) PangoEngine * MODULE_ENTRY(script_engine_load) (const char *id) { - if (!strcmp (id, SCRIPT_STRING "ScriptEngineLang")) - return pango_indic_engine_lang_new (); - else if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) + if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) return pango_indic_engine_x_new (); else return NULL; diff --git a/modules/indic/myanmar-x.c b/modules/indic/myanmar-x.c index ea3dc3fc..9bcd8b2a 100644 --- a/modules/indic/myanmar-x.c +++ b/modules/indic/myanmar-x.c @@ -201,56 +201,13 @@ pango_engine_x_new () PangoEngineShape *result; result = g_new (PangoEngineShape, 1); result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; + result->engine.type = PANGO_ENGINE_TYPE_SHAPE; result->engine.length = sizeof (result); result->script_shape = pango_engine_shape; result->get_coverage = pango_engine_get_coverage; return (PangoEngine *) result; } -static void -pango_engine_break (const char *text, - int len, - PangoAnalysis * analysis, PangoLogAttr * attrs) -{ - const char *cur = text; - gint i = 0; - gunichar wc; - - while (*cur && cur - text < len) - { - wc = g_utf8_get_char (cur); - if (wc == (gunichar)-1) - break; /* FIXME: ERROR */ - - attrs[i].is_white = (wc == ' ' || wc == '\t' || wc == 'n') ? 1 : 0; - attrs[i].is_break = (i > 0 && attrs[i - 1].is_white) || - attrs[i].is_white; - attrs[i].is_char_stop = 1; - attrs[i].is_word_stop = (i == 0) || attrs[i - 1].is_white; - /* actually, is_word_stop in not correct, but simple and good enough. */ - - i++; - cur = g_utf8_next_char (cur); - } -} - - -static PangoEngine * -pango_engine_lang_new () -{ - PangoEngineLang *result; - - result = g_new (PangoEngineLang, 1); - - result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; - result->engine.length = sizeof (result); - result->script_break = pango_engine_break; - - return (PangoEngine *) result; -} - #ifdef MODULE_PREFIX #define MODULE_ENTRY(func) _pango_pango_##func #else @@ -267,9 +224,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo ** engines, int *n_engines) PangoEngine * MODULE_ENTRY(script_engine_load) (const char *id) { - if (!strcmp (id, SCRIPT_STRING "ScriptEngineLang")) - return pango_engine_lang_new (); - else if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) + if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) return pango_engine_x_new (); else return NULL; diff --git a/modules/indic/myanmar.c b/modules/indic/myanmar.c index ea3dc3fc..9bcd8b2a 100644 --- a/modules/indic/myanmar.c +++ b/modules/indic/myanmar.c @@ -201,56 +201,13 @@ pango_engine_x_new () PangoEngineShape *result; result = g_new (PangoEngineShape, 1); result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; + result->engine.type = PANGO_ENGINE_TYPE_SHAPE; result->engine.length = sizeof (result); result->script_shape = pango_engine_shape; result->get_coverage = pango_engine_get_coverage; return (PangoEngine *) result; } -static void -pango_engine_break (const char *text, - int len, - PangoAnalysis * analysis, PangoLogAttr * attrs) -{ - const char *cur = text; - gint i = 0; - gunichar wc; - - while (*cur && cur - text < len) - { - wc = g_utf8_get_char (cur); - if (wc == (gunichar)-1) - break; /* FIXME: ERROR */ - - attrs[i].is_white = (wc == ' ' || wc == '\t' || wc == 'n') ? 1 : 0; - attrs[i].is_break = (i > 0 && attrs[i - 1].is_white) || - attrs[i].is_white; - attrs[i].is_char_stop = 1; - attrs[i].is_word_stop = (i == 0) || attrs[i - 1].is_white; - /* actually, is_word_stop in not correct, but simple and good enough. */ - - i++; - cur = g_utf8_next_char (cur); - } -} - - -static PangoEngine * -pango_engine_lang_new () -{ - PangoEngineLang *result; - - result = g_new (PangoEngineLang, 1); - - result->engine.id = SCRIPT_STRING "ScriptEngine"; - result->engine.type = PANGO_ENGINE_TYPE_LANG; - result->engine.length = sizeof (result); - result->script_break = pango_engine_break; - - return (PangoEngine *) result; -} - #ifdef MODULE_PREFIX #define MODULE_ENTRY(func) _pango_pango_##func #else @@ -267,9 +224,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo ** engines, int *n_engines) PangoEngine * MODULE_ENTRY(script_engine_load) (const char *id) { - if (!strcmp (id, SCRIPT_STRING "ScriptEngineLang")) - return pango_engine_lang_new (); - else if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) + if (!strcmp (id, SCRIPT_STRING "ScriptEngineX")) return pango_engine_x_new (); else return NULL; diff --git a/modules/indic/pango-indic-script.h b/modules/indic/pango-indic-script.h index 90c69eca..bade7fd6 100644 --- a/modules/indic/pango-indic-script.h +++ b/modules/indic/pango-indic-script.h @@ -15,11 +15,6 @@ static PangoEngineInfo script_engines[] = \ { \ { \ - SCRIPT_STRING "ScriptEngineLang", \ - PANGO_ENGINE_TYPE_LANG, \ - PANGO_RENDER_TYPE_NONE, \ - pango_indic_range, G_N_ELEMENTS (pango_indic_range)}, \ - { \ SCRIPT_STRING "ScriptEngineX", \ PANGO_ENGINE_TYPE_SHAPE, \ PANGO_RENDER_TYPE_X, \ |