summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2000-12-02 07:49:56 +0000
committerHavoc Pennington <hp@src.gnome.org>2000-12-02 07:49:56 +0000
commit31832c0f4bcdf3e7c69cd5b8a7ad570a7b60d525 (patch)
treed7ed3aa9ac35017fe03d954dd6baa2ccfaf3ed30 /modules
parente9e84a3f75fbab073ce5488c0e82b3e7fc39bcda (diff)
downloadpango-31832c0f4bcdf3e7c69cd5b8a7ad570a7b60d525.tar.gz
delete lang engine
2000-11-30 Havoc Pennington <hp@pobox.com> * modules/thai/thai.c: delete lang engine * modules/tamil/tamil.c: delete lang engine (tamil_engine_x_new): fix type tag for shape engine * modules/indic/myanmar.c: delete lang engine (pango_engine_x_new): fix type tag for shape engine * modules/indic/gurmukhi.c: delete lang engine (pango_indic_engine_x_new): fix type tag for shape engine * modules/indic/gujarati.c: delete lang engine (pango_indic_engine_x_new): fix type tag for shape engine * modules/indic/devanagari.c: delete lang engine (pango_indic_engine_x_new): fix type tag for shape engine * modules/indic/pango-indic-script.h (SCRIPT_ENGINE_DEFINITION): delete lang engine * modules/indic/bengali.c: delete the lang engine (pango_indic_engine_x_new): fix type tag for shape engine * modules/hangul/hangul.c: delete the lang engine (hangul_engine_x_new): fix type tag for shape engine * modules/basic/basic.c: delete the lang engine (basic_engine_x_new): fix type tag for shape engine * modules/basic/basic-win32.c: delete the lang engine (basic_engine_win32_new): this was a shape engine, use correct type tag * modules/basic/basic-ft2.c: delete the lang engine * modules/arabic/arabic.c: Delete the lang engine (arabic_engine_x_new): this is a shape engine, not a lang engine, fix type tag * pango/pango-layout.c (pango_layout_index_to_line_x): handle the fact that paragraph delimiters aren't in the layout lines (pango_layout_index_to_pos): update to handle paragraph delimiters * pango/break.c (pango_find_paragraph_boundary): New function to find paragraph boundaries * pango/pango-layout.c (get_items_log_attrs): don't separate calls to pango_break() when directional level changes * pango/pango-layout.h (struct _PangoLayoutLine): put start index of the line into the struct * pango/pango-layout.c (pango_layout_get_cursor_pos): Fixups to reflect the fact that paragraph separators are removed from the input text. * pango/pango-layout.c (can_break_at): don't special-case start of line and whitespace-following-alphabetic here, because pango_break() already handles that properly * tests/testboundaries.c, tests/Makefile.am, tests/runtests.sh: Add directory for test programs, and a script to run them all * configure.in: Create Makefile in tests * pango/break.c (pango_break): Try for a real implementation of the Unicode text boundary algorithms (pango_get_log_attrs): Allow length to be -1 * pango/pango-context.c (pango_itemize): use pango_item_new(), assert that items added to the list are sane. * pango/pango-layout.c (pango_layout_check_lines): Reimplement to honor the paragraph boundaries from pango_break() * pango/pango-layout.c (process_item): use pango_item_split() here * pango/pango-item.c (pango_item_split): New function to split an item into two items
Diffstat (limited to 'modules')
-rw-r--r--modules/arabic/arabic-x.c70
-rw-r--r--modules/arabic/arabic.c70
-rw-r--r--modules/basic/basic-ft2.c33
-rw-r--r--modules/basic/basic-win32.c35
-rw-r--r--modules/basic/basic-x.c39
-rw-r--r--modules/basic/basic.c39
-rw-r--r--modules/hangul/hangul-x.c40
-rw-r--r--modules/hangul/hangul.c40
-rw-r--r--modules/indic/bengali-x.c49
-rw-r--r--modules/indic/bengali.c49
-rw-r--r--modules/indic/devanagari-x.c49
-rw-r--r--modules/indic/devanagari.c49
-rw-r--r--modules/indic/gujarati-x.c49
-rw-r--r--modules/indic/gujarati.c49
-rw-r--r--modules/indic/gurmukhi-x.c49
-rw-r--r--modules/indic/gurmukhi.c49
-rw-r--r--modules/indic/myanmar-x.c49
-rw-r--r--modules/indic/myanmar.c49
-rw-r--r--modules/indic/pango-indic-script.h5
-rw-r--r--modules/tamil/tamil-x.c61
-rw-r--r--modules/tamil/tamil.c61
-rw-r--r--modules/thai/thai-x.c42
-rw-r--r--modules/thai/thai.c42
23 files changed, 55 insertions, 1012 deletions
diff --git a/modules/arabic/arabic-x.c b/modules/arabic/arabic-x.c
index 49435b5c..8115e606 100644
--- a/modules/arabic/arabic-x.c
+++ b/modules/arabic/arabic-x.c
@@ -29,12 +29,6 @@ static PangoEngineRange arabic_range[] = {
static PangoEngineInfo script_engines[] = {
{
- "ArabicScriptEngineLang",
- PANGO_ENGINE_TYPE_LANG,
- PANGO_RENDER_TYPE_NONE,
- arabic_range, G_N_ELEMENTS(arabic_range)
- },
- {
"ArabicScriptEngineX",
PANGO_ENGINE_TYPE_SHAPE,
PANGO_RENDER_TYPE_X,
@@ -44,58 +38,6 @@ static PangoEngineInfo script_engines[] = {
static gint n_script_engines = G_N_ELEMENTS (script_engines);
-
-
-
-/*
- * Language script engine
- */
-
-static void
-arabic_engine_break (const char *text,
- int len,
- PangoAnalysis *analysis,
- PangoLogAttr *attrs)
-{
- /* Most of the code comes from tamil_engine_break
- */
-
- 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 *
-arabic_engine_lang_new ()
-{
- PangoEngineLang *result;
-
- result = g_new (PangoEngineLang, 1);
-
- result->engine.id = "ArabicScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
- result->engine.length = sizeof (result);
- result->script_break = arabic_engine_break;
-
- return (PangoEngine *)result;
-}
-
/*
* X window system script engine portion
*/
@@ -377,7 +319,7 @@ arabic_engine_x_new ()
result = g_new (PangoEngineShape, 1);
result->engine.id = "ArabicScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
+ result->engine.type = PANGO_ENGINE_TYPE_SHAPE;
result->engine.length = sizeof (result);
result->script_shape = arabic_engine_shape;
result->get_coverage = arabic_engine_get_coverage;
@@ -408,12 +350,10 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo **engines, int *n_engines)
PangoEngine *
MODULE_ENTRY(script_engine_load) (const char *id)
{
- if (!strcmp (id, "ArabicScriptEngineLang"))
- return arabic_engine_lang_new ();
- else if (!strcmp (id, "ArabicScriptEngineX"))
- return arabic_engine_x_new ();
- else
- return NULL;
+ if (!strcmp (id, "ArabicScriptEngineX"))
+ return arabic_engine_x_new ();
+ else
+ return NULL;
}
void
diff --git a/modules/arabic/arabic.c b/modules/arabic/arabic.c
index 49435b5c..8115e606 100644
--- a/modules/arabic/arabic.c
+++ b/modules/arabic/arabic.c
@@ -29,12 +29,6 @@ static PangoEngineRange arabic_range[] = {
static PangoEngineInfo script_engines[] = {
{
- "ArabicScriptEngineLang",
- PANGO_ENGINE_TYPE_LANG,
- PANGO_RENDER_TYPE_NONE,
- arabic_range, G_N_ELEMENTS(arabic_range)
- },
- {
"ArabicScriptEngineX",
PANGO_ENGINE_TYPE_SHAPE,
PANGO_RENDER_TYPE_X,
@@ -44,58 +38,6 @@ static PangoEngineInfo script_engines[] = {
static gint n_script_engines = G_N_ELEMENTS (script_engines);
-
-
-
-/*
- * Language script engine
- */
-
-static void
-arabic_engine_break (const char *text,
- int len,
- PangoAnalysis *analysis,
- PangoLogAttr *attrs)
-{
- /* Most of the code comes from tamil_engine_break
- */
-
- 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 *
-arabic_engine_lang_new ()
-{
- PangoEngineLang *result;
-
- result = g_new (PangoEngineLang, 1);
-
- result->engine.id = "ArabicScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
- result->engine.length = sizeof (result);
- result->script_break = arabic_engine_break;
-
- return (PangoEngine *)result;
-}
-
/*
* X window system script engine portion
*/
@@ -377,7 +319,7 @@ arabic_engine_x_new ()
result = g_new (PangoEngineShape, 1);
result->engine.id = "ArabicScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
+ result->engine.type = PANGO_ENGINE_TYPE_SHAPE;
result->engine.length = sizeof (result);
result->script_shape = arabic_engine_shape;
result->get_coverage = arabic_engine_get_coverage;
@@ -408,12 +350,10 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo **engines, int *n_engines)
PangoEngine *
MODULE_ENTRY(script_engine_load) (const char *id)
{
- if (!strcmp (id, "ArabicScriptEngineLang"))
- return arabic_engine_lang_new ();
- else if (!strcmp (id, "ArabicScriptEngineX"))
- return arabic_engine_x_new ();
- else
- return NULL;
+ if (!strcmp (id, "ArabicScriptEngineX"))
+ return arabic_engine_x_new ();
+ else
+ return NULL;
}
void
diff --git a/modules/basic/basic-ft2.c b/modules/basic/basic-ft2.c
index 973e8a43..b252eed0 100644
--- a/modules/basic/basic-ft2.c
+++ b/modules/basic/basic-ft2.c
@@ -98,12 +98,6 @@ static PangoEngineRange basic_ranges[] = {
static PangoEngineInfo script_engines[] = {
{
- "BasicScriptEngineLangFT2",
- PANGO_ENGINE_TYPE_LANG,
- PANGO_RENDER_TYPE_NONE,
- basic_ranges, G_N_ELEMENTS(basic_ranges)
- },
- {
"BasicScriptEngineFT2",
PANGO_ENGINE_TYPE_SHAPE,
PANGO_RENDER_TYPE_FT2,
@@ -114,33 +108,6 @@ static PangoEngineInfo script_engines[] = {
static gint n_script_engines = G_N_ELEMENTS (script_engines);
/*
- * Language script engine
- */
-
-static void
-basic_engine_break (const char *text,
- gint len,
- PangoAnalysis *analysis,
- PangoLogAttr *attrs)
-{
-}
-
-static PangoEngine *
-basic_engine_lang_new (void)
-{
- PangoEngineLang *result;
-
- result = g_new (PangoEngineLang, 1);
-
- result->engine.id = "BasicScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
- result->engine.length = sizeof (result);
- result->script_break = basic_engine_break;
-
- return (PangoEngine *)result;
-}
-
-/*
* FT2 system script engine portion
*/
diff --git a/modules/basic/basic-win32.c b/modules/basic/basic-win32.c
index 81b0b746..b4599e61 100644
--- a/modules/basic/basic-win32.c
+++ b/modules/basic/basic-win32.c
@@ -41,12 +41,6 @@ static PangoEngineRange basic_ranges[] = {
static PangoEngineInfo script_engines[] = {
{
- "BasicScriptEngineLangWin32",
- PANGO_ENGINE_TYPE_LANG,
- PANGO_RENDER_TYPE_NONE,
- basic_ranges, G_N_ELEMENTS(basic_ranges)
- },
- {
"BasicScriptEngineWin32",
PANGO_ENGINE_TYPE_SHAPE,
PANGO_RENDER_TYPE_WIN32,
@@ -57,33 +51,6 @@ static PangoEngineInfo script_engines[] = {
static gint n_script_engines = G_N_ELEMENTS (script_engines);
/*
- * Language script engine
- */
-
-static void
-basic_engine_break (const char *text,
- gint len,
- PangoAnalysis *analysis,
- PangoLogAttr *attrs)
-{
-}
-
-static PangoEngine *
-basic_engine_lang_new (void)
-{
- PangoEngineLang *result;
-
- result = g_new (PangoEngineLang, 1);
-
- result->engine.id = "BasicScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
- result->engine.length = sizeof (result);
- result->script_break = basic_engine_break;
-
- return (PangoEngine *)result;
-}
-
-/*
* Win32 system script engine portion
*/
@@ -307,7 +274,7 @@ basic_engine_win32_new (void)
result = g_new (PangoEngineShape, 1);
result->engine.id = "BasicScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
+ result->engine.type = PANGO_ENGINE_TYPE_SHAPE;
result->engine.length = sizeof (result);
result->script_shape = basic_engine_shape;
result->get_coverage = basic_engine_get_coverage;
diff --git a/modules/basic/basic-x.c b/modules/basic/basic-x.c
index b49c8480..ab54aa9b 100644
--- a/modules/basic/basic-x.c
+++ b/modules/basic/basic-x.c
@@ -79,12 +79,6 @@ static PangoGlyph conv_ucs4 (CharCache *cache,
static PangoEngineInfo script_engines[] = {
{
- "BasicScriptEngineLang",
- PANGO_ENGINE_TYPE_LANG,
- PANGO_RENDER_TYPE_NONE,
- basic_ranges, G_N_ELEMENTS(basic_ranges)
- },
- {
"BasicScriptEngineX",
PANGO_ENGINE_TYPE_SHAPE,
PANGO_RENDER_TYPE_X,
@@ -95,33 +89,6 @@ static PangoEngineInfo script_engines[] = {
static gint n_script_engines = G_N_ELEMENTS (script_engines);
/*
- * Language script engine
- */
-
-static void
-basic_engine_break (const char *text,
- gint len,
- PangoAnalysis *analysis,
- PangoLogAttr *attrs)
-{
-}
-
-static PangoEngine *
-basic_engine_lang_new ()
-{
- PangoEngineLang *result;
-
- result = g_new (PangoEngineLang, 1);
-
- result->engine.id = "BasicScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
- result->engine.length = sizeof (result);
- result->script_break = basic_engine_break;
-
- return (PangoEngine *)result;
-}
-
-/*
* X window system script engine portion
*/
@@ -481,7 +448,7 @@ basic_engine_x_new ()
result = g_new (PangoEngineShape, 1);
result->engine.id = "BasicScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
+ result->engine.type = PANGO_ENGINE_TYPE_SHAPE;
result->engine.length = sizeof (result);
result->script_shape = basic_engine_shape;
result->get_coverage = basic_engine_get_coverage;
@@ -508,9 +475,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo **engines, gint *n_engines)
PangoEngine *
MODULE_ENTRY(script_engine_load) (const char *id)
{
- if (!strcmp (id, "BasicScriptEngineLang"))
- return basic_engine_lang_new ();
- else if (!strcmp (id, "BasicScriptEngineX"))
+ if (!strcmp (id, "BasicScriptEngineX"))
return basic_engine_x_new ();
else
return NULL;
diff --git a/modules/basic/basic.c b/modules/basic/basic.c
index b49c8480..ab54aa9b 100644
--- a/modules/basic/basic.c
+++ b/modules/basic/basic.c
@@ -79,12 +79,6 @@ static PangoGlyph conv_ucs4 (CharCache *cache,
static PangoEngineInfo script_engines[] = {
{
- "BasicScriptEngineLang",
- PANGO_ENGINE_TYPE_LANG,
- PANGO_RENDER_TYPE_NONE,
- basic_ranges, G_N_ELEMENTS(basic_ranges)
- },
- {
"BasicScriptEngineX",
PANGO_ENGINE_TYPE_SHAPE,
PANGO_RENDER_TYPE_X,
@@ -95,33 +89,6 @@ static PangoEngineInfo script_engines[] = {
static gint n_script_engines = G_N_ELEMENTS (script_engines);
/*
- * Language script engine
- */
-
-static void
-basic_engine_break (const char *text,
- gint len,
- PangoAnalysis *analysis,
- PangoLogAttr *attrs)
-{
-}
-
-static PangoEngine *
-basic_engine_lang_new ()
-{
- PangoEngineLang *result;
-
- result = g_new (PangoEngineLang, 1);
-
- result->engine.id = "BasicScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
- result->engine.length = sizeof (result);
- result->script_break = basic_engine_break;
-
- return (PangoEngine *)result;
-}
-
-/*
* X window system script engine portion
*/
@@ -481,7 +448,7 @@ basic_engine_x_new ()
result = g_new (PangoEngineShape, 1);
result->engine.id = "BasicScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
+ result->engine.type = PANGO_ENGINE_TYPE_SHAPE;
result->engine.length = sizeof (result);
result->script_shape = basic_engine_shape;
result->get_coverage = basic_engine_get_coverage;
@@ -508,9 +475,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo **engines, gint *n_engines)
PangoEngine *
MODULE_ENTRY(script_engine_load) (const char *id)
{
- if (!strcmp (id, "BasicScriptEngineLang"))
- return basic_engine_lang_new ();
- else if (!strcmp (id, "BasicScriptEngineX"))
+ if (!strcmp (id, "BasicScriptEngineX"))
return basic_engine_x_new ();
else
return NULL;
diff --git a/modules/hangul/hangul-x.c b/modules/hangul/hangul-x.c
index eb655ab2..5309b05d 100644
--- a/modules/hangul/hangul-x.c
+++ b/modules/hangul/hangul-x.c
@@ -38,12 +38,6 @@ static PangoEngineRange hangul_ranges[] = {
static PangoEngineInfo script_engines[] = {
{
- "HangulScriptEngineLang",
- PANGO_ENGINE_TYPE_LANG,
- PANGO_RENDER_TYPE_NONE,
- hangul_ranges, G_N_ELEMENTS(hangul_ranges)
- },
- {
"HangulScriptEngineX",
PANGO_ENGINE_TYPE_SHAPE,
PANGO_RENDER_TYPE_X,
@@ -54,34 +48,6 @@ static PangoEngineInfo script_engines[] = {
static int n_script_engines = G_N_ELEMENTS (script_engines);
/*
- * Language script engine
- */
-
-static void
-hangul_engine_break (const char *text,
- int len,
- PangoAnalysis *analysis,
- PangoLogAttr *attrs)
-{
- /* (FIXME) */
-}
-
-static PangoEngine *
-hangul_engine_lang_new ()
-{
- PangoEngineLang *result;
-
- result = g_new (PangoEngineLang, 1);
-
- result->engine.id = "HangulScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
- result->engine.length = sizeof (result);
- result->script_break = hangul_engine_break;
-
- return (PangoEngine *) result;
-}
-
-/*
* X window system script engine portion
*/
@@ -751,7 +717,7 @@ hangul_engine_x_new ()
result = g_new (PangoEngineShape, 1);
result->engine.id = "HangulScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
+ result->engine.type = PANGO_ENGINE_TYPE_SHAPE;
result->engine.length = sizeof (result);
result->script_shape = hangul_engine_shape;
result->get_coverage = hangul_engine_get_coverage;
@@ -781,9 +747,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo **engines, int *n_engines)
PangoEngine *
MODULE_ENTRY(script_engine_load) (const char *id)
{
- if (!strcmp (id, "HangulScriptEngineLang"))
- return hangul_engine_lang_new ();
- else if (!strcmp (id, "HangulScriptEngineX"))
+ if (!strcmp (id, "HangulScriptEngineX"))
return hangul_engine_x_new ();
else
return NULL;
diff --git a/modules/hangul/hangul.c b/modules/hangul/hangul.c
index eb655ab2..5309b05d 100644
--- a/modules/hangul/hangul.c
+++ b/modules/hangul/hangul.c
@@ -38,12 +38,6 @@ static PangoEngineRange hangul_ranges[] = {
static PangoEngineInfo script_engines[] = {
{
- "HangulScriptEngineLang",
- PANGO_ENGINE_TYPE_LANG,
- PANGO_RENDER_TYPE_NONE,
- hangul_ranges, G_N_ELEMENTS(hangul_ranges)
- },
- {
"HangulScriptEngineX",
PANGO_ENGINE_TYPE_SHAPE,
PANGO_RENDER_TYPE_X,
@@ -54,34 +48,6 @@ static PangoEngineInfo script_engines[] = {
static int n_script_engines = G_N_ELEMENTS (script_engines);
/*
- * Language script engine
- */
-
-static void
-hangul_engine_break (const char *text,
- int len,
- PangoAnalysis *analysis,
- PangoLogAttr *attrs)
-{
- /* (FIXME) */
-}
-
-static PangoEngine *
-hangul_engine_lang_new ()
-{
- PangoEngineLang *result;
-
- result = g_new (PangoEngineLang, 1);
-
- result->engine.id = "HangulScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
- result->engine.length = sizeof (result);
- result->script_break = hangul_engine_break;
-
- return (PangoEngine *) result;
-}
-
-/*
* X window system script engine portion
*/
@@ -751,7 +717,7 @@ hangul_engine_x_new ()
result = g_new (PangoEngineShape, 1);
result->engine.id = "HangulScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
+ result->engine.type = PANGO_ENGINE_TYPE_SHAPE;
result->engine.length = sizeof (result);
result->script_shape = hangul_engine_shape;
result->get_coverage = hangul_engine_get_coverage;
@@ -781,9 +747,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo **engines, int *n_engines)
PangoEngine *
MODULE_ENTRY(script_engine_load) (const char *id)
{
- if (!strcmp (id, "HangulScriptEngineLang"))
- return hangul_engine_lang_new ();
- else if (!strcmp (id, "HangulScriptEngineX"))
+ if (!strcmp (id, "HangulScriptEngineX"))
return hangul_engine_x_new ();
else
return NULL;
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, \
diff --git a/modules/tamil/tamil-x.c b/modules/tamil/tamil-x.c
index 98c31548..a8f098d9 100644
--- a/modules/tamil/tamil-x.c
+++ b/modules/tamil/tamil-x.c
@@ -17,12 +17,6 @@ static PangoEngineRange tamil_range[] = {
static PangoEngineInfo script_engines[] = {
{
- "TamilScriptEngineLang",
- PANGO_ENGINE_TYPE_LANG,
- PANGO_RENDER_TYPE_NONE,
- tamil_range, G_N_ELEMENTS(tamil_range)
- },
- {
"TamilScriptEngineX",
PANGO_ENGINE_TYPE_SHAPE,
PANGO_RENDER_TYPE_X,
@@ -33,55 +27,6 @@ static PangoEngineInfo script_engines[] = {
static gint n_script_engines = G_N_ELEMENTS (script_engines);
/*
- * Language script engine
- */
-
-static void
-tamil_engine_break (const char *text,
- int len,
- PangoAnalysis *analysis,
- PangoLogAttr *attrs)
-{
-/* Most of the code comes from pango_break
- * only difference is char stop based on modifiers
- */
-
- 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 = (is_uni_modi(wc)) ? 0 : 1;
- attrs[i].is_word_stop = (i == 0) || attrs[i-1].is_white;
-
- i++;
- cur = g_utf8_next_char (cur);
- }
-}
-
-static PangoEngine *
-tamil_engine_lang_new ()
-{
- PangoEngineLang *result;
-
- result = g_new (PangoEngineLang, 1);
-
- result->engine.id = "TamilScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
- result->engine.length = sizeof (result);
- result->script_break = tamil_engine_break;
-
- return (PangoEngine *)result;
-}
-
-/*
* X window system script engine portion
*/
@@ -228,7 +173,7 @@ tamil_engine_x_new ()
result = g_new (PangoEngineShape, 1);
result->engine.id = "TamilScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
+ result->engine.type = PANGO_ENGINE_TYPE_SHAPE;
result->engine.length = sizeof (result);
result->script_shape = tamil_engine_shape;
result->get_coverage = tamil_engine_get_coverage;
@@ -256,9 +201,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo **engines, int *n_engines)
PangoEngine *
MODULE_ENTRY(script_engine_load) (const char *id)
{
- if (!strcmp (id, "TamilScriptEngineLang"))
- return tamil_engine_lang_new ();
- else if (!strcmp (id, "TamilScriptEngineX"))
+ if (!strcmp (id, "TamilScriptEngineX"))
return tamil_engine_x_new ();
else
return NULL;
diff --git a/modules/tamil/tamil.c b/modules/tamil/tamil.c
index 98c31548..a8f098d9 100644
--- a/modules/tamil/tamil.c
+++ b/modules/tamil/tamil.c
@@ -17,12 +17,6 @@ static PangoEngineRange tamil_range[] = {
static PangoEngineInfo script_engines[] = {
{
- "TamilScriptEngineLang",
- PANGO_ENGINE_TYPE_LANG,
- PANGO_RENDER_TYPE_NONE,
- tamil_range, G_N_ELEMENTS(tamil_range)
- },
- {
"TamilScriptEngineX",
PANGO_ENGINE_TYPE_SHAPE,
PANGO_RENDER_TYPE_X,
@@ -33,55 +27,6 @@ static PangoEngineInfo script_engines[] = {
static gint n_script_engines = G_N_ELEMENTS (script_engines);
/*
- * Language script engine
- */
-
-static void
-tamil_engine_break (const char *text,
- int len,
- PangoAnalysis *analysis,
- PangoLogAttr *attrs)
-{
-/* Most of the code comes from pango_break
- * only difference is char stop based on modifiers
- */
-
- 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 = (is_uni_modi(wc)) ? 0 : 1;
- attrs[i].is_word_stop = (i == 0) || attrs[i-1].is_white;
-
- i++;
- cur = g_utf8_next_char (cur);
- }
-}
-
-static PangoEngine *
-tamil_engine_lang_new ()
-{
- PangoEngineLang *result;
-
- result = g_new (PangoEngineLang, 1);
-
- result->engine.id = "TamilScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
- result->engine.length = sizeof (result);
- result->script_break = tamil_engine_break;
-
- return (PangoEngine *)result;
-}
-
-/*
* X window system script engine portion
*/
@@ -228,7 +173,7 @@ tamil_engine_x_new ()
result = g_new (PangoEngineShape, 1);
result->engine.id = "TamilScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
+ result->engine.type = PANGO_ENGINE_TYPE_SHAPE;
result->engine.length = sizeof (result);
result->script_shape = tamil_engine_shape;
result->get_coverage = tamil_engine_get_coverage;
@@ -256,9 +201,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo **engines, int *n_engines)
PangoEngine *
MODULE_ENTRY(script_engine_load) (const char *id)
{
- if (!strcmp (id, "TamilScriptEngineLang"))
- return tamil_engine_lang_new ();
- else if (!strcmp (id, "TamilScriptEngineX"))
+ if (!strcmp (id, "TamilScriptEngineX"))
return tamil_engine_x_new ();
else
return NULL;
diff --git a/modules/thai/thai-x.c b/modules/thai/thai-x.c
index d6b2c44c..2bb0f120 100644
--- a/modules/thai/thai-x.c
+++ b/modules/thai/thai-x.c
@@ -91,12 +91,6 @@ static PangoEngineRange thai_ranges[] = {
static PangoEngineInfo script_engines[] = {
{
- "ThaiScriptEngineLang",
- PANGO_ENGINE_TYPE_LANG,
- PANGO_RENDER_TYPE_NONE,
- thai_ranges, G_N_ELEMENTS(thai_ranges)
- },
- {
"ThaiScriptEngineX",
PANGO_ENGINE_TYPE_SHAPE,
PANGO_RENDER_TYPE_X,
@@ -105,33 +99,6 @@ static PangoEngineInfo script_engines[] = {
};
/*
- * Language script engine
- */
-
-static void
-thai_engine_break (const char *text,
- gint len,
- PangoAnalysis *analysis,
- PangoLogAttr *attrs)
-{
-}
-
-static PangoEngine *
-thai_engine_lang_new ()
-{
- PangoEngineLang *result;
-
- result = g_new (PangoEngineLang, 1);
-
- result->engine.id = "ThaiScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
- result->engine.length = sizeof (result);
- result->script_break = thai_engine_break;
-
- return (PangoEngine *)result;
-}
-
-/*
* X window system script engine portion
*/
@@ -840,6 +807,11 @@ thai_engine_shape (PangoFont *font,
gunichar cluster[MAX_CLUSTER_CHRS];
gint num_chrs;
+ gunichar base = 0;
+ gunichar group1 = 0;
+ gunichar group2 = 0;
+ int cluster_start = 0;
+
pango_glyph_string_set_size (glyphs, 0);
font_info = get_font_info (font);
@@ -917,9 +889,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo **engines, gint *n_engines)
PangoEngine *
MODULE_ENTRY(script_engine_load) (const char *id)
{
- if (!strcmp (id, "ThaiScriptEngineLang"))
- return thai_engine_lang_new ();
- else if (!strcmp (id, "ThaiScriptEngineX"))
+ if (!strcmp (id, "ThaiScriptEngineX"))
return thai_engine_x_new ();
else
return NULL;
diff --git a/modules/thai/thai.c b/modules/thai/thai.c
index d6b2c44c..2bb0f120 100644
--- a/modules/thai/thai.c
+++ b/modules/thai/thai.c
@@ -91,12 +91,6 @@ static PangoEngineRange thai_ranges[] = {
static PangoEngineInfo script_engines[] = {
{
- "ThaiScriptEngineLang",
- PANGO_ENGINE_TYPE_LANG,
- PANGO_RENDER_TYPE_NONE,
- thai_ranges, G_N_ELEMENTS(thai_ranges)
- },
- {
"ThaiScriptEngineX",
PANGO_ENGINE_TYPE_SHAPE,
PANGO_RENDER_TYPE_X,
@@ -105,33 +99,6 @@ static PangoEngineInfo script_engines[] = {
};
/*
- * Language script engine
- */
-
-static void
-thai_engine_break (const char *text,
- gint len,
- PangoAnalysis *analysis,
- PangoLogAttr *attrs)
-{
-}
-
-static PangoEngine *
-thai_engine_lang_new ()
-{
- PangoEngineLang *result;
-
- result = g_new (PangoEngineLang, 1);
-
- result->engine.id = "ThaiScriptEngine";
- result->engine.type = PANGO_ENGINE_TYPE_LANG;
- result->engine.length = sizeof (result);
- result->script_break = thai_engine_break;
-
- return (PangoEngine *)result;
-}
-
-/*
* X window system script engine portion
*/
@@ -840,6 +807,11 @@ thai_engine_shape (PangoFont *font,
gunichar cluster[MAX_CLUSTER_CHRS];
gint num_chrs;
+ gunichar base = 0;
+ gunichar group1 = 0;
+ gunichar group2 = 0;
+ int cluster_start = 0;
+
pango_glyph_string_set_size (glyphs, 0);
font_info = get_font_info (font);
@@ -917,9 +889,7 @@ MODULE_ENTRY(script_engine_list) (PangoEngineInfo **engines, gint *n_engines)
PangoEngine *
MODULE_ENTRY(script_engine_load) (const char *id)
{
- if (!strcmp (id, "ThaiScriptEngineLang"))
- return thai_engine_lang_new ();
- else if (!strcmp (id, "ThaiScriptEngineX"))
+ if (!strcmp (id, "ThaiScriptEngineX"))
return thai_engine_x_new ();
else
return NULL;