summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/Makefile.am1
-rw-r--r--modules/arabic/Makefile.am27
-rw-r--r--modules/arabic/arabic-x.c354
-rw-r--r--modules/arabic/arconv.c792
-rw-r--r--modules/arabic/arconv.h43
-rw-r--r--modules/arabic/langboxfont.c254
-rw-r--r--modules/arabic/langboxfont.h28
-rw-r--r--modules/arabic/mulefont.c295
-rw-r--r--modules/arabic/mulefont.h23
-rw-r--r--modules/arabic/naqshfont.c374
-rw-r--r--modules/arabic/naqshfont.h27
-rw-r--r--modules/hangul/Makefile.am17
-rw-r--r--modules/hangul/hangul-x.c899
-rw-r--r--modules/hangul/tables-johabfont.i608
-rw-r--r--modules/hangul/tables-ksc5601.i361
-rw-r--r--modules/hebrew/Makefile.am17
-rw-r--r--modules/hebrew/hebrew-x.c446
-rw-r--r--modules/indic/Makefile.am63
-rw-r--r--modules/indic/bengali-x.c309
-rw-r--r--modules/indic/devanagari-x.c361
-rw-r--r--modules/indic/gujarati-x.c337
-rw-r--r--modules/indic/gurmukhi-x.c252
-rw-r--r--modules/indic/myanmar-x.c232
-rw-r--r--modules/tamil/Makefile.am41
-rw-r--r--modules/tamil/taconv.c590
-rw-r--r--modules/tamil/taconv.h55
-rw-r--r--modules/tamil/tadefs.h47
-rw-r--r--modules/tamil/tamil-x.c422
-rw-r--r--modules/thai/Makefile.am18
-rw-r--r--modules/thai/thai-x.c209
30 files changed, 0 insertions, 7502 deletions
diff --git a/modules/Makefile.am b/modules/Makefile.am
index d95dc284..b4954443 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -5,7 +5,6 @@ SUBDIRS = \
basic \
hangul \
indic \
- tamil \
thai \
hebrew
diff --git a/modules/arabic/Makefile.am b/modules/arabic/Makefile.am
index 25e93b4b..c6229ba4 100644
--- a/modules/arabic/Makefile.am
+++ b/modules/arabic/Makefile.am
@@ -22,33 +22,6 @@ no_undefined = -no-undefined
endif
-if HAVE_X
-INCLUDES += $(X_CFLAGS)
-if INCLUDE_ARABIC_X
-noinst_LTLIBRARIES += libpango-arabic-x.la
-else
-module_LTLIBRARIES += pango-arabic-x.la
-endif
-endif
-
-x_sources = \
- arabic-x.c \
- arconv.c \
- mulefont.c \
- mulefont.h \
- langboxfont.c \
- langboxfont.h \
- naqshfont.c \
- naqshfont.h \
- arconv.h
-
-pango_arabic_x_la_LDFLAGS = -export-dynamic -avoid-version -module
-pango_arabic_x_la_LIBADD = $(pangoxlibs)
-pango_arabic_x_la_SOURCES = $(x_sources)
-libpango_arabic_x_la_SOURCES = $(x_sources)
-libpango_arabic_x_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_arabic_x
-
-
if HAVE_XFT
INCLUDES += $(XFT_CFLAGS)
if INCLUDE_ARABIC_XFT
diff --git a/modules/arabic/arabic-x.c b/modules/arabic/arabic-x.c
deleted file mode 100644
index 3c3b9689..00000000
--- a/modules/arabic/arabic-x.c
+++ /dev/null
@@ -1,354 +0,0 @@
-/* Pango - Arabic module
- * arabic module
- *
- * (C) 2000 Karl Koehler<koehler@or.uni-bonn.de>
- * Owen Taylor <otaylor@redhat.com>
- *
- */
-
-#include <stdio.h>
-#include <glib.h>
-#include <string.h>
-#include "pango-engine.h"
-#include "pangox.h"
-
-#include "arconv.h"
-#include "mulefont.h"
-#include "langboxfont.h"
-#include "naqshfont.h"
-
-/* #define DEBUG */
-#ifdef DEBUG
-#include <stdio.h>
-#endif
-
-#define SCRIPT_ENGINE_NAME "ArabicScriptEngineX"
-
-static PangoEngineRange arabic_range[] = {
- { 0x060B, 0x06D3, "*" } /* 0x060B, 0x06D3 */
-};
-
-static PangoEngineInfo script_engines[] = {
- {
- SCRIPT_ENGINE_NAME,
- PANGO_ENGINE_TYPE_SHAPE,
- PANGO_RENDER_TYPE_X,
- arabic_range, G_N_ELEMENTS(arabic_range)
- }
-};
-
-static gint n_script_engines = G_N_ELEMENTS (script_engines);
-
-/*
- * X window system script engine portion
- */
-
-static ArabicFontInfo*
-arabic_unicodeinit(PangoFont *font, PangoXSubfont subfont)
-{
- ArabicFontInfo *fs = NULL;
-
- if (subfont != 0)
- {
- if ( pango_x_has_glyph /* Alif-Madda */
- (font,PANGO_X_MAKE_GLYPH(subfont,0xFE81)))
- {
- fs = g_new (ArabicFontInfo,1);
- fs->level = ar_standard | ar_unifont;
- fs->subfonts[0] = subfont;
-
- if ( pango_x_has_glyph /* Shadda+Kasra */
- (font,PANGO_X_MAKE_GLYPH(subfont,0xFC62)))
- {
- fs->level |= ar_composedtashkeel;
- /* extra vowels in font, hopefully */
- }
- if ( pango_x_has_glyph /* Lam-Min alone */
- (font,PANGO_X_MAKE_GLYPH(subfont,0xFC42)))
- {
- fs->level |= ar_lig;
- /* extra ligatures in font, hopefully */
- }
- }
- }
- return fs;
-}
-
-static ArabicFontInfo*
-find_unic_font (PangoFont *font)
-{
- static char *charsets[] = {
- "iso10646-1",
- "iso8859-6.8x",
- "mulearabic-2",
- "urdunaqsh-0",
-/* "symbol-0" */
- };
-
- ArabicFontInfo *fs = NULL;
- PangoXSubfont *subfonts;
- int *subfont_charsets;
- int n_subfonts;
- int i;
-
- GQuark info_id = g_quark_from_string ("arabic-font-info");
- fs = g_object_get_qdata (G_OBJECT (font), info_id);
- if (fs) return fs;
-
- n_subfonts = pango_x_list_subfonts (font, charsets, 4,
- &subfonts, &subfont_charsets);
-
- for (i=0; i < n_subfonts; i++)
- {
- if ( !strcmp (charsets[subfont_charsets[i]], "mulearabic-2"))
- {
-#ifdef DEBUG
- if (getenv("PANGO_AR_NOMULEFONT") == NULL )
-#endif
- fs = arabic_muleinit(font);
- }
- else if ( !strcmp (charsets[subfont_charsets[i]], "iso8859-6.8x"))
- {
-#ifdef DEBUG
- if (getenv("PANGO_AR_NOLBOXFONT") == NULL )
-#endif
- fs = arabic_lboxinit(font);
- }
- else if ( !strcmp (charsets[subfont_charsets[i]], "urdunaqsh-0"))
- {
-#ifdef DEBUG
- if (getenv("PANGO_AR_NONQFONT") == NULL )
-#endif
- fs = urdu_naqshinit(font);
- }
- else
- {
-#ifdef DEBUG
- if (getenv("PANGO_AR_NOUNIFONT") == NULL )
-#endif
- fs = arabic_unicodeinit(font,subfonts[i]);
- }
- if (fs){
- g_object_set_qdata_full (G_OBJECT (font), info_id,
- fs, (GDestroyNotify)g_free);
- break;
- }
- }
-
- g_free (subfonts);
- g_free (subfont_charsets);
-
- return fs;
-}
-
-
-
-static void
-set_glyph (PangoGlyphString *glyphs,
- PangoFont *font, PangoXSubfont subfont,
- int i, int cluster_start, int glyph, int is_vowel)
-{
- PangoRectangle logical_rect;
-
- glyphs->glyphs[i].glyph = PANGO_X_MAKE_GLYPH (subfont, glyph);
-
- glyphs->glyphs[i].geometry.x_offset = 0;
- glyphs->glyphs[i].geometry.y_offset = 0;
-
- pango_font_get_glyph_extents (font, glyphs->glyphs[i].glyph, NULL, &logical_rect);
- glyphs->log_clusters[i] = cluster_start;
- if (is_vowel)
- {
- glyphs->glyphs[i].geometry.width = 0;
- }
- else
- {
- glyphs->glyphs[i].geometry.width = logical_rect.width;
- }
-}
-
-
-/* The following thing is actually critical ... */
-
-static void
-arabic_engine_shape (PangoFont *font,
- const char *text,
- int length,
- PangoAnalysis *analysis,
- PangoGlyphString *glyphs)
-{
- PangoXSubfont subfont;
- long n_chars;
- int i;
- ArabicFontInfo *fs;
- const char *p;
- const char *pold;
- gunichar *wc;
-
- g_return_if_fail (font != NULL);
- g_return_if_fail (text != NULL);
- g_return_if_fail (length >= 0);
- g_return_if_fail (analysis != NULL);
-
- /* We hope there is a suitible font installed ..
- */
-
- if (! (fs = find_unic_font (font)) )
- {
-
- PangoGlyph unknown_glyph = pango_x_get_unknown_glyph (font);
-
- n_chars = g_utf8_strlen(text,length);
- pango_glyph_string_set_size (glyphs, n_chars);
-
- p = text;
- for (i=0; i<n_chars; i++)
- {
- set_glyph (glyphs, font,
- PANGO_X_GLYPH_SUBFONT (unknown_glyph), i,
- p - text, PANGO_X_GLYPH_INDEX (unknown_glyph),0);
- p = g_utf8_next_char (p);
- }
- return;
- }
-
-
- p = text;
- if (analysis->level % 2 == 0)
- {
- wc = g_utf8_to_ucs4_fast (text,length,&n_chars);
- /* We were called on a LTR directional run (e.g. some numbers);
- fallback as simple as possible */
- pango_glyph_string_set_size (glyphs, n_chars);
-
- }
- else
- {
- wc = (gunichar *)g_malloc(sizeof(gunichar)* (length) ); /* length is succicient: all arabic chars use at
- least 2 bytes in utf-8 encoding */
- n_chars = length;
- arabic_reshape(&n_chars,text,wc,fs->level);
- pango_glyph_string_set_size (glyphs, n_chars);
- }
-
-
- p = text;
- pold = p;
- i = 0;
- subfont = fs->subfonts[0];
-
- while(i < n_chars)
- {
- if (wc[i] == 0)
- {
- p = g_utf8_next_char (p);
-#ifdef DEBUG
- fprintf(stderr,"NULL-character detected in generated string.!");
-#endif
- i++;
- }
- else
- {
- int cluster_start ;
- int is_vowel = arabic_isvowel(wc[i]);
- cluster_start = is_vowel ? pold - text : p - text;
-
- if ( fs->level & ar_mulefont )
- {
- arabic_mule_recode(&subfont,&(wc[i]),
- fs->subfonts);
- }
- else if ( fs->level & ar_lboxfont )
- {
- if (( i < n_chars-1 )&&(wc[i+1] == 0))
- {
- arabic_lbox_recode(&subfont,&(wc[i]),
- &(wc[i+1]),
- fs->subfonts);
- }
- else
- arabic_lbox_recode(&subfont,&(wc[i]),NULL,
- fs->subfonts);
- }
- else if ( fs->level & ar_naqshfont )
- {
- if (( i < n_chars-1 )&&(wc[i+1] == 0))
- {
- urdu_naqsh_recode(&subfont,&(wc[i]),
- &(wc[i+1]),
- fs->subfonts);
- }
- else
- urdu_naqsh_recode(&subfont,&(wc[i]),NULL,
- fs->subfonts);
- }
-
- set_glyph(glyphs, font, subfont, n_chars - i - 1,
- cluster_start, wc[i], is_vowel);
-
- pold = p;
- p = g_utf8_next_char (p);
- i++;
- }
- }
-
- g_free(wc);
-}
-
-
-static PangoCoverage *
-arabic_engine_get_coverage (PangoFont *font,
- PangoLanguage *lang)
-{
- gunichar i;
- PangoCoverage *result = pango_coverage_new ();
-
- for (i = 0x60B; i <= 0x66D; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_EXACT);
- for (i = 0x670; i <= 0x6D3; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_EXACT);
-
- return result;
-}
-
-static PangoEngine *
-arabic_engine_x_new ()
-{
- PangoEngineShape *result;
-
- result = g_new (PangoEngineShape, 1);
-
- result->engine.id = SCRIPT_ENGINE_NAME;
- 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;
-
- return (PangoEngine *)result;
-}
-
-
-
-
-
-void
-PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines,
- int *n_engines)
-{
- *engines = script_engines;
- *n_engines = n_script_engines;
-}
-
-PangoEngine *
-PANGO_MODULE_ENTRY(load) (const char *id)
-{
- if (!strcmp (id, SCRIPT_ENGINE_NAME))
- return arabic_engine_x_new ();
- else
- return NULL;
-}
-
-void
-PANGO_MODULE_ENTRY(unload) (PangoEngine *engine)
-{
-}
diff --git a/modules/arabic/arconv.c b/modules/arabic/arconv.c
deleted file mode 100644
index 6980bcf3..00000000
--- a/modules/arabic/arconv.c
+++ /dev/null
@@ -1,792 +0,0 @@
-/* This is part of Pango - Arabic shaping module
- *
- * (C) 2000 Karl Koehler <koehler@or.uni-bonn.de>
- * (C) 2001 Roozbeh Pournader <roozbeh@sharif.edu>
- *
- */
-
-#include "arconv.h"
-/* #define DEBUG */
-#ifdef DEBUG
-#include <stdio.h>
-#endif
-
-typedef struct
-{
- gunichar basechar;
- int count;
- gunichar charshape[4];
-}
-shapestruct;
-
-typedef struct
-{
- gunichar basechar;
- gunichar mark1; /* has to be initialized to zero */
- gunichar vowel;
- signed char lignum; /* is a ligature with lignum aditional characters */
- char numshapes;
-}
-charstruct;
-
-#define connects_to_left(a) ((a).numshapes > 2)
-
-/* The Unicode order is always 'isolated, final, initial, medial'. */
-
-/* *INDENT-OFF* */
-static shapestruct chartable[] = {
- {0x0621, 1, {0xFE80}}, /* HAMZA */
- {0x0622, 2, {0xFE81, 0xFE82}}, /* ALEF WITH MADDA ABOVE */
- {0x0623, 2, {0xFE83, 0xFE84}}, /* ALEF WITH HAMZA ABOVE */
- {0x0624, 2, {0xFE85, 0xFE86}}, /* WAW WITH HAMZA ABOVE */
- {0x0625, 2, {0xFE87, 0xFE88}}, /* ALEF WITH HAMZA BELOW */
- {0x0626, 4, {0xFE89, 0xFE8A, 0xFE8B, 0xFE8C}}, /* YEH WITH HAMZA ABOVE */
- {0x0627, 2, {0xFE8D, 0xFE8E}}, /* ALEF */
- {0x0628, 4, {0xFE8F, 0xFE90, 0xFE91, 0xFE92}}, /* BEH */
- {0x0629, 2, {0xFE93, 0xFE94}}, /* TEH MARBUTA */
- {0x062A, 4, {0xFE95, 0xFE96, 0xFE97, 0xFE98}}, /* TEH */
- {0x062B, 4, {0xFE99, 0xFE9A, 0xFE9B, 0xFE9C}}, /* THEH */
- {0x062C, 4, {0xFE9D, 0xFE9E, 0xFE9F, 0xFEA0}}, /* JEEM */
- {0x062D, 4, {0xFEA1, 0xFEA2, 0xFEA3, 0xFEA4}}, /* HAH */
- {0x062E, 4, {0xFEA5, 0xFEA6, 0xFEA7, 0xFEA8}}, /* KHAH */
- {0x062F, 2, {0xFEA9, 0xFEAA}}, /* DAL */
- {0x0630, 2, {0xFEAB, 0xFEAC}}, /* THAL */
- {0x0631, 2, {0xFEAD, 0xFEAE}}, /* REH */
- {0x0632, 2, {0xFEAF, 0xFEB0}}, /* ZAIN */
- {0x0633, 4, {0xFEB1, 0xFEB2, 0xFEB3, 0xFEB4}}, /* SEEN */
- {0x0634, 4, {0xFEB5, 0xFEB6, 0xFEB7, 0xFEB8}}, /* SHEEN */
- {0x0635, 4, {0xFEB9, 0xFEBA, 0xFEBB, 0xFEBC}}, /* SAD */
- {0x0636, 4, {0xFEBD, 0xFEBE, 0xFEBF, 0xFEC0}}, /* DAD */
- {0x0637, 4, {0xFEC1, 0xFEC2, 0xFEC3, 0xFEC4}}, /* TAH */
- {0x0638, 4, {0xFEC5, 0xFEC6, 0xFEC7, 0xFEC8}}, /* ZAH */
- {0x0639, 4, {0xFEC9, 0xFECA, 0xFECB, 0xFECC}}, /* AIN */
- {0x063A, 4, {0xFECD, 0xFECE, 0xFECF, 0xFED0}}, /* GHAIN */
- {0x0640, 4, {0x0640, 0x0640, 0x0640, 0x0640}}, /* TATWEEL */
- {0x0641, 4, {0xFED1, 0xFED2, 0xFED3, 0xFED4}}, /* FEH */
- {0x0642, 4, {0xFED5, 0xFED6, 0xFED7, 0xFED8}}, /* QAF */
- {0x0643, 4, {0xFED9, 0xFEDA, 0xFEDB, 0xFEDC}}, /* KAF */
- {0x0644, 4, {0xFEDD, 0xFEDE, 0xFEDF, 0xFEE0}}, /* LAM */
- {0x0645, 4, {0xFEE1, 0xFEE2, 0xFEE3, 0xFEE4}}, /* MEEM */
- {0x0646, 4, {0xFEE5, 0xFEE6, 0xFEE7, 0xFEE8}}, /* NOON */
- {0x0647, 4, {0xFEE9, 0xFEEA, 0xFEEB, 0xFEEC}}, /* HEH */
- {0x0648, 2, {0xFEED, 0xFEEE}}, /* WAW */
- {0x0649, 4, {0xFEEF, 0xFEF0, 0xFBE8, 0xFBE9}}, /* ALEF MAKSURA */
- {0x064A, 4, {0xFEF1, 0xFEF2, 0xFEF3, 0xFEF4}}, /* YEH */
- {0x0671, 2, {0xFB50, 0xFB51}}, /* ALEF WASLA */
- {0x0679, 4, {0xFB66, 0xFB67, 0xFB68, 0xFB69}}, /* TTEH */
- {0x067A, 4, {0xFB5E, 0xFB5F, 0xFB60, 0xFB61}}, /* TTEHEH */
- {0x067B, 4, {0xFB52, 0xFB53, 0xFB54, 0xFB55}}, /* BEEH */
- {0x067E, 4, {0xFB56, 0xFB57, 0xFB58, 0xFB59}}, /* PEH */
- {0x067F, 4, {0xFB62, 0xFB63, 0xFB64, 0xFB65}}, /* TEHEH */
- {0x0680, 4, {0xFB5A, 0xFB5B, 0xFB5C, 0xFB5D}}, /* BEHEH */
- {0x0683, 4, {0xFB76, 0xFB77, 0xFB78, 0xFB79}}, /* NYEH */
- {0x0684, 4, {0xFB72, 0xFB73, 0xFB74, 0xFB75}}, /* DYEH */
- {0x0686, 4, {0xFB7A, 0xFB7B, 0xFB7C, 0xFB7D}}, /* TCHEH */
- {0x0687, 4, {0xFB7E, 0xFB7F, 0xFB80, 0xFB81}}, /* TCHEHEH */
- {0x0688, 2, {0xFB88, 0xFB89}}, /* DDAL */
- {0x068C, 2, {0xFB84, 0xFB85}}, /* DAHAL */
- {0x068D, 2, {0xFB82, 0xFB83}}, /* DDAHAL */
- {0x068E, 2, {0xFB86, 0xFB87}}, /* DUL */
- {0x0691, 2, {0xFB8C, 0xFB8D}}, /* RREH */
- {0x0698, 2, {0xFB8A, 0xFB8B}}, /* JEH */
- {0x06A4, 4, {0xFB6A, 0xFB6B, 0xFB6C, 0xFB6D}}, /* VEH */
- {0x06A6, 4, {0xFB6E, 0xFB6F, 0xFB70, 0xFB71}}, /* PEHEH */
- {0x06A9, 4, {0xFB8E, 0xFB8F, 0xFB90, 0xFB91}}, /* KEHEH */
- {0x06AD, 4, {0xFBD3, 0xFBD4, 0xFBD5, 0xFBD6}}, /* NG */
- {0x06AF, 4, {0xFB92, 0xFB93, 0xFB94, 0xFB95}}, /* GAF */
- {0x06B1, 4, {0xFB9A, 0xFB9B, 0xFB9C, 0xFB9D}}, /* NGOEH */
- {0x06B3, 4, {0xFB96, 0xFB97, 0xFB98, 0xFB99}}, /* GUEH */
- {0x06BB, 4, {0xFBA0, 0xFBA1, 0xFBA2, 0xFBA3}}, /* RNOON */
- {0x06BE, 4, {0xFBAA, 0xFBAB, 0xFBAC, 0xFBAD}}, /* HEH DOACHASHMEE */
- {0x06C0, 2, {0xFBA4, 0xFBA5}}, /* HEH WITH YEH ABOVE */
- {0x06C1, 4, {0xFBA6, 0xFBA7, 0xFBA8, 0xFBA9}}, /* HEH GOAL */
- {0x06C5, 2, {0xFBE0, 0xFBE1}}, /* KIRGHIZ OE */
- {0x06C6, 2, {0xFBD9, 0xFBDA}}, /* OE */
- {0x06C7, 2, {0xFBD7, 0xFBD8}}, /* U */
- {0x06C8, 2, {0xFBDB, 0xFBDC}}, /* YU */
- {0x06C9, 2, {0xFBE2, 0xFBE3}}, /* KIRGHIZ YU */
- {0x06CB, 2, {0xFBDE, 0xFBDF}}, /* VE */
- {0x06CC, 4, {0xFBFC, 0xFBFD, 0xFBFE, 0xFBFF}}, /* FARSI YEH */
- {0x06D0, 4, {0xFBE4, 0xFBE5, 0xFBE6, 0xFBE7}}, /* E */
- {0x06D2, 2, {0xFBAE, 0xFBAF}}, /* YEH BARREE */
- {0x06D3, 2, {0xFBB0, 0xFBB1}}, /* YEH BARREE WITH HAMZA ABOVE */
-};
-/* *INDENT-ON* */
-
-static gunichar unshapetableFB[] = {
- 0x0671, 0x0671, 0x067B, 0x067B, 0x067B, 0x067B, 0x067E, 0x067E,
- 0x067E, 0x067E, 0x0680, 0x0680, 0x0680, 0x0680, 0x067A, 0x067A,
- 0x067A, 0x067A, 0x067F, 0x067F, 0x067F, 0x067F, 0x0679, 0x0679,
- 0x0679, 0x0679, 0x06A4, 0x06A4, 0x06A4, 0x06A4, 0x06A6, 0x06A6,
- 0x06A6, 0x06A6, 0x0684, 0x0684, 0x0684, 0x0684, 0x0683, 0x0683,
- 0x0683, 0x0683, 0x0686, 0x0686, 0x0686, 0x0686, 0x0687, 0x0687,
- 0x0687, 0x0687, 0x068D, 0x068D, 0x068C, 0x068C, 0x068E, 0x068E,
- 0x0688, 0x0688, 0x0698, 0x0698, 0x0691, 0x0691, 0x06A9, 0x06A9,
- 0x06A9, 0x06A9, 0x06AF, 0x06AF, 0x06AF, 0x06AF, 0x06B3, 0x06B3,
- 0x06B3, 0x06B3, 0x06B1, 0x06B1, 0x06B1, 0x06B1, 0x0000, 0x0000,
- 0x06BB, 0x06BB, 0x06BB, 0x06BB, 0x06C0, 0x06C0, 0x06C1, 0x06C1,
- 0x06C1, 0x06C1, 0x06BE, 0x06BE, 0x06BE, 0x06BE, 0x06D2, 0x06D2,
- 0x06D3, 0x06D3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x06AD, 0x06AD, 0x06AD, 0x06AD, 0x06C7,
- 0x06C7, 0x06C6, 0x06C6, 0x06C8, 0x06C8, 0x0000, 0x06CB, 0x06CB,
- 0x06C5, 0x06C5, 0x06C9, 0x06C9, 0x06D0, 0x06D0, 0x06D0, 0x06D0,
- 0x0649, 0x0649, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x06CC, 0x06CC, 0x06CC, 0x06CC
-};
-
-static gunichar unshapetableFE[] = {
- 0x0621, 0x0622, 0x0622, 0x0623, 0x0623, 0x0624, 0x0624, 0x0625,
- 0x0625, 0x0626, 0x0626, 0x0626, 0x0626, 0x0627, 0x0627, 0x0628,
- 0x0628, 0x0628, 0x0628, 0x0629, 0x0629, 0x062A, 0x062A, 0x062A,
- 0x062A, 0x062B, 0x062B, 0x062B, 0x062B, 0x062C, 0x062C, 0x062C,
- 0x062C, 0x062D, 0x062D, 0x062D, 0x062D, 0x062E, 0x062E, 0x062E,
- 0x062E, 0x062F, 0x062F, 0x0630, 0x0630, 0x0631, 0x0631, 0x0632,
- 0x0632, 0x0633, 0x0633, 0x0633, 0x0633, 0x0634, 0x0634, 0x0634,
- 0x0634, 0x0635, 0x0635, 0x0635, 0x0635, 0x0636, 0x0636, 0x0636,
- 0x0636, 0x0637, 0x0637, 0x0637, 0x0637, 0x0638, 0x0638, 0x0638,
- 0x0638, 0x0639, 0x0639, 0x0639, 0x0639, 0x063A, 0x063A, 0x063A,
- 0x063A, 0x0641, 0x0641, 0x0641, 0x0641, 0x0642, 0x0642, 0x0642,
- 0x0642, 0x0643, 0x0643, 0x0643, 0x0643, 0x0644, 0x0644, 0x0644,
- 0x0644, 0x0645, 0x0645, 0x0645, 0x0645, 0x0646, 0x0646, 0x0646,
- 0x0646, 0x0647, 0x0647, 0x0647, 0x0647, 0x0648, 0x0648, 0x0649,
- 0x0649, 0x064A, 0x064A, 0x064A, 0x064A
-};
-
-#define ALEF 0x0627
-#define ALEFHAMZA 0x0623
-#define ALEFHAMZABELOW 0x0625
-#define ALEFMADDA 0x0622
-#define LAM 0x0644
-#define HAMZA 0x0621
-#define TATWEEL 0x0640
-#define ZWJ 0x200D
-
-#define HAMZAABOVE 0x0654
-#define HAMZABELOW 0x0655
-
-#define WAWHAMZA 0x0624
-#define YEHHAMZA 0x0626
-#define WAW 0x0648
-#define ALEFMAKSURA 0x0649
-#define YEH 0x064A
-#define FARSIYEH 0x06CC
-
-#define SHADDA 0x0651
-#define KASRA 0x0650
-#define FATHA 0x064E
-#define DAMMA 0x064F
-#define MADDA 0x0653
-
-#define LAM_ALEF 0xFEFB
-#define LAM_ALEFHAMZA 0xFEF7
-#define LAM_ALEFHAMZABELOW 0xFEF9
-#define LAM_ALEFMADDA 0xFEF5
-
-static void
-charstruct_init (charstruct * s)
-{
- s->basechar = 0;
- s->mark1 = 0;
- s->vowel = 0;
- s->lignum = 0;
- s->numshapes = 1;
-}
-
-static void
-copycstostring (gunichar * string, int *i, charstruct * s, arabic_level level)
-/* s is a shaped charstruct; i is the index into the string */
-{
- if (s->basechar == 0)
- return;
-
- string[*i] = s->basechar;
- (*i)++;
- (s->lignum)--;
- if (s->mark1 != 0)
- {
- if (!(level & ar_novowel))
- {
- string[*i] = s->mark1;
- (*i)++;
- (s->lignum)--;
- }
- else
- {
- (s->lignum)--;
- }
- }
- if (s->vowel != 0)
- {
- if (!(level & ar_novowel))
- {
- string[*i] = s->vowel;
- (*i)++;
- (s->lignum)--;
- }
- else
- { /* vowel elimination */
- (s->lignum)--;
- }
- }
- while (s->lignum > 0)
- { /* NULL-insertion for Langbox-font */
- string[*i] = 0;
- (*i)++;
- (s->lignum)--;
- }
-}
-
-int
-arabic_isvowel (gunichar s)
-/* is this a combining mark? */
-{
- if (((s >= 0x064B) && (s <= 0x0655)) || (s == 0x0670))
- {
- return 1;
- }
- else
- {
- return 0;
- }
-}
-
-static gunichar
-unshape (gunichar s)
-{
- gunichar r;
-
- if ((s >= 0xFE80) && (s <= 0xFEF4)) /* Arabic Presentation Forms-B */
- {
- return unshapetableFE[s - 0xFE80];
- }
- else if ((s >= 0xFEF5) && (s <= 0xFEFC)) /* Lam+Alef ligatures */
- {
- return ((s % 2) ? s : (s - 1));
- }
- else if ((s >= 0xFB50) && (s <= 0xFBFF)) /* Arabic Presentation Forms-A */
- {
- return ((r = unshapetableFB[s - 0xFB50]) ? r : s);
- }
- else
- {
- return s;
- }
-}
-
-static gunichar
-charshape (gunichar s, short which)
-/* which 0=isolated 1=final 2=initial 3=medial */
-{
- int l, r, m;
- if ((s >= 0x0621) && (s <= 0x06D3))
- {
- l = 0;
- r = sizeof (chartable) / sizeof (shapestruct);
- while (l <= r)
- {
- m = (l + r) / 2;
- if (s == chartable[m].basechar)
- {
- return chartable[m].charshape[which];
- }
- else if (s < chartable[m].basechar)
- {
- r = m - 1;
- }
- else
- {
- l = m + 1;
- }
- }
- }
- else if ((s >= 0xFEF5) && (s <= 0xFEFB))
- { /* Lam+Alef */
- return s + which;
- }
-
- return s;
-}
-
-
-static short
-shapecount (gunichar s)
-{
- int l, r, m;
- if ((s >= 0x0621) && (s <= 0x06D3) && !arabic_isvowel (s))
- {
- l = 0;
- r = sizeof (chartable) / sizeof (shapestruct);
- while (l <= r)
- {
- m = (l + r) / 2;
- if (s == chartable[m].basechar)
- {
- return chartable[m].count;
- }
- else if (s < chartable[m].basechar)
- {
- r = m - 1;
- }
- else
- {
- l = m + 1;
- }
- }
- }
- else if (s == ZWJ)
- {
- return 4;
- }
- return 1;
-}
-
-static int
-unligature (charstruct * curchar, arabic_level level)
-{
- int result = 0;
- if (level & ar_naqshfont)
- {
- /* decompose Alef Madda ... */
- switch (curchar->basechar)
- {
- case ALEFHAMZA:
- curchar->basechar = ALEF;
- curchar->mark1 = HAMZAABOVE;
- result++;
- break;
- case ALEFHAMZABELOW:
- curchar->basechar = ALEF;
- curchar->mark1 = HAMZABELOW;
- result++;
- break;
- case WAWHAMZA:
- curchar->basechar = WAW;
- curchar->mark1 = HAMZAABOVE;
- result++;
- break;
- case ALEFMADDA:
- curchar->basechar = ALEF;
- curchar->vowel = MADDA;
- result++;
- break;
- }
- }
- return result;
-}
-
-static int
-ligature (gunichar newchar, charstruct * oldchar)
-/* 0 == no ligature possible; 1 == vowel; 2 == two chars; 3 == Lam+Alef */
-{
- int retval = 0;
-
- if (!(oldchar->basechar))
- return 0;
- if (arabic_isvowel (newchar))
- {
- retval = 1;
- if ((oldchar->vowel != 0) && (newchar != SHADDA))
- {
- retval = 2; /* we eliminate the old vowel .. */
- }
- switch (newchar)
- {
- case SHADDA:
- if (oldchar->mark1 == 0)
- {
- oldchar->mark1 = SHADDA;
- }
- else
- {
- return 0; /* no ligature possible */
- }
- break;
- case HAMZABELOW:
- switch (oldchar->basechar)
- {
- case ALEF:
- oldchar->basechar = ALEFHAMZABELOW;
- retval = 2;
- break;
- case LAM_ALEF:
- oldchar->basechar = LAM_ALEFHAMZABELOW;
- retval = 2;
- break;
- default:
- oldchar->mark1 = HAMZABELOW;
- break;
- }
- break;
- case HAMZAABOVE:
- switch (oldchar->basechar)
- {
- case ALEF:
- oldchar->basechar = ALEFHAMZA;
- retval = 2;
- break;
- case LAM_ALEF:
- oldchar->basechar = LAM_ALEFHAMZA;
- retval = 2;
- break;
- case WAW:
- oldchar->basechar = WAWHAMZA;
- retval = 2;
- break;
- case YEH:
- case ALEFMAKSURA:
- case FARSIYEH:
- oldchar->basechar = YEHHAMZA;
- retval = 2;
- break;
- default: /* whatever sense this may make .. */
- oldchar->mark1 = HAMZAABOVE;
- break;
- }
- break;
- case MADDA:
- switch (oldchar->basechar)
- {
- case ALEF:
- oldchar->basechar = ALEFMADDA;
- retval = 2;
- break;
- }
- break;
- default:
- oldchar->vowel = newchar;
- break;
- }
- if (retval == 1)
- {
- oldchar->lignum++;
- }
- return retval;
- }
- if (oldchar->vowel != 0)
- { /* if we already joined a vowel, we can't join a Hamza */
- return 0;
- }
-
- switch (oldchar->basechar)
- {
- case LAM:
- switch (newchar)
- {
- case ALEF:
- oldchar->basechar = LAM_ALEF;
- oldchar->numshapes = 2;
- retval = 3;
- break;
- case ALEFHAMZA:
- oldchar->basechar = LAM_ALEFHAMZA;
- oldchar->numshapes = 2;
- retval = 3;
- break;
- case ALEFHAMZABELOW:
- oldchar->basechar = LAM_ALEFHAMZABELOW;
- oldchar->numshapes = 2;
- retval = 3;
- break;
- case ALEFMADDA:
- oldchar->basechar = LAM_ALEFMADDA;
- oldchar->numshapes = 2;
- retval = 3;
- break;
- }
- break;
- case 0:
- oldchar->basechar = newchar;
- oldchar->numshapes = shapecount (newchar);
- retval = 1;
- break;
- }
- return retval;
-}
-
-static void
-shape (long *len, const char *text, gunichar * string, arabic_level level)
-{
- /* string is assumed to be empty and big enough.
- * text is the original text.
- * This routine does the basic arabic reshaping.
- * *len the number of non-null characters.
- *
- * Note: We have to unshape each character first!
- */
- int olen = *len;
- charstruct oldchar, curchar;
- int j = 0;
- int join;
- int which;
- gunichar nextletter;
- const char *p = text;
-
- *len = 0; /* initialize for output */
- charstruct_init (&oldchar);
- charstruct_init (&curchar);
- while (p < text + olen)
- {
- nextletter = g_utf8_get_char (p);
- nextletter = unshape (nextletter);
-
- join = ligature (nextletter, &curchar);
- if (!join)
- { /* shape curchar */
- int nc = shapecount (nextletter);
- (*len)++;
- if (nc == 1)
- {
- which = 0; /* final or isolated */
- }
- else
- {
- which = 2; /* medial or initial */
- }
- if (connects_to_left (oldchar))
- {
- which++;
- }
-
- which = which % (curchar.numshapes);
- curchar.basechar = charshape (curchar.basechar, which);
-
- /* get rid of oldchar */
- copycstostring (string, &j, &oldchar, level);
- oldchar = curchar; /* new values in oldchar */
-
- /* init new curchar */
- charstruct_init (&curchar);
- curchar.basechar = nextletter;
- curchar.numshapes = nc;
- curchar.lignum++;
- (*len) += unligature (&curchar, level);
- }
- else if ((join == 3) && (level & ar_lboxfont))
- { /* Lam+Alef extra in langbox-font */
- (*len)++;
- curchar.lignum++;
- }
- else if (join == 1)
- {
- (*len)++;
- }
- else
- {
- (*len) += unligature (&curchar, level);
- }
- p = g_utf8_next_char (p);
- }
-
- /* Handle last char */
- if (connects_to_left (oldchar))
- which = 1;
- else
- which = 0;
- which = which % (curchar.numshapes);
- curchar.basechar = charshape (curchar.basechar, which);
-
- /* get rid of oldchar */
- copycstostring (string, &j, &oldchar, level);
- copycstostring (string, &j, &curchar, level);
-#ifdef DEBUG
- fprintf (stderr, "[ar] shape statistic: %i chars -> %i glyphs \n",
- olen, *len);
-#endif
-}
-
-static void
-doublelig (long *len, gunichar * string, arabic_level level)
-/* Ok. We have presentation ligatures in our font. */
-{
- int olen = *len;
- int j = 0, si = 1;
- gunichar lapresult;
-
- while (si < olen)
- {
- lapresult = 0;
- if (level & ar_composedtashkeel)
- {
- switch (string[j])
- {
- case SHADDA:
- switch (string[si])
- {
- case KASRA:
- lapresult = 0xFC62;
- break;
- case FATHA:
- lapresult = 0xFC60;
- break;
- case DAMMA:
- lapresult = 0xFC61;
- break;
- case 0x064C:
- lapresult = 0xFC5E;
- break;
- case 0x064D:
- lapresult = 0xFC5F;
- break;
- }
- break;
- case KASRA:
- if (string[si] == SHADDA)
- lapresult = 0xFC62;
- break;
- case FATHA:
- if (string[si] == SHADDA)
- lapresult = 0xFC60;
- break;
- case DAMMA:
- if (string[si] == SHADDA)
- lapresult = 0xFC61;
- break;
- }
- }
-
- if (level & ar_lig)
- {
- switch (string[j])
- {
- case 0xFEDF: /* LAM initial */
- switch (string[si])
- {
- case 0xFE9E:
- lapresult = 0xFC3F;
- break; /* JEEM final */
- case 0xFEA0:
- lapresult = 0xFCC9;
- break; /* JEEM medial */
- case 0xFEA2:
- lapresult = 0xFC40;
- break; /* HAH final */
- case 0xFEA4:
- lapresult = 0xFCCA;
- break; /* HAH medial */
- case 0xFEA6:
- lapresult = 0xFC41;
- break; /* KHAH final */
- case 0xFEA8:
- lapresult = 0xFCCB;
- break; /* KHAH medial */
- case 0xFEE2:
- lapresult = 0xFC42;
- break; /* MEEM final */
- case 0xFEE4:
- lapresult = 0xFCCC;
- break; /* MEEM medial */
- }
- break;
- case 0xFE97: /* TEH inital */
- switch (string[si])
- {
- case 0xFEA0:
- lapresult = 0xFCA1;
- break; /* JEEM medial */
- case 0xFEA4:
- lapresult = 0xFCA2;
- break; /* HAH medial */
- case 0xFEA8:
- lapresult = 0xFCA3;
- break; /* KHAH medial */
- }
- break;
- case 0xFE91: /* BEH inital */
- switch (string[si])
- {
- case 0xFEA0:
- lapresult = 0xFC9C;
- break; /* JEEM medial */
- case 0xFEA4:
- lapresult = 0xFC9D;
- break; /* HAH medial */
- case 0xFEA8:
- lapresult = 0xFC9E;
- break; /* KHAH medial */
- }
- break;
- case 0xFEE7: /* NOON inital */
- switch (string[si])
- {
- case 0xFEA0:
- lapresult = 0xFCD2;
- break; /* JEEM initial */
- case 0xFEA4:
- lapresult = 0xFCD3;
- break; /* HAH medial */
- case 0xFEA8:
- lapresult = 0xFCD4;
- break; /* KHAH medial */
- }
- break;
-
- case 0xFEE8: /* NOON medial */
- switch (string[si])
- {
- case 0xFEAE:
- lapresult = 0xFC8A;
- break; /* REH final */
- case 0xFEB0:
- lapresult = 0xFC8B;
- break; /* ZAIN final */
- }
- break;
- case 0xFEE3: /* MEEM initial */
- switch (string[si])
- {
- case 0xFEA0:
- lapresult = 0xFCCE;
- break; /* JEEM medial */
- case 0xFEA4:
- lapresult = 0xFCCF;
- break; /* HAH medial */
- case 0xFEA8:
- lapresult = 0xFCD0;
- break; /* KHAH medial */
- case 0xFEE4:
- lapresult = 0xFCD1;
- break; /* MEEM medial */
- }
- break;
-
- case 0xFED3: /* FEH initial */
- switch (string[si])
- {
- case 0xFEF2:
- lapresult = 0xFC32;
- break; /* YEH final */
- }
- break;
-
- default:
- break;
- } /* end switch string[si] */
- }
- if (lapresult != 0)
- {
- string[j] = lapresult;
- (*len)--;
- si++; /* jump over one character */
- /* we'll have to change this, too. */
- }
- else
- {
- j++;
- string[j] = string[si];
- si++;
- }
- }
-}
-
-void
-arabic_reshape (long *len, const char *text, gunichar * string,
- arabic_level level)
-{
- shape (len, text, string, level);
- if (level & (ar_composedtashkeel | ar_lig))
- doublelig (len, string, level);
-}
diff --git a/modules/arabic/arconv.h b/modules/arabic/arconv.h
deleted file mode 100644
index 1c7441d9..00000000
--- a/modules/arabic/arconv.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* pango-arabic module
- *
- * (C) 2000 K. Koehler <koehler@or.uni-bonn.de>
- *
- * general functions for arabic shaping
- */
-
-#ifndef __arconv_h_
-#define __arconv_h_
-
-#include <glib.h>
-#include "pangox.h"
-
-/*
- * arabic_reshape: reshapes string ( ordered left-to right visual order )
- * len : before: is the length of the string
- * after : number of non-NULL characters
- *
- */
-typedef enum
-{
- ar_nothing = 0x0, ar_novowel = 0x1,
- ar_standard = 0x2, ar_composedtashkeel = 0x4,
- ar_lig = 0x8,
- ar_mulefont = 0x10, ar_lboxfont = 0x20,
- ar_unifont = 0x40, ar_naqshfont = 0x80
-} arabic_level;
-
-typedef struct
-{
- PangoXSubfont subfonts[3];
- arabic_level level;
-} ArabicFontInfo;
-
-/* len : beforehand: #chars in string
- * after: #chars in text
- * string: original-string
- * text : output-text
- */
-void arabic_reshape(long* len,const char* text,gunichar* string,arabic_level level);
-int arabic_isvowel(gunichar s);
-
-#endif
diff --git a/modules/arabic/langboxfont.c b/modules/arabic/langboxfont.c
deleted file mode 100644
index f439e82e..00000000
--- a/modules/arabic/langboxfont.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/* pango-arabic module
- *
- * (C) 2000 K. Koehler <koehler@or.uni-bonn.de>
- *
- * This file provides a mapping unicode <- langboxfont
- */
-
-
-#include <stdio.h>
-#include <glib.h>
-#include "pangox.h"
-
-/* #define DEBUG */
-#ifdef DEBUG
-#include <stdio.h>
-#endif
-#include "langboxfont.h"
-
-
-ArabicFontInfo*
-arabic_lboxinit(PangoFont *font)
-{
- static char *lbox_charsets0[] = {
- "iso8859-6.8x",
- };
-
- ArabicFontInfo *fs = NULL;
- PangoXSubfont *subfonts;
- int *subfont_charsets;
- int n_subfonts;
-
- n_subfonts = pango_x_list_subfonts (font,lbox_charsets0,
- 1, &subfonts, &subfont_charsets);
- if (n_subfonts > 0)
- {
- fs = g_new (ArabicFontInfo,1);
- fs->level = ar_standard | ar_composedtashkeel | ar_lboxfont;
- fs->subfonts[0] = subfonts[0];
- }
-
- g_free (subfonts);
- g_free (subfont_charsets);
- return fs;
-}
-
-
-typedef struct {
- gunichar unicodechar;
- int charindex;
-} fontentry;
-
-
-static fontentry charmap [] =
-{
- { 0xFE80,0xC1 }, /* HAMZA; handle seperately !!! */
- { 0xFE81,0xC2 }, /* ALIF MADDA */
- { 0xFE82,0xC2 },
- { 0xFE83,0xC3 }, /* ALIF HAMZA */
- { 0xFE84,0xC3 },
- { 0xFE85,0xC4 }, /* WAW HAMZA */
- { 0xFE86,0xC4 },
- { 0xFE87,0xC5 }, /* ALIF IHAMZA */
- { 0xFE88,0xC5 },
- { 0xFE89,0x9F }, /* YA HAMZA */
- { 0xFE8A,0xC6 },
- { 0xFE8B,0xC0 }, /* HMAZA-'pod' */
- { 0xFE8C,0xC0 },
- { 0xFE8D,0xC7 }, /* ALIF */
- { 0xFE8E,0xC7 },
- { 0xFE8F,0xC8 }, /* BA */
- { 0xFE90,0xC8 },
- { 0xFE91,0xEB },
- { 0xFE92,0xEB },
- { 0xFE93,0xC9 }, /* TA MARBUTA */
- { 0xFE94,0x8E },
- { 0xFE95,0xCA }, /* TA */
- { 0xFE96,0xCA },
- { 0xFE97,0xEC },
- { 0xFE98,0xEC },
- { 0xFE99,0xCB }, /* THA */
- { 0xFE9A,0xCB },
- { 0xFE9B,0xED },
- { 0xFE9C,0xED },
- { 0xFE9D,0xCC }, /* DJIM */
- { 0xFE9E,0xCC },
- { 0xFE9F,0xEE },
- { 0xFEA0,0xEE },
- { 0xFEA1,0xCD }, /* .HA */
- { 0xFEA2,0xCD },
- { 0xFEA3,0xEF },
- { 0xFEA4,0xEF },
- { 0xFEA5,0xCE }, /* CHA */
- { 0xFEA6,0xCE },
- { 0xFEA7,0xF0 },
- { 0xFEA8,0xF0 },
- { 0xFEA9,0xCF }, /* DAL */
- { 0xFEAA,0xCF },
- { 0xFEAB,0xD0 }, /* THAL */
- { 0xFEAC,0xD0 },
- { 0xFEAD,0xD1 }, /* RA */
- { 0xFEAE,0xD1 },
- { 0xFEAF,0xD2 }, /* ZAY */
- { 0xFEB0,0xD2 },
- { 0xFEB1,0xD3 }, /* SIN */
- { 0xFEB2,0x8F },
- { 0xFEB3,0xF1 },
- { 0xFEB4,0xF1 },
- { 0xFEB5,0xD4 }, /* SHIN */
- { 0xFEB2,0x90 },
- { 0xFEB3,0xF2 },
- { 0xFEB4,0xF2 },
- { 0xFEB9,0xD5 }, /* SAAD */
- { 0xFEBA,0x91 },
- { 0xFEBB,0xF3 },
- { 0xFEBC,0xF3 },
- { 0xFEBD,0xD6 }, /* DAAD */
- { 0xFEBE,0x92 },
- { 0xFEBF,0xF4 },
- { 0xFEC0,0xF4 },
- { 0xFEC1,0xD7 }, /* .TA */
- { 0xFEC2,0xD7 },
- { 0xFEC3,0x93 },
- { 0xFEC4,0x93 },
- { 0xFEC5,0xD8 }, /* .ZA */
- { 0xFEC6,0xD8 },
- { 0xFEC7,0x94 },
- { 0xFEC8,0x94 },
- { 0xFEC9,0xD9 }, /* AIN */
- { 0xFECA,0x96 },
- { 0xFECB,0xF5 },
- { 0xFECC,0x95 },
- { 0xFECD,0xDA }, /* RAIN */
- { 0xFECE,0x98 },
- { 0xFECF,0xF6 },
- { 0xFED0,0x97 },
- { 0xFED1,0xE1 }, /* FA */
- { 0xFED2,0xE1 },
- { 0xFED3,0xF7 },
- { 0xFED4,0x99 },
- { 0xFED5,0xE2 }, /* QAF */
- { 0xFED6,0xE2 },
- { 0xFED7,0xF8 },
- { 0xFEB8,0x9A },
- { 0xFED9,0xE3 }, /* KAF */
- { 0xFEDA,0xE3 },
- { 0xFEDB,0xF9 },
- { 0xFEDC,0x9B },
- { 0xFEDD,0xE4 }, /* LAM */
- { 0xFEDE,0xE4 },
- { 0xFEDF,0xFA },
- { 0xFEE0,0xFA },
- { 0xFEE1,0xE5 }, /* MIM */
- { 0xFEE2,0xE5 },
- { 0xFEE3,0xFB },
- { 0xFEE4,0xFB },
- { 0xFEE5,0xE6 }, /* NUN */
- { 0xFEE6,0xE6 },
- { 0xFEE7,0xFC },
- { 0xFEE8,0xFC },
- { 0xFEE9,0xE7 }, /* HA */
- { 0xFEEA,0x9D },
- { 0xFEEB,0xFD },
- { 0xFEEC,0x9C },
- { 0xFEED,0xE8 }, /* WAW */
- { 0xFEEE,0xE8 },
- { 0xFEEF,0x8D }, /* ALIF MAQSORA */
- { 0xFEF0,0xE9 },
- { 0xFEF1,0x9E }, /* YA */
- { 0xFEF2,0xEA },
- { 0xFEF3,0xFE },
- { 0xFEF4,0xFE }
-};
-
-void
-arabic_lbox_recode(PangoXSubfont* subfont,gunichar* glyph,gunichar* glyph2,
- PangoXSubfont* lboxfonts)
-{
- int letter=*glyph;
-
- *subfont = lboxfonts[0];
- if ((letter >= 0x660)&&(letter <= 0x669)) /* indic numeral */
- {
- *glyph = letter - 0x660 + 0xB0;
- }
- else if ((letter >= 0xFE80)&&(letter <= 0xFEF4))
- {
- *glyph = charmap[letter-0xFE80].charindex;
- }
- else if ((letter >= 0x64B)&&(letter <= 0x652))
- { /* a vowel */
- *glyph = letter - 0x64B + 0xA8;
- }
- else if ((letter >= 0xFEF5)&&(letter <= 0xFEFC)&&(glyph2)&&(*glyph2==0))
- { /* Lam-Alif. Langbox solved the problem in their own way ... */
- if (!(letter % 2))
- {
- *glyph = 0xA6;
- }
- else
- {
- *glyph = 0xA5;
- }
- switch (letter)
- {
- case 0xFEF5 :
- case 0xFEF6 : *glyph2 = 0xA2; break; /* Lam-Alif Madda */
- case 0xFEF7 :
- case 0xFEF8 : *glyph2 = 0xA3; break; /* Lam-Alif Hamza */
- case 0xFEF9 :
- case 0xFEFA : *glyph2 = 0xA4; break; /* Lam-Alif iHamza */
- case 0xFEFB :
- case 0xFEFC : *glyph2 = 0xA1; break; /* Lam-Alif */
- }
- }
- else if (letter < 0xB0 )
- {
- *glyph = letter;
- }
- else switch(letter)
- {
- /* extra vowels */
- case 0xFC5E: *glyph = 0x82; break;
- case 0xFC5F: *glyph = 0x83; break;
- case 0xFC60: *glyph = 0x84; break;
- case 0xFC61: *glyph = 0x85; break;
- case 0xFC62: *glyph = 0x86; break;
- case 0xFC63: *glyph = 0xAE; break; /* This is not in the font */
-
- case 0x621: *glyph = charmap[0].charindex; break; /* hamza */
- case 0x640: *glyph = 0xE0; break; /* tatweel */
- case 0x61F: *glyph = 0xBF; break; /* question mark */
-
- /* farsi ye */
- case 0xFBFC: *glyph = 0x8D; break;
- case 0xFBFD: *glyph = 0xE9; break;
- case 0xFBFE: *glyph = 0xFE; break;
- case 0xFBFF: *glyph = 0xFE; break;
- /* Gaf -- the font does not have it, but this is better than nothing */
- case 0xFB92: *glyph = 0xE3; break;
- case 0xFB93: *glyph = 0xE3; break;
- case 0xFB94: *glyph = 0xF9; break;
- case 0xFB95: *glyph = 0x9B; break;
-
- default:
- *glyph = 0x20; /* we don't have this thing -- use a space */
- /* This has to be something that does not print anything !! */
- break;
- }
-}
-
-
-
-
-
diff --git a/modules/arabic/langboxfont.h b/modules/arabic/langboxfont.h
deleted file mode 100644
index c2343938..00000000
--- a/modules/arabic/langboxfont.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* pango-arabic module
- *
- * (C) 2000 K. Koehler <koehler@or.uni-bonn.de>
- *
- * This file provides a mapping unicode <- langboxfont
- */
-#ifndef __lboxfont_h_
-#define __lboxfont_h_
-#include "pangox.h"
-#include "arconv.h"
-
-/*
- * create an arabic_fontstruct for the langbox-module
- * returns: NULL on failure
- */
-ArabicFontInfo*
-arabic_lboxinit(PangoFont *font);
-
-
-/* glyph2 is the next glyph in line; if there is none, put in NULL
- */
-void
-arabic_lbox_recode(PangoXSubfont* subfont,gunichar* glyph,gunichar* glyph2,
- PangoXSubfont* lboxfonts);
-
-
-#endif
-
diff --git a/modules/arabic/mulefont.c b/modules/arabic/mulefont.c
deleted file mode 100644
index f283ad22..00000000
--- a/modules/arabic/mulefont.c
+++ /dev/null
@@ -1,295 +0,0 @@
-/* pango-arabic module
- *
- * (C) 2000 K. Koehler <koehler@or.uni-bonn.de>
- *
- * This file provides a mapping unicode <- mulefont
- */
-
-
-#include <stdio.h>
-#include <glib.h>
-#include "pangox.h"
-
-
-/* #define DEBUG */
-#ifdef DEBUG
-#include <stdio.h>
-#endif
-#include "mulefont.h"
-
-ArabicFontInfo*
-arabic_muleinit(PangoFont *font)
-{
- static char *mule_charsets0[] = {
- "mulearabic-0",
- };
-
- static char *mule_charsets1[] = {
- "mulearabic-1",
- };
-
- static char *mule_charsets2[] = {
- "mulearabic-2",
- };
-
- ArabicFontInfo *fs = NULL;
- PangoXSubfont *subfonts;
- int *subfont_charsets;
- int n_subfonts;
- PangoXSubfont mulefonts[3];
-
- n_subfonts = pango_x_list_subfonts (font,mule_charsets0,
- 1, &subfonts, &subfont_charsets);
- if (n_subfonts > 0)
- {
- mulefonts[0] = subfonts[0];
- }
- g_free (subfonts);
- g_free (subfont_charsets);
-
- n_subfonts = pango_x_list_subfonts (font,mule_charsets1,
- 1, &subfonts, &subfont_charsets);
- if (n_subfonts > 0)
- {
- mulefonts[1] = subfonts[0];
- }
- g_free (subfonts);
- g_free (subfont_charsets);
-
- n_subfonts = pango_x_list_subfonts (font,mule_charsets2,
- 1, &subfonts, &subfont_charsets);
- if (n_subfonts > 0)
- {
- mulefonts[2] = subfonts[0];
- }
- g_free (subfonts);
- g_free (subfont_charsets);
-
- if (( mulefonts[0] != 0)&&(mulefonts[1] != 0)&&(mulefonts[2] != 0))
- {
- fs = g_new (ArabicFontInfo,1);
- fs->level = ar_novowel | ar_mulefont;
- fs->subfonts[0] = mulefonts[0];
- fs->subfonts[1] = mulefonts[1];
- fs->subfonts[2] = mulefonts[2];
- }
- return fs;
-}
-
-
-typedef struct {
- gunichar unicodechar;
- int fontindex;
- int charindex;
-} fontentry;
-
-
-static fontentry charmap [] =
-{
- { 0xFE80,1,0x2d }, /* HAMZA; handle seperately !!! */
- { 0xFE81,1,0x2e }, /* ALIF MADDA */
- { 0xFE82,1,0x2f },
- { 0xFE83,1,0x30 }, /* ALIF HAMZA */
- { 0xFE84,1,0x31 },
- { 0xFE85,1,0x32 }, /* WAW HAMZA */
- { 0xFE86,1,0x33 },
- { 0xFE87,1,0x34 }, /* ALIF IHAMZA */
- { 0xFE88,1,0x35 },
- { 0xFE89,2,0x21 }, /* YA HAMZA */
- { 0xFE8A,2,0x22 },
- { 0xFE8B,1,0x36 }, /* HMAZA-'pod' */
- { 0xFE8C,1,0x37 },
- { 0xFE8D,1,0x38 }, /* ALIF */
- { 0xFE8E,1,0x39 },
- { 0xFE8F,2,0x23 }, /* BA */
- { 0xFE90,2,0x24 },
- { 0xFE91,1,0x3A },
- { 0xFE92,1,0x3B },
- { 0xFE93,1,0x3C }, /* TA MARBUTA */
- { 0xFE94,1,0x3D },
- { 0xFE95,2,0x25 }, /* TA */
- { 0xFE96,2,0x26 },
- { 0xFE97,1,0x3E },
- { 0xFE98,1,0x3F },
- { 0xFE99,2,0x27 }, /* THA */
- { 0xFE9A,2,0x28 },
- { 0xFE9B,1,0x40 },
- { 0xFE9C,1,0x41 },
- { 0xFE9D,2,0x29 }, /* DJIM */
- { 0xFE9E,2,0x2C },
- { 0xFE9F,2,0x2A },
- { 0xFEA0,2,0x2B },
- { 0xFEA1,2,0x2D }, /* .HA */
- { 0xFEA2,2,0x30 },
- { 0xFEA3,2,0x2E },
- { 0xFEA4,2,0x2F },
- { 0xFEA5,2,0x31 }, /* CHA */
- { 0xFEA6,2,0x34 },
- { 0xFEA7,2,0x32 },
- { 0xFEA8,2,0x33 },
- { 0xFEA9,1,0x42 }, /* DAL */
- { 0xFEAA,1,0x43 },
- { 0xFEAB,1,0x44 }, /* THAL */
- { 0xFEAC,1,0x45 },
- { 0xFEAD,1,0x46 }, /* RA */
- { 0xFEAE,1,0x47 },
- { 0xFEAF,1,0x48 }, /* ZAY */
- { 0xFEB0,1,0x49 },
- { 0xFEB1,2,0x35 }, /* SIN */
- { 0xFEB2,2,0x38 },
- { 0xFEB3,2,0x36 },
- { 0xFEB4,2,0x37 },
- { 0xFEB5,2,0x39 }, /* SHIN */
- { 0xFEB2,2,0x3C },
- { 0xFEB3,2,0x3A },
- { 0xFEB4,2,0x3B },
- { 0xFEB9,2,0x3D }, /* SAAD */
- { 0xFEBA,2,0x40 },
- { 0xFEBB,2,0x3E },
- { 0xFEBC,2,0x3F },
- { 0xFEBD,2,0x41 }, /* DAAD */
- { 0xFEBE,2,0x44 },
- { 0xFEBF,2,0x42 },
- { 0xFEC0,2,0x43 },
- { 0xFEC1,2,0x45 }, /* .TA */
- { 0xFEC2,2,0x48 },
- { 0xFEC3,2,0x46 },
- { 0xFEC4,2,0x47 },
- { 0xFEC5,2,0x49 }, /* .ZA */
- { 0xFEC6,2,0x4C },
- { 0xFEC7,2,0x4A },
- { 0xFEC8,2,0x4B },
- { 0xFEC9,2,0x4D }, /* AIN */
- { 0xFECA,2,0x4E },
- { 0xFECB,1,0x4A },
- { 0xFECC,1,0x4B },
- { 0xFECD,2,0x4F }, /* RAIN */
- { 0xFECE,2,0x50 },
- { 0xFECF,1,0x4C },
- { 0xFED0,1,0x4D },
- { 0xFED1,2,0x51 }, /* FA */
- { 0xFED2,2,0x52 },
- { 0xFED3,1,0x4E },
- { 0xFED4,1,0x4F },
- { 0xFED5,2,0x53 }, /* QAF */
- { 0xFED6,2,0x54 },
- { 0xFED7,1,0x50 },
- { 0xFEB8,1,0x51 },
- { 0xFED9,2,0x55 }, /* KAF */
- { 0xFEDA,2,0x58 },
- { 0xFEDB,2,0x56 },
- { 0xFEDC,2,0x57 },
- { 0xFEDD,2,0x59 }, /* LAM */
- { 0xFEDE,2,0x5A },
- { 0xFEDF,1,0x52 },
- { 0xFEE0,1,0x53 },
- { 0xFEE1,1,0x54 }, /* MIM */
- { 0xFEE2,1,0x57 },
- { 0xFEE3,1,0x55 },
- { 0xFEE4,1,0x56 },
- { 0xFEE5,2,0x5B }, /* NUN */
- { 0xFEE6,2,0x5C },
- { 0xFEE7,1,0x58 },
- { 0xFEE8,1,0x59 },
- { 0xFEE9,1,0x5A }, /* HA */
- { 0xFEEA,1,0x5D },
- { 0xFEEB,1,0x5B },
- { 0xFEEC,1,0x5C },
- { 0xFEED,1,0x5E }, /* WAW */
- { 0xFEEE,1,0x5F },
- { 0xFEEF,2,0x5D }, /* ALIF MAQSORA */
- { 0xFEF0,2,0x5E },
- { 0xFEF1,2,0x5F }, /* YA */
- { 0xFEF2,2,0x60 },
- { 0xFEF3,1,0x60 },
- { 0xFEF4,1,0x61 },
- { 0xFEF5,1,0x62 }, /* Lam-Alif Madda */
- { 0xFEF6,2,0x61 },
- { 0xFEF7,1,0x63 }, /* Lam-Alif Hamza*/
- { 0xFEF8,2,0x62 },
- { 0xFEF9,1,0x64 }, /* Lam-Alif iHamza*/
- { 0xFEFA,2,0x63 },
- { 0xFEFB,1,0x65 }, /* Lam-Alif */
- { 0xFEFC,2,0x64 }
-};
-
-void
-arabic_mule_recode(PangoXSubfont* subfont,gunichar* glyph,PangoXSubfont* mulefonts)
-{
- int letter=*glyph;
- if ((letter >= 0x660)&&(letter <= 0x669)) /* indic numeral */
- {
- *subfont = mulefonts[0];
- *glyph = letter - 0x660 + 0x21;
- }
- else if ((letter >= 0xFE80)&&(letter <= 0xFEFC))
- { /* now we have a mess ... a big mess ... */
- /* The mule 'idea' is that "wide" forms are in the -2 font, whereas
- * narrow one are in the -1 font.
- * to conserve space, the characters are all ordered in a big lump.
- * emacs can't handle it ...
- */
-#ifdef DEBUG
- if (charmap[letter-0xFE80].unicodechar != letter)
- {
- fprintf(stderr,"[ar] mulefont charmap table defect "
- "%x comes out as %x ",
- letter,charmap[letter-0xFE80].unicodechar);
- }
-#endif
- *subfont = mulefonts[charmap[letter-0xFE80].fontindex];
- *glyph = charmap[letter-0xFE80].charindex;
- }
- else if (letter == 0x621)
- {
- *subfont = mulefonts[charmap[0].fontindex];
- *glyph = charmap[0].charindex;
- }
- else if (letter == 0x61F)
- { /* question mark */
- *subfont = mulefonts[1];
- *glyph = 0x29;
- }
- else
- {
- switch(letter){
- /* Gaf */
- case 0xFB92: *subfont = mulefonts[2]; *glyph = 0x6B; break;
- case 0xFB93: *subfont = mulefonts[2]; *glyph = 0x6E; break;
- case 0xFB94: *subfont = mulefonts[2]; *glyph = 0x6C; break;
- case 0xFB95: *subfont = mulefonts[2]; *glyph = 0x6D; break;
- /* persian Kaf -- the first to forms are wrong ... */
- case 0xFB8E: *subfont = mulefonts[2]; *glyph = 0x55; break;
- case 0xFB8F: *subfont = mulefonts[2]; *glyph = 0x58; break;
- case 0xFB90: *subfont = mulefonts[2]; *glyph = 0x56; break;
- case 0xFB91: *subfont = mulefonts[2]; *glyph = 0x57; break;
- /* Tcheh */
- case 0xFB7A: *subfont = mulefonts[2]; *glyph = 0x67; break;
- case 0xFB7B: *subfont = mulefonts[2]; *glyph = 0x6A; break;
- case 0xFB7C: *subfont = mulefonts[2]; *glyph = 0x68; break;
- case 0xFB7D: *subfont = mulefonts[2]; *glyph = 0x69; break;
- /* Pe */
- case 0xFB56: *subfont = mulefonts[2]; *glyph = 0x65; break;
- case 0xFB57: *subfont = mulefonts[2]; *glyph = 0x66; break;
- case 0xFB58: *subfont = mulefonts[1]; *glyph = 0x66; break;
- case 0xFB59: *subfont = mulefonts[1]; *glyph = 0x67; break;
- /* farsi Jeh */
- case 0xFBFC: *subfont = mulefonts[2]; *glyph = 0x5D; break;
- case 0xFBFD: *subfont = mulefonts[2]; *glyph = 0x5E; break;
- case 0xFBFE: *subfont = mulefonts[1]; *glyph = 0x60; break;
- case 0xFBFF: *subfont = mulefonts[1]; *glyph = 0x61; break;
- /* extra */
- case 0xFB8A: *subfont = mulefonts[1]; *glyph = 0x68; break;
- case 0xFB8B: *subfont = mulefonts[1]; *glyph = 0x69; break;
-
- default:
- *subfont = mulefonts[1];
- *glyph = 0x26; /* we don't have this thing -- use a dot */
- break;
- }
- }
-}
-
-
-
-
diff --git a/modules/arabic/mulefont.h b/modules/arabic/mulefont.h
deleted file mode 100644
index e93d8118..00000000
--- a/modules/arabic/mulefont.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* pango-arabic module
- *
- * (C) 2000 K. Koehler <koehler@or.uni-bonn.de>
- *
- * This file provides a mapping unicode <- mulefont
- */
-#ifndef __mulefont_h_
-#define __mulefont_h_
-#include "pango-layout.h"
-#include "pangox.h"
-#include "arconv.h"
-
-/*
- * create an arabic_fontstruct for the mulefont-module
- * returns: NULL on failure
- */
-ArabicFontInfo*
-arabic_muleinit(PangoFont *font);
-
-void
-arabic_mule_recode(PangoXSubfont* subfont,gunichar* glyph,PangoXSubfont* mulefonts);
-
-#endif
diff --git a/modules/arabic/naqshfont.c b/modules/arabic/naqshfont.c
deleted file mode 100644
index a7462637..00000000
--- a/modules/arabic/naqshfont.c
+++ /dev/null
@@ -1,374 +0,0 @@
-/* pango-arabic module
- *
- * (C) 2000 K. Koehler <koehler@or.uni-bonn.de>
- * (c) 2000 Pablo Saratxaga <pablo@mandrakesoft.com>
- *
- * This file provides a mapping unicode <- naqshfont
- */
-
-
-#include <stdio.h>
-#include <glib.h>
-#include "pangox.h"
-
-/* #define DEBUG */
-#ifdef DEBUG
-#include <stdio.h>
-#endif
-#include "naqshfont.h"
-
-
-ArabicFontInfo*
-urdu_naqshinit(PangoFont *font)
-{
- static char *nq_charsets0[] = {
- "symbol-0",
-/* "urdunaqsh-0" */
- };
-
- ArabicFontInfo *fs = NULL;
- PangoXSubfont *subfonts;
- int *subfont_charsets;
- int n_subfonts;
-
- n_subfonts = pango_x_list_subfonts (font,nq_charsets0,
- 1, &subfonts, &subfont_charsets);
- if (n_subfonts > 0)
- {
- fs = g_new (ArabicFontInfo,1);
- fs->level = ar_standard | ar_naqshfont;
- fs->subfonts[0] = subfonts[0];
- }
- g_free (subfonts);
- g_free (subfont_charsets);
- return fs;
-}
-
-
-
-
-typedef struct {
- gunichar unicodechar;
- int charindex;
-} fontentry;
-
-
-static fontentry charmap [] =
-{ /* the basic arabic block comes first ... */
- { 0xFE8B,0x6C }, /* HMAZA-'pod' */
- { 0xFE8C,0xAB },
- { 0xFE8D,0x22 }, /* ALEF */
- { 0xFE8E,0xAD },
- { 0xFE8F,0x23 }, /* BEH */
- { 0xFE90,0xAE },
- { 0xFE91,0x4E },
- { 0xFE92,0x6E },
- { 0xFE93,0x48 }, /* TEH MARBUTA */
- { 0xFE94,0xD5 },
- { 0xFE95,0x25 }, /* TEH */
- { 0xFE96,0xB0 },
- { 0xFE97,0x50 },
- { 0xFE98,0x70 },
- { 0xFE99,0x27 }, /* THEH */
- { 0xFE9A,0xB2 },
- { 0xFE9B,0x52 },
- { 0xFE9C,0x72 },
- { 0xFE9D,0x28 }, /* JEEM */
- { 0xFE9E,0xB3 },
- { 0xFE9F,0x53 },
- { 0xFEA0,0x73 },
- { 0xFEA1,0x2A }, /* HAH . */
- { 0xFEA2,0xB5 },
- { 0xFEA3,0x55 },
- { 0xFEA4,0x75 },
- { 0xFEA5,0x2B }, /* KHAH */
- { 0xFEA6,0xB6 },
- { 0xFEA7,0x56 },
- { 0xFEA8,0x76 },
- { 0xFEA9,0x2C }, /* DAL */
- { 0xFEAA,0xB8 },
- { 0xFEAB,0x2E }, /* THAL */
- { 0xFEAC,0xBA },
- { 0xFEAD,0x2F }, /* REH */
- { 0xFEAE,0xBB },
- { 0xFEAF,0x31 }, /* ZAIN (ZAY) */
- { 0xFEB0,0xBD },
- { 0xFEB1,0x33 }, /* SEEN */
- { 0xFEB2,0xBF },
- { 0xFEB3,0x57 },
- { 0xFEB4,0x77 },
- { 0xFEB5,0x34 }, /* SHEEN */
- { 0xFEB2,0xC0 },
- { 0xFEB3,0x58 },
- { 0xFEB4,0x78 },
- { 0xFEB9,0x35 }, /* SAD */
- { 0xFEBA,0xC1 },
- { 0xFEBB,0x59 },
- { 0xFEBC,0x79 },
- { 0xFEBD,0x36 }, /* DAD */
- { 0xFEBE,0xC2 },
- { 0xFEBF,0x5A },
- { 0xFEC0,0x7A },
- { 0xFEC1,0x37 }, /* TAH . */
- { 0xFEC2,0xC3 },
- { 0xFEC3,0x5B },
- { 0xFEC4,0x7B },
- { 0xFEC5,0x38 }, /* ZAH . */
- { 0xFEC6,0xC4 },
- { 0xFEC7,0x5C },
- { 0xFEC8,0x7C },
- { 0xFEC9,0x39 }, /* AIN */
- { 0xFECA,0xC5 },
- { 0xFECB,0x5D },
- { 0xFECC,0x7D },
- { 0xFECD,0x3A }, /* GHAIN */
- { 0xFECE,0xC6 },
- { 0xFECF,0x5E },
- { 0xFED0,0x7E },
- { 0xFED1,0x3B }, /* FEH */
- { 0xFED2,0xC7 },
- { 0xFED3,0x5F },
- { 0xFED4,0xA1 },
- { 0xFED5,0x3D }, /* QAF */
- { 0xFED6,0xC9 },
- { 0xFED7,0x61 },
- { 0xFEB8,0xA3 },
- { 0xFED9,0x3E }, /* KAF */
- { 0xFEDA,0xCA },
- { 0xFEDB,0x62 },
- { 0xFEDC,0xA4 },
- { 0xFEDD,0x41 }, /* LAM */
- { 0xFEDE,0xCD },
- { 0xFEDF,0x66 },
- { 0xFEE0,0xA6 },
- { 0xFEE1,0x43 }, /* MEEM */
- { 0xFEE2,0xCF },
- { 0xFEE3,0x67 },
- { 0xFEE4,0xA7 },
- { 0xFEE5,0x44 }, /* NOON */
- { 0xFEE6,0xD0 },
- { 0xFEE7,0x68 },
- { 0xFEE8,0xA8 },
- { 0xFEE9,0x47 }, /* HEH (HA) */
- { 0xFEEA,0xD4 },
- { 0xFEEB,0x6B },
- { 0xFEEC,0xAA },
- { 0xFEED,0x46 }, /* WAW */
- { 0xFEEE,0xD2 },
- { 0xFEEF,0x4B }, /* ALEF MAKSURA */
- { 0xFEF0,0xD6 },
- { 0xFEF1,0x4C }, /* YEH (YA) */
- { 0xFEF2,0xD7 },
- { 0xFEF3,0x6D },
- { 0xFEF4,0xAC },
-
-
- { 0x0020,0x20 }, /* space */ /* We ought to NOT get these ! */
- { 0x0021,0xEA }, /* ! */
- { 0x0027,0xEC }, /* ' */
- { 0x0028,0xED }, /* ( */
- { 0x0029,0xEE }, /* ) */
- { 0x002E,0xE7 }, /* . */
- { 0x003A,0xEB }, /* : */
- { 0x00A0,0xA0 }, /* non breaking space */
-
-
-
- { 0x060C,0xE8 }, /* arabic comma */
- { 0x061F,0xE9 }, /* arabic question mark */
- { 0x0621,0x4A }, /* hamza */
- { 0x0640,0xE6 }, /* arabic tatweel */
- { 0x064B,0xF8 }, /* arabic fathatan, unshaped */
- { 0x064C,0xF7 }, /* arabic dammatan, unshaped */
- { 0x064D,0xF9 }, /* arabic kasratan, unshaped */
- { 0x064E,0xFE }, /* arabic fatha, unshaped */
- { 0x064F,0xFD }, /* araibc damma, unshaped */
- { 0x0650,0xFF }, /* arabic kasra, unshaped */
- { 0x0651,0xFC }, /* arabic shadda, unshaped */
- { 0x0652,0xA0 }, /* sukun -- non-existant in the font */
- { 0x0653,0xF3 }, /* arabic madda above, should occur in only one case: upon left-joined Alif */
- { 0x0654,0xF6 }, /* arabic hamza above, unshaped */
- { 0x0655,0xF5 }, /* arabic hamza below, unshaped */
-
- /* arabic digits */
- { 0x0660,0xE5 }, /* arabic digit 0 */
- { 0x0661,0xD9 }, /* arabic digit 1 */
- { 0x0662,0xDA }, /* arabic digit 2 */
- { 0x0663,0xDB }, /* arabic digit 3 */
- { 0x0664,0xDC }, /* arabic digit 4 */
- { 0x0665,0xDE }, /* arabic digit 5 */
- { 0x0666,0xE0 }, /* arabic digit 6 */
- { 0x0667,0xE1 }, /* arabic digit 7 */
- { 0x0668,0xE3 }, /* arabic digit 8 */
- { 0x0669,0xE4 }, /* arabic digit 9 */
- { 0x0670,0xF4 }, /* arabic percent sign */
- { 0x0679,0x26 }, /* some arabic letters, unshaped */
- { 0x067E,0x24 },
- { 0x0686,0x29 },
- { 0x0688,0x2D },
- { 0x0691,0x30 },
- { 0x0698,0x32 },
- { 0x06A4,0x3C },
- { 0x06A9,0x3F },
- { 0x06AF,0x40 },
- { 0x06BA,0x45 },
- { 0x06BE,0x49 },
- { 0x06C1,0x47 },
- { 0x06CC,0x4B },
- { 0x06D2,0x4D },
- { 0x06D4,0xE7 },
- /* persian digits */
- { 0x06F0,0xE5 }, /* persian digit 0 */
- { 0x06F1,0xD9 }, /* persian digit 1 */
- { 0x06F2,0xDA }, /* persian digit 2 */
- { 0x06F3,0xDB }, /* persian digit 3 */
- { 0x06F4,0xDD }, /* persian digit 4 */
- { 0x06F5,0xDF }, /* persian digit 5 */
- { 0x06F6,0xE0 }, /* persian digit 6 */
- { 0x06F7,0xE2 }, /* persian digit 7 */
- { 0x06F8,0xE3 }, /* persian digit 8 */
- { 0x06F9,0xE4 }, /* persian digit 9 */
-
- /* shaped letters & ligatures */
- { 0xFB56,0x24 }, /* PEH */
- { 0xFB57,0xAF },
- { 0xFB58,0x4F },
- { 0xFB59,0x6F },
- { 0xFB66,0x26 }, /* TTEH */
- { 0xFB67,0xB1 },
- { 0xFB68,0x51 },
- { 0xFB69,0x71 },
- { 0xFB6A,0x3C }, /* VEH */
- { 0xFB6B,0xC8 },
- { 0xFB6C,0x60 },
- { 0xFB6D,0xA2 },
- { 0xFB7A,0x29 }, /* TCHEH */
- { 0xFB7B,0xB4 },
- { 0xFB7C,0x54 },
- { 0xFB7D,0x74 },
- { 0xFB88,0x2D }, /* DDAL */
- { 0xFB89,0xB9 },
- { 0xFB8A,0x32 }, /* JEH */
- { 0xFB8B,0xBE },
- { 0xFB8C,0x30 }, /* RREH */
- { 0xFB8D,0xBC },
- { 0xFB8E,0x3F }, /* KEHEH */
- { 0xFB8F,0xCB },
- { 0xFB90,0x62 },
- { 0xFB90,0x64 },
- { 0xFB91,0xA4 },
- { 0xFB92,0x40 }, /* GAF */
- { 0xFB93,0xCC },
- { 0xFB94,0x63 },
- { 0xFB94,0x65 },
- { 0xFB95,0xA5 },
- { 0xFB9E,0x45 }, /* NOON GHUNNA */
- { 0xFB9F,0xD1 },
- { 0xFBA6,0x47 }, /* HEH GOAL */
- { 0xFBA7,0xD3 },
- { 0xFBA8,0x69 },
- { 0xFBA8,0x6A },
- { 0xFBA9,0xA9 },
- { 0xFBAA,0x49 }, /* HEH DOACHASMEE */
- { 0xFBAB,0xAA },
- { 0xFBAC,0x6B },
- { 0xFBAD,0xAA },
- { 0xFBAE,0x4D }, /* YEH BAREE */
- { 0xFBAF,0xD8 },
- { 0xFBFC,0x4B }, /* FARSI YEH */
- { 0xFBFD,0xD6 },
- { 0xFBFE,0x6D },
- { 0xFBFF,0xAC },
- { 0xFE80,0x4A }, /* HAMZA */
- { 0xFE81,0x21 }, /* ALEF WITH MADDA ABOVE */
- { 0xFE82,0xAD },
-
- /* fake entries (the font doesn't provide glyphs with the hamza
- * above; so the ones without hamza are used, as a best approach) */
- /* these *should never occur* */
- { 0xFE83,0x22 }, /* ALIF HAMZA */
- { 0xFE84,0xAD },
- { 0xFE85,0x46 }, /* WAW HAMZA */
- { 0xFE86,0xD2 },
- { 0xFE87,0x22 }, /* ALIF IHAMZA */
- { 0xFE88,0xAD },
- { 0xFE89,0x4C }, /* YA HAMZA */
- { 0xFE8A,0xD7 },
-
- { 0xFEFB,0x42 }, /* ligature LAM+ALEF ISOLATED */
- { 0xFEFC,0xCE }, /* ligature LAM+ALEF FINAL */
-
- /* I've been unable to map those font glyphs to an unicode value;
- * if you can, please tell me -- Pablo Saratxaga <pablo@mandrakesoft.com>
- { 0x????,0xB7 },
- { 0x????,0xEF },
- { 0x????,0xF0 },
- { 0x????,0xF1 },
- { 0x????,0xF2 },
- { 0x????,0xFA },
- { 0x????,0xFB },
- */
-
- { 0x0000,0x00 }
-};
-
-
-void
-urdu_naqsh_recode(PangoXSubfont* subfont,gunichar* glyph,gunichar* glyph2,
- PangoXSubfont* nqfont)
-{
- int letter=*glyph;
- int i;
-
-
- *subfont = nqfont[0];
-
- if ((letter >= 0xFE8B)&&(letter <= 0xFEF4))
- {
- *glyph = charmap[letter-0xFE8B].charindex;
- }
- else if (letter < 0xFF )
- { /* recoded in previous run */
- *glyph = letter;
- }
- else if ((letter >= 0xFEF5)&&(letter <= 0xFEFC))
- { /* Lam-Alif. Also solved interestingly ...
- * At least, the Lam-Alif itself is not split ...
- */
- if (!(letter % 2))
- {
- *glyph = 0xCE;
- }
- else
- {
- *glyph = 0x42;
- }
- switch (letter)
- {
- case 0xFEF5 :
- case 0xFEF6 : *glyph2 = 0xF3; break; /* Lam-Alif Madda */
- case 0xFEF7 :
- case 0xFEF8 : *glyph2 = 0xF6; break; /* Lam-Alif Hamza */
- case 0xFEF9 :
- case 0xFEFA : *glyph2 = 0xF5; break; /* Lam-Alif iHamza */
- }
- }
- else
- {
- for (i=0 ; charmap[i].unicodechar!=0x0000 ; i++) {
- if (charmap[i].unicodechar == letter) {
- *glyph = charmap[i].charindex;
- break;
- }
- }
- if (charmap[i].unicodechar == 0x0000) {
- /* if the glyph wasn't on the table */
- *glyph = 0xE5; /* don't know what to do */
- }
- }
-}
-
-
-
-
-
diff --git a/modules/arabic/naqshfont.h b/modules/arabic/naqshfont.h
deleted file mode 100644
index 1d5a997c..00000000
--- a/modules/arabic/naqshfont.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* pango-arabic module
- *
- * (C) 2000 K. Koehler <koehler@or.uni-bonn.de>
- *
- * This file provides a mapping unicode <- urdu nq-font
- */
-#ifndef __nqfont_h_
-#define __nqfont_h_
-#include "pangox.h"
-#include "arconv.h"
-
-/*
- * create an arabic_fontstruct for the urdu_naqshfont-module
- * returns: NULL on failure
- */
-ArabicFontInfo*
-urdu_naqshinit(PangoFont *font);
-
-
-/* glyph2 is the next glyph in line; if there is none, put in NULL
- */
-void
-urdu_naqsh_recode(PangoXSubfont* subfont,gunichar* glyph,gunichar* glyph2,
- PangoXSubfont* nqfont);
-#endif
-
-
diff --git a/modules/hangul/Makefile.am b/modules/hangul/Makefile.am
index 3af5e970..9eb39a4f 100644
--- a/modules/hangul/Makefile.am
+++ b/modules/hangul/Makefile.am
@@ -21,23 +21,6 @@ moduledir = $(libdir)/pango/$(PANGO_MODULE_VERSION)/modules
module_LTLIBRARIES =
noinst_LTLIBRARIES =
-if HAVE_X
-INCLUDES += $(X_CFLAGS)
-if INCLUDE_HANGUL_X
-noinst_LTLIBRARIES += libpango-hangul-x.la
-else
-module_LTLIBRARIES += pango-hangul-x.la
-endif
-endif
-
-x_sources = hangul-x.c hangul-defs.h
-
-pango_hangul_x_la_LDFLAGS = -export-dynamic -avoid-version -module
-pango_hangul_x_la_LIBADD = $(pangoxlibs)
-pango_hangul_x_la_SOURCES = $(x_sources)
-libpango_hangul_x_la_SOURCES = $(x_sources)
-libpango_hangul_x_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_hangul_x
-
if HAVE_XFT
INCLUDES += $(XFT_CFLAGS)
diff --git a/modules/hangul/hangul-x.c b/modules/hangul/hangul-x.c
deleted file mode 100644
index 72bbc655..00000000
--- a/modules/hangul/hangul-x.c
+++ /dev/null
@@ -1,899 +0,0 @@
-/* Pango
- * hangul.c:
- *
- * Copyright (C) 1999, 2002 Changwoo Ryu
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <glib.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "pangox.h"
-#include "pango-engine.h"
-
-#define SCRIPT_ENGINE_NAME "HangulScriptEngineX"
-
-static PangoEngineRange hangul_ranges[] = {
-
- /* Hangul Jamo U+1100 -- U+11FF */
- { 0x1100, 0x11ff, "*" },
- /* Hangul Compatibility Jamo U+3130 -- U+318F */
-/* { 0x3130, 0x318f, "*" }, */
- /* Hangul (pre-composed) Syllables U+AC00 -- U+D7A3 */
- { 0xac00, 0xd7a3, "*" }
-};
-
-
-static PangoEngineInfo script_engines[] = {
- {
- SCRIPT_ENGINE_NAME,
- PANGO_ENGINE_TYPE_SHAPE,
- PANGO_RENDER_TYPE_X,
- hangul_ranges, G_N_ELEMENTS(hangul_ranges)
- }
-};
-
-static int n_script_engines = G_N_ELEMENTS (script_engines);
-
-/*
- * X window system script engine portion
- */
-
-static void
-set_glyph (PangoGlyphString *glyphs,
- int i,
- PangoFont *font,
- PangoXSubfont subfont,
- guint16 gindex)
-{
- PangoRectangle logical_rect;
-
- glyphs->glyphs[i].glyph = PANGO_X_MAKE_GLYPH (subfont, gindex);
-
- glyphs->glyphs[i].geometry.x_offset = 0;
- glyphs->glyphs[i].geometry.y_offset = 0;
-
- pango_font_get_glyph_extents (font, glyphs->glyphs[i].glyph, NULL, &logical_rect);
- glyphs->glyphs[i].geometry.width = logical_rect.width;
-}
-
-static void
-set_unknown_glyph (PangoGlyphString *glyphs,
- int *n_glyphs,
- PangoFont *font,
- gunichar wc,
- int cluster_offset)
-{
- PangoRectangle logical_rect;
- gint i = *n_glyphs;
-
- (*n_glyphs)++;
- pango_glyph_string_set_size (glyphs, *n_glyphs);
-
- glyphs->glyphs[i].glyph = pango_x_get_unknown_glyph (font);
-
- glyphs->glyphs[i].geometry.x_offset = 0;
- glyphs->glyphs[i].geometry.y_offset = 0;
-
- pango_font_get_glyph_extents (font, glyphs->glyphs[i].glyph, NULL, &logical_rect);
- glyphs->glyphs[i].geometry.width = logical_rect.width;
-
- glyphs->log_clusters[i] = cluster_offset;
-}
-
-
-#include "hangul-defs.h"
-
-typedef void (* RenderSyllableFunc) (PangoFont *font, PangoXSubfont subfont,
- gunichar *text, int length,
- PangoGlyphString *glyphs,
- int *n_glyphs, int cluster_offset);
-
-
-
-#include "tables-johabfont.i"
-#include "tables-ksc5601.i"
-#include "tables-jamos.i"
-
-#define JOHAB_COMMON \
- int i; \
- guint16 gindex; \
- \
- /* \
- * Check if there are one CHOSEONG, one JUNGSEONG, and no more \
- * than one JONGSEONG. \
- */ \
- int n_cho = 0, n_jung = 0, n_jong = 0; \
- i = 0; \
- while (i < length && IS_L (text[i])) \
- { \
- n_cho++; \
- i++; \
- } \
- while (i < length && IS_V (text[i])) \
- { \
- n_jung++; \
- i++; \
- } \
- while (i < length && IS_T (text[i])) \
- { \
- n_jong++; \
- i++; \
- } \
- \
- if (n_cho <= 1 && n_jung <= 1) \
- { \
- int composed = 0; \
- gunichar l, v, t = 0; \
- \
- l = (n_cho > 0) ? text[0] : LFILL; \
- v = (n_jung > 0) ? text[n_cho] : VFILL; \
- t = (n_jong > 0) ? text[n_cho + n_jung] : 0; \
- \
- if ((__choseong_johabfont_base[l - LBASE] != 0 || l == LFILL) && \
- (__jungseong_johabfont_base[v - VBASE] != 0 || v == VFILL) && \
- (!t || (__jongseong_johabfont_base[t - TBASE] != 0))) \
- composed = n_cho + n_jung + ((n_jong > 0) ? 1 : 0); \
- else if ((__choseong_johabfont_base[l - LBASE] != 0 || l == LFILL) && \
- (__jungseong_johabfont_base[v - VBASE] != 0 || v == VFILL)) \
- composed = n_cho + n_jung; \
- \
- /* COMPOSABLE */ \
- if (composed) \
- { \
- if (l != LFILL) \
- { \
- gindex = __choseong_johabfont_base[l - LBASE]; \
- if (!t) \
- { \
- if (v == VFILL) \
- gindex += 1; \
- else \
- gindex += __choseong_map_1[v - VBASE]; \
- } \
- else \
- { \
- if (v == VFILL) \
- gindex += 6; \
- else \
- gindex += __choseong_map_2[v - VBASE]; \
- } \
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1); \
- set_glyph (glyphs, *n_glyphs, font, subfont, gindex); \
- glyphs->log_clusters[*n_glyphs] = cluster_offset; \
- (*n_glyphs)++; \
- } \
- \
- if (v != VFILL) \
- { \
- gindex = __jungseong_johabfont_base[v - VBASE]; \
- switch (__johabfont_jungseong_kind[v - VBASE]) \
- { \
- case 3: \
- if (t) \
- gindex += __johabfont_jongseong_kind[t - TBASE]; \
- break; \
- case 4: \
- gindex += ((l == 0x1100 || l == 0x110f) ? 0 : 1) + \
- (t ? 2 : 0); \
- break; \
- } \
- \
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1); \
- set_glyph (glyphs, *n_glyphs, font, subfont, gindex); \
- glyphs->log_clusters[*n_glyphs] = cluster_offset; \
- (*n_glyphs)++; \
- } \
- \
- if (t) \
- { \
- gindex = __jongseong_johabfont_base[t - TBASE] + \
- __jongseong_map[v - VBASE]; \
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1); \
- set_glyph (glyphs, *n_glyphs, font, subfont, gindex); \
- glyphs->log_clusters[*n_glyphs] = cluster_offset; \
- (*n_glyphs)++; \
- } \
- \
- if (v == VFILL && !t) /* dummy for no zero width */ \
- { \
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1); \
- set_glyph (glyphs, *n_glyphs, font, subfont, JOHAB_FILLER); \
- glyphs->log_clusters[*n_glyphs] = cluster_offset; \
- (*n_glyphs)++; \
- } \
- \
- text += composed; \
- length -= composed; \
- } \
- }
-
-static void
-render_syllable_with_johabs (PangoFont *font, PangoXSubfont subfont,
- gunichar *text, int length,
- PangoGlyphString *glyphs,
- int *n_glyphs, int cluster_offset)
-{
- int n_prev_glyphs = *n_glyphs;
- JOHAB_COMMON
-
- /* Render as uncomposed forms as a fallback. */
- for (i = 0; i < length; i++)
- {
- int j;
-
- if (text[i] == LFILL || text[i] == VFILL)
- continue;
- /*
- * Uses KSC5601 symbol glyphs which johabS-1 has; they're
- * not in the normal johab-1. The glyphs are better than composable
- * components.
- */
- for (j = 0; j < 3 && (__jamo_to_ksc5601[text[i] - LBASE][j] != 0); j++)
- {
- gindex = __jamo_to_ksc5601[text[i] - LBASE][j];
-
- if ((gindex >= 0x2421) && (gindex <= 0x247f))
- gindex += (0x032b - 0x2421);
- else if ((gindex >= 0x2321) && (gindex <= 0x2420))
- gindex += (0x02cd - 0x2321);
- else
- break;
-
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont, gindex);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- }
- if (j == 0)
- set_unknown_glyph (glyphs, n_glyphs, font, text[i], cluster_offset);
- }
- /* No glyph rendered yet; it means the empty syllable (ex. LFILL+VFILL) */
- if (n_prev_glyphs == *n_glyphs)
- {
- gindex = JOHAB_FILLER;
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont, gindex);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- }
-}
-
-static void
-render_syllable_with_johab (PangoFont *font, PangoXSubfont subfont,
- gunichar *text, int length,
- PangoGlyphString *glyphs,
- int *n_glyphs, int cluster_offset)
-{
- int n_prev_glyphs = *n_glyphs;
- JOHAB_COMMON
-
- /* Render as uncomposed forms as a fallback. */
- for (i = 0; i < length; i++)
- {
- int j;
-
- if (text[i] == LFILL || text[i] == VFILL)
- continue;
- for (j = 0; (j < 3) && (__jamo_to_johabfont[text[i]-LBASE][j] != 0); j++)
- {
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont,
- __jamo_to_johabfont[text[i] - LBASE][j]);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- if (IS_L (text[i]) || IS_T (text[i]))
- {
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont, JOHAB_FILLER);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- }
- }
- if (j == 0)
- set_unknown_glyph (glyphs, n_glyphs, font, text[i], cluster_offset);
- }
- /* No glyph rendered yet; it means the empty syllable (ex. LFILL+VFILL) */
- if (n_prev_glyphs == *n_glyphs)
- {
- gindex = JOHAB_FILLER;
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont, gindex);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- }
-}
-
-static void
-render_syllable_with_ksx1001johab (PangoFont *font, PangoXSubfont subfont,
- gunichar *text, int length,
- PangoGlyphString *glyphs,
- int *n_glyphs, int cluster_offset)
-{
- int n_prev_glyphs = *n_glyphs;
- guint16 gindex;
- int i, composed;
-
- if (length >= 3 && IS_L_S(text[0]) && IS_V_S(text[1]) && IS_T_S(text[2]))
- composed = 3;
- else if (length >= 2 && IS_L_S(text[0]) && IS_V_S(text[1]))
- composed = 2;
- else
- composed = 0;
-
- if (composed)
- {
- int lindex, vindex, tindex;
-
- lindex = text[0] - LBASE;
- vindex = text[1] - VBASE;
- if (composed == 3)
- tindex = text[2] - TBASE;
- else
- tindex = 0;
-
- /* convert to JOHAB */
-
- gindex = 0x8000 + (larray[lindex] << 10) + (varray[vindex] << 5) + tarray[tindex];
-
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont, gindex);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- text += composed;
- length -= composed;
- }
-
- /* Render as uncomposed forms as a fallback. */
- for (i = 0; i < length; i++)
- {
- int j;
-
- if (text[i] == LFILL || text[i] == VFILL)
- continue;
-
- gindex = text[i];
- for (j = 0; (j < 3) && (__jamo_to_ksc5601[gindex - LBASE][j] != 0); j++)
- {
- int index = __jamo_to_ksc5601[gindex - LBASE][j];
- if (index >= 0x2400 && index < 0x2500)
- index = 0xda80 + index % 256;
- else /* 0x2300 - 0x2400 */
- index = 0xda10 + index % 256 + (index > 0x236e ? 0x12 : 0);
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont, index);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- }
- if (j == 0)
- set_unknown_glyph (glyphs, n_glyphs, font, gindex, cluster_offset);
- }
- /* No glyph rendered yet; it means the empty syllable (ex. LFILL+VFILL) */
- if (n_prev_glyphs == *n_glyphs)
- {
- gindex = 0xd931;
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont, gindex);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- }
-}
-
-static void
-render_syllable_with_iso10646 (PangoFont *font, PangoXSubfont subfont,
- gunichar *text, int length,
- PangoGlyphString *glyphs,
- int *n_glyphs, int cluster_offset)
-{
- int n_prev_glyphs = *n_glyphs;
- guint16 gindex;
- int i, composed;
-
- if (length >= 3 && IS_L_S(text[0]) && IS_V_S(text[1]) && IS_T_S(text[2]))
- composed = 3;
- else if (length >= 2 && IS_L_S(text[0]) && IS_V_S(text[1]))
- composed = 2;
- else
- composed = 0;
-
- if (composed)
- {
- if (composed == 3)
- gindex = S_FROM_LVT(text[0], text[1], text[2]);
- else
- gindex = S_FROM_LV(text[0], text[1]);
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont, gindex);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- text += composed;
- length -= composed;
- }
-
- /* Render as uncomposed forms as a fallback. */
- for (i = 0; i < length; i++)
- {
- if (text[i] == LFILL || text[i] == VFILL)
- continue;
-
- gindex = text[i];
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont, gindex);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- }
- /* No glyph rendered yet; it means the empty syllable (ex. LFILL+VFILL) */
- if (n_prev_glyphs == *n_glyphs)
- {
- gindex = 0x3164;
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont, gindex);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- }
-}
-
-static int
-find_ksc5601 (gunichar ucs)
-{
- int l = 0;
- int u = KSC5601_HANGUL - 1;
- int index;
-
- guint16 try;
-
- /* Do binary search. */
- while (l <= u)
- {
- int m = (l + u) / 2;
- try = __ksc5601_hangul_to_ucs[m];
- if (try > ucs)
- u = m - 1;
- else if (try < ucs)
- l = m + 1;
- else
- {
- /* equation to find the index in ksc5601 font. */
- index = (((m / 94) + 0x30) << 8) | ((m % 94) + 0x21);
- return index;
- }
- }
- return 0;
-}
-
-static gboolean
-try_decompose_jongseong(gunichar jong, gunichar *jong1, gunichar *jong2)
-{
- static gunichar table[][2] = {
- {0, 0},
- /* U+11A8- */
- {0, 0}, {0, 0}, {0x11A8, 0x11BA}, {0, 0},
- {0x11AB, 0x11BD}, {0x11AB, 0x11C2}, {0, 0}, {0, 0},
- /* U+11B0- */
- {0x11AF, 0x11A8}, {0x11AF, 0x11B7}, {0x11AF, 0x11B8}, {0x11AF, 0x11BA},
- {0x11AF, 0x11C0}, {0x11AF, 0x11C1}, {0x11AF, 0x11C2}, {0, 0},
- {0, 0}, {0x11B8, 0x11BA}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- /* U+11C0- */
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- /* U+11D0- */
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- /* U+11E0- */
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- /* U+11F0- */
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0},
- {0, 0}, {0, 0}, {0, 0}, {0, 0}
- };
-
- if (IS_T(jong) && table[jong - TBASE][0])
- {
- *jong1 = table[jong - TBASE][0];
- *jong2 = table[jong - TBASE][1];
- return TRUE;
- }
- else
- return FALSE;
-}
-
-static void
-render_syllable_with_ksc5601 (PangoFont *font, PangoXSubfont subfont,
- gunichar *text, int length,
- PangoGlyphString *glyphs,
- int *n_glyphs, int cluster_offset)
-{
- int n_prev_glyphs = *n_glyphs;
- int gindex = 0, composed = 0;
- gunichar jong1, jong2 = 0;
- int i;
-
- if (length >= 3 && IS_L_S(text[0]) && IS_V_S(text[1]) && IS_T_S(text[2]))
- {
- gindex = find_ksc5601(S_FROM_LVT(text[0], text[1], text[2]));
- if (gindex)
- composed = 3;
- else
- {
- if (try_decompose_jongseong(text[2], &jong1, &jong2))
- {
- gindex = find_ksc5601(S_FROM_LVT(text[0], text[1], jong1));
- composed = 3;
- }
- }
- }
- if (!composed && length >= 2 && IS_L_S(text[0]) && IS_V_S(text[1]))
- {
- gindex = find_ksc5601(S_FROM_LV(text[0], text[1]));
- if (gindex)
- composed = 2;
- }
-
- if (composed)
- {
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont, gindex);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- text += composed;
- length -= composed;
- }
-
- if (jong2)
- {
- int i;
-
- for (i = 0; (i < 3) && (__jamo_to_ksc5601[jong2 - LBASE][i] != 0); i++)
- {
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont,
- __jamo_to_ksc5601[jong2 - LBASE][i]);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- }
- if (i == 0)
- set_unknown_glyph (glyphs, n_glyphs, font, gindex, cluster_offset);
- }
-
- for (i = 0; i < length; i++)
- {
- int j;
-
- gindex = text[i];
- for (j = 0; (j < 3) && (__jamo_to_ksc5601[gindex - LBASE][j] != 0); j++)
- {
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont,
- __jamo_to_ksc5601[gindex - LBASE][j]);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- }
- if (j == 0)
- set_unknown_glyph (glyphs, n_glyphs, font, gindex, cluster_offset);
- }
- /* No glyph rendered yet; it means the empty syllable (ex. LFILL+VFILL) */
- if (n_prev_glyphs == *n_glyphs)
- {
- gindex = 0x2121;
- pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
- set_glyph (glyphs, *n_glyphs, font, subfont, gindex);
- glyphs->log_clusters[*n_glyphs] = cluster_offset;
- (*n_glyphs)++;
- }
-}
-
-static gboolean
-subfont_has_korean (PangoFont *font,
- PangoXSubfont subfont)
-{
- /* Check for syllables and for uncomposed jamos. We do this
- * very unscientifically - if we have the first glyph, we
- * assume we have them all. It might be better to try
- * for the last one, to account for lazy font designers.
- */
-
- if (!pango_x_has_glyph (font, PANGO_X_MAKE_GLYPH (subfont, 0xac00)))
- return FALSE;
- if (!pango_x_has_glyph (font, PANGO_X_MAKE_GLYPH (subfont, 0x1100)))
- return FALSE;
-
- return TRUE;
-}
-
-static gboolean
-find_subfont (PangoFont *font, char **charsets, int n_charsets,
- PangoXSubfont *subfont, RenderSyllableFunc *render_func)
-{
- int i;
- int n_subfonts;
- PangoXSubfont *subfonts;
- int *subfont_charsets;
-
- n_subfonts = pango_x_list_subfonts (font, charsets, n_charsets, &subfonts, &subfont_charsets);
-
- *subfont = 0;
-
- for (i=0; i<n_subfonts; i++)
- {
- if (strcmp (charsets[subfont_charsets[i]], "johabs-1") == 0 ||
- strcmp (charsets[subfont_charsets[i]], "johabsh-1") == 0)
- {
- *subfont = subfonts[i];
- *render_func = render_syllable_with_johabs;
- break;
- }
- else if (strcmp (charsets[subfont_charsets[i]], "johab-1") == 0)
- {
- *subfont = subfonts[i];
- *render_func = render_syllable_with_johab;
- break;
- }
- else if (strcmp (charsets[subfont_charsets[i]], "iso10646-1") == 0)
- {
- if (subfont_has_korean (font, subfonts[i]))
- {
- *subfont = subfonts[i];
- *render_func = render_syllable_with_iso10646;
- break;
- }
- }
- else if (strcmp (charsets[subfont_charsets[i]], "ksc5601.1992-3") == 0)
- {
- *subfont = subfonts[i];
- *render_func = render_syllable_with_ksx1001johab;
- break;
- }
- else if (strcmp (charsets[subfont_charsets[i]], "ksc5601.1987-0") == 0)
- {
- *subfont = subfonts[i];
- *render_func = render_syllable_with_ksc5601;
- break;
- }
- }
-
- g_free (subfonts);
- g_free (subfont_charsets);
-
- return (*subfont != 0);
-}
-
-static char *default_charset[] = {
- "johabs-1"
-};
-
-static char *secondary_charset[] = {
- "johab-1"
-};
-
-static char *fallback_charsets[] = {
- "iso10646-1",
- "ksc5601.1992-3",
- "ksc5601.1987-0"
-};
-
-static void
-hangul_engine_shape (PangoFont *font,
- const char *text,
- int length,
- PangoAnalysis *analysis,
- PangoGlyphString *glyphs)
-{
- PangoXSubfont subfont;
- RenderSyllableFunc render_func = NULL;
-
- int n_chars, n_glyphs;
- int i;
- const char *p, *start;
-
- gunichar jamos_static[8];
- guint max_jamos = G_N_ELEMENTS (jamos_static);
- gunichar *jamos = jamos_static;
- int n_jamos = 0;
-
- g_return_if_fail (font != NULL);
- g_return_if_fail (text != NULL);
- g_return_if_fail (length >= 0);
- g_return_if_fail (analysis != NULL);
-
- /* check available fonts. Always use a johab font if available;
- * otherwise use iso-10646 or KSC font depending on the ordering
- * of the fontlist.
- */
- if (!find_subfont (font, default_charset, G_N_ELEMENTS (default_charset), &subfont, &render_func))
- if (!find_subfont (font, secondary_charset, G_N_ELEMENTS (secondary_charset), &subfont, &render_func))
- if (!find_subfont (font, fallback_charsets, G_N_ELEMENTS (fallback_charsets), &subfont, &render_func))
- {
- n_chars = g_utf8_strlen (text, length);
- pango_x_fallback_shape (font, glyphs, text, n_chars);
- return;
- }
-
- n_chars = g_utf8_strlen (text, length);
- n_glyphs = 0;
- start = p = text;
- n_jamos = 0;
-
- for (i = 0; i < n_chars; i++)
- {
- gunichar wc;
-
- wc = g_utf8_get_char (p);
-
- /* Check syllable boundaries. */
- if (n_jamos)
- {
- gunichar prev = jamos[n_jamos - 1];
- if ((!IS_L (prev) && IS_S (wc)) ||
- (IS_T (prev) && IS_L (wc)) ||
- (IS_V (prev) && IS_L (wc)) ||
- (IS_T (prev) && IS_V (wc)))
- {
- /* Draw a syllable. */
-
- (*render_func) (font, subfont, jamos, n_jamos,
- glyphs, &n_glyphs, start - text);
- n_jamos = 0;
- start = p;
- }
- }
-
- if (n_jamos == max_jamos)
- {
- max_jamos += 3; /* at most 3 for each syllable code (L+V+T) */
- if (jamos == jamos_static)
- {
- jamos = g_new (gunichar, max_jamos);
- memcpy (jamos, jamos_static, n_jamos*sizeof(gunichar));
- }
- else
- jamos = g_renew (gunichar, jamos, max_jamos);
- }
-
- if (IS_S (wc))
- {
- jamos[n_jamos++] = L_FROM_S (wc);
- jamos[n_jamos++] = V_FROM_S (wc);
- if (S_HAS_T (wc))
- jamos[n_jamos++] = T_FROM_S (wc);
- }
- else if (IS_M (wc) && !n_jamos)
- ; /* ignore M's which do not follow syllables */
- else
- jamos[n_jamos++] = wc;
- p = g_utf8_next_char (p);
- }
-
- /* Draw the remaining Jamos. */
- if (n_jamos)
- (*render_func) (font, subfont, jamos, n_jamos,
- glyphs, &n_glyphs, start - text);
-
- if (jamos != jamos_static)
- g_free (jamos);
-}
-
-static PangoCoverage *
-hangul_engine_get_coverage (PangoFont *font,
- PangoLanguage *lang)
-{
- PangoCoverage *result = pango_coverage_new ();
- PangoXSubfont subfont;
- RenderSyllableFunc render_func = NULL;
- int i;
-
- /* An approximate implementation, please check and fix as necessary!
- * OWT 2 Feb 2000
- */
- if (find_subfont (font, default_charset, G_N_ELEMENTS (default_charset), &subfont, &render_func) ||
- find_subfont (font, secondary_charset, G_N_ELEMENTS (secondary_charset), &subfont, &render_func) ||
- find_subfont (font, fallback_charsets, G_N_ELEMENTS (fallback_charsets), &subfont, &render_func))
- {
- if (render_func == render_syllable_with_johabs ||
- render_func == render_syllable_with_johab)
- {
- for (i = 0x1100; i <= 0x11ff; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_EXACT);
-
- for (i = 0xac00; i <= 0xd7a3; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_EXACT);
-
- }
- else if (render_func == render_syllable_with_iso10646)
- {
- for (i = 0x1100; i <= 0x11ff; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_FALLBACK);
-
- for (i = 0xac00; i <= 0xd7a3; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_EXACT);
- }
- else if (render_func == render_syllable_with_ksc5601)
- {
- for (i = 0x1100; i <= 0x11ff; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_FALLBACK);
-
- for (i = 0xac00; i <= 0xd7a3; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_FALLBACK);
-
- for (i=0; i<KSC5601_HANGUL; i++)
- pango_coverage_set (result, __ksc5601_hangul_to_ucs[i], PANGO_COVERAGE_EXACT);
- }
- else if (render_func == render_syllable_with_ksx1001johab)
- {
- for (i = 0x1100; i <= 0x11ff; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_EXACT);
-
- for (i = 0xac00; i <= 0xd7a3; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_EXACT);
- }
- else
- g_assert_not_reached();
- }
-
- return result;
-}
-
-static PangoEngine *
-hangul_engine_x_new ()
-{
- PangoEngineShape *result;
-
- result = g_new (PangoEngineShape, 1);
-
- result->engine.id = SCRIPT_ENGINE_NAME;
- 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;
-
- return (PangoEngine *)result;
-}
-
-
-
-/* The following three functions provide the public module API for Pango
- */
-void
-PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines,
- int *n_engines)
-{
- *engines = script_engines;
- *n_engines = n_script_engines;
-}
-
-PangoEngine *
-PANGO_MODULE_ENTRY(load) (const char *id)
-{
- if (!strcmp (id, SCRIPT_ENGINE_NAME))
- return hangul_engine_x_new ();
- else
- return NULL;
-}
-
-void
-PANGO_MODULE_ENTRY(unload) (PangoEngine *engine)
-{
-}
diff --git a/modules/hangul/tables-johabfont.i b/modules/hangul/tables-johabfont.i
deleted file mode 100644
index 8204ea2e..00000000
--- a/modules/hangul/tables-johabfont.i
+++ /dev/null
@@ -1,608 +0,0 @@
-/* -*-c-*- */
-
-#define JOHAB_LBASE 0x0001
-#define JOHAB_VBASE 0x0137
-#define JOHAB_TBASE 0x0195
-
-#define JOHAB_FILLER 0x0000
-
-const static guint16 __choseong_johabfont_base[] =
-{
- /* the basic 19 CHOSEONGs */
- 0x0001, 0x000b, 0x0015, 0x001f, 0x0029,
- 0x0033, 0x003d, 0x0047, 0x0051, 0x005b,
- 0x0065, 0x006f, 0x0079, 0x0083, 0x008d,
- 0x0097, 0x00a1, 0x00ab, 0x00b5,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0x00c9, /* PIEUP-KIYEOK */
- 0,
- 0x00dd, /* PIEUP-TIKEUT */
- 0x00fb, /* PIEUP-SIOS */
- 0, 0, 0, 0, 0,
- 0x0119, /* PIEUP-CIEUC */
- 0, 0, 0,
- 0x00bf, /* KAPYEOUNPIEUP */
- 0,
- 0x00d3, /* SIOS-KIYEOK */
- 0,
- 0x00e7, /* SIOS-TIKEUT */
- 0, 0,
- 0x00f1, /* SIOS-PIEUP */
- 0, 0, 0,
- 0x0123, /* SIOS-CIEUC */
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0x0105, /* PANSIOS */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,
- 0x012d, /* YESIEUNG */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,
- 0x010f, /* YEORINHIEUH */
- 0, 0, 0, 0, 0, /* reserved */
- 0 /* CHOSEONG filler */
-};
-
-const static guint16 __jungseong_johabfont_base[] =
-{
- /* the basic 21 JUNGSEONGs */
- 0x0137, 0x013a, 0x013d, 0x0140, 0x0143,
- 0x0146, 0x0149, 0x014c, 0x014f, 0x0153,
- 0x0157, 0x015b, 0x015f, 0x0163, 0x0166,
- 0x0169, 0x016c, 0x016f, 0x0172, 0x0176,
- 0x017a,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,
- 0x017d, /* YO-YA */
- 0x0180, /* YO-YAE */
- 0, 0,
- 0x0183, /* YO-I */
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0x0186, /* YU-YEO */
- 0x0189, /* YU-YE */
- 0,
- 0x018c, /* YU-I */
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0x018f, /* ARAEA */
- 0, 0,
- 0x0192, /* ARAEA-I */
- 0,
- 0, 0, 0, 0 /* reserved */
-};
-
-const static gint16 __jongseong_johabfont_base[] =
-{
- 0, /* (INTERNAL) JONGSEONG filler */
- /* The basic 27 (28 - jongseong filter) CHONGSEONGs */
- 0x0195, 0x0199, 0x019d, 0x01a1, 0x01a5,
- 0x01a9, 0x01ad, 0x01b1, 0x01b5, 0x01b9,
- 0x01bd, 0x01c1, 0x01c5, 0x01c9, 0x01cd,
- 0x01d1, 0x01d5, 0x01d9, 0x01dd, 0x01e1,
- 0x01e5, 0x01e9, 0x01ed, 0x01f1, 0x01f5,
- 0x01f9, 0x01fd,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0,
- 0x0201, /* RIEUL-YEORINHIEUH */
- 0x0205, /* MIEUM-KIYEOK */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,
- 0x020d, /* YESIEUNG */
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0x0209, /* YEORINHIEUH */
- 0, 0, 0, 0, 0, 0 /* reserved */
-};
-
-/*
- * This table represents how many glyphs are available for each
- * JUNGSEONGs in johab-font -- some are 3 and some are 4.
- */
-const static gint __johabfont_jungseong_kind[] =
-{
- /* The basic 21 JUNGSEONGs. */
- 3, 3, 3, 3, 3, 3, 3, 3, 4, 4,
- 4, 4, 4, 3, 3, 3, 3, 3, 4, 4,
- 3,
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0,
- 3, /* YO-YA */
- 3, /* YO-YAE */
- 0, 0,
- 3, /* YO-I */
- 0, 0, 0, 0, 0, 0, 0, 0,
- 3, /* YU-YEO */
- 3, /* YU-YE */
- 0,
- 3, /* YU-I */
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 3, /* ARAEA */
- 0, 0,
- 3, /* ARAEA-I */
- 0,
- 0, 0, 0, 0 /* reserved */
-};
-
-const static gint __choseong_map_1[] = {
- /* The basic 21 JUNGSEONGs. */
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 3,
- 3, 3, 1, 2, 4, 4, 4, 2, 1, 3,
- 0,
-
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- 3, /* YO-YA */
- 3, /* YO-YAE */
- -1, -1,
- 3, /* YO-I */
- -1, -1, -1, -1, -1, -1, -1, -1,
- 4, /* YU-YEO */
- 4, /* YU-YE */
- -1,
- 4, /* YU-I */
- -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 2, /* ARAEA */
- -1, -1,
- 4, /* ARAEA-I */
- -1,
- -1, -1, -1, -1 /* reserved */
-};
-
-const static gint __choseong_map_2[] = {
- /* The basic 21 JUNGSEONGs. */
- 5, 5, 5, 5, 5, 5, 5, 5, 6, 8,
- 8, 8, 6, 7, 9, 9, 9, 7, 6, 8,
- 5,
-
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- 8, /* YO-YA */
- 8, /* YO-YAE */
- -1, -1,
- 8, /* YO-I */
- -1, -1, -1, -1, -1, -1, -1, -1,
- 9, /* YU-YEO */
- 9, /* YU-YE */
- -1,
- 9, /* YU-I */
- -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 6, /* ARAEA */
- -1, -1,
- 9, /* ARAEA-I */
- -1,
- -1, -1, -1, -1 /* reserved */
-};
-
-const static gint __johabfont_jongseong_kind[] =
-{
- 0, /* (internal) CHONGSEONG filler */
- /* The basic 27 (28 - jongseong filter) CHONGSEONGs */
- 1, 1, 1, 2, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1,
-
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1,
- 1, /* YEORINHIEUH */
- 1, /* MIEUM-KIYEOK */
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1,
- 1, /* YESIEUNG */
- -1, -1, -1, -1, -1, -1, -1, -1,
- 1, /* YEORINHIEUH */
- -1, -1, -1, -1, -1, -1 /* reserved */
-};
-
-const static gint __jongseong_map[] =
-{
- /* The basic 21 JUNGSEONGs. */
- 0, 2, 0, 2, 1, 2, 1, 2, 3, 0,
- 0, 0, 3, 3, 1, 1, 1, 3, 3, 0,
- 1,
-
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- 0, /* YO-YA */
- 0, /* YO-YAE */
- -1, -1,
- 1, /* YO-I */
- -1, -1, -1, -1, -1, -1, -1, -1,
- 1, /* YU-YEO */
- 1, /* YU-YE */
- -1,
- 1, /* YU-I */
- -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 3, /* ARAEA */
- -1, -1,
- 0, /* ARAEA-I */
- -1,
- -1, -1, -1, -1 /* reserved */
-};
-
-
-/*
- * Jamos
- */
-
-/* from the CHOSEONG section -- mordern */
-#define JOHAB_KIYEOK 0x0002
-#define JOHAB_SSANGKIYEOK 0x000c
-#define JOHAB_NIEUN 0x0016
-#define JOHAB_TIKEUT 0x0020
-#define JOHAB_SSANGTIKEUT 0x002a
-#define JOHAB_RIEUL 0x0034
-#define JOHAB_MIEUM 0x003e
-#define JOHAB_PIEUP 0x0048
-#define JOHAB_SSANGPIEUP 0x0052
-#define JOHAB_SIOS 0x005c
-#define JOHAB_SSANGSIOS 0x0066
-#define JOHAB_IEUNG 0x0070
-#define JOHAB_CIEUC 0x007a
-#define JOHAB_SSANGCIEUC 0x0084
-#define JOHAB_CHIEUCH 0x008e
-#define JOHAB_KHIEUKH 0x0098
-#define JOHAB_THIEUTH 0x00a2
-#define JOHAB_PHIEUPH 0x00ac
-#define JOHAB_HIEUH 0x00b6
-
-/* from the CHOSEONG section -- extra */
-#define JOHAB_KAPYEOUNPIEUP 0x00c0
-#define JOHAB_PIEUP_KIYEOK 0x00ca
-#define JOHAB_SIOS_KIYEOK 0x00d4
-#define JOHAB_PIEUP_TIKEUT 0x00de
-#define JOHAB_SIOS_TIKEUT 0x00e8
-#define JOHAB_SIOS_PIEUP 0x00f2
-#define JOHAB_PIEUP_SIOS 0x00fc
-#define JOHAB_PANSIOS 0x0106
-#define JOHAB_YESIEUNG 0x0110
-#define JOHAB_PIEUP_CIEUC 0x011a
-#define JOHAB_SIOS_CIEUC 0x0124
-#define JOHAB_YEORINHIEUH 0x012e
-
-/* from the JONGSEONG section -- modern */
-#define JOHAB_KIYEOK_SIOS 0x019d
-#define JOHAB_NIEUN_CIEUC 0x01a5
-#define JOHAB_NIEUN_HIEUH 0x01a9
-#define JOHAB_RIEUL_KIYEOK 0x01b5
-#define JOHAB_RIEUL_MIEUM 0x01b9
-#define JOHAB_RIEUL_PIEUP 0x01bd
-#define JOHAB_RIEUL_SIOS 0x01c1
-#define JOHAB_RIEUL_THIEUTH 0x01c5
-#define JOHAB_RIEUL_PHIEUPH 0x01c9
-#define JOHAB_RIEUL_HIEUH 0x01cd
-
-/* from the JONGSEONG section -- extra */
-#define JOHAB_RIEUL_YEORINHIEUH 0x0201
-#define JOHAB_MIEUM_KIYEOK 0x0205
-
-/* from the JUNGSEONG section -- modern */
-#define JOHAB_A 0x0137
-#define JOHAB_AE 0x013a
-#define JOHAB_YA 0x013d
-#define JOHAB_YAE 0x0140
-#define JOHAB_EO 0x0143
-#define JOHAB_E 0x0146
-#define JOHAB_YEO 0x0149
-#define JOHAB_YE 0x014c
-#define JOHAB_O 0x014f
-#define JOHAB_WA 0x0153
-#define JOHAB_WAE 0x0157
-#define JOHAB_OE 0x015b
-#define JOHAB_YO 0x015f
-#define JOHAB_U 0x0163
-#define JOHAB_WEO 0x0166
-#define JOHAB_WE 0x0169
-#define JOHAB_WI 0x016c
-#define JOHAB_YU 0x016f
-#define JOHAB_EU 0x0172
-#define JOHAB_YI 0x0176
-#define JOHAB_I 0x017a
-
-/* from the JUNGSEONG section -- extra */
-#define JOHAB_YO_YA 0x017d
-#define JOHAB_YO_YAE 0x0180
-#define JOHAB_YO_I 0x0183
-#define JOHAB_YU_YEO 0x0186
-#define JOHAB_YU_YE 0x0189
-#define JOHAB_YU_I 0x018c
-#define JOHAB_ARAEA 0x018f
-#define JOHAB_ARAEA_I 0x0192
-
-/*
- * Some jamos are not representable with KSC5601.
- * Choose similar modern jamos, but different with glyphs.
- */
-#define JOHAB_CHITUEUMSIOS 0x005e
-#define JOHAB_CEONGCHITUEUMSIOS 0x0060
-#define JOHAB_CHITUEUMCIEUC 0x007c
-#define JOHAB_CEONGEUMCIEUC 0x007e
-#define JOHAB_CHITUEUMCHIEUCH 0x0090
-#define JOHAB_CEONGEUMCHIEUCH 0x0092
-
-static guint16 __jamo_to_johabfont[0x100][3] =
-{
- /*
- * CHOSEONG
- */
- /* CHOSEONG 0x1100 -- 0x1112 : matched to each ksc5601 Jamos extactly. */
- {JOHAB_KIYEOK, 0, 0},
- {JOHAB_SSANGKIYEOK, 0, 0},
- {JOHAB_NIEUN, 0, 0},
- {JOHAB_TIKEUT, 0, 0},
- {JOHAB_SSANGTIKEUT, 0, 0},
- {JOHAB_RIEUL, 0, 0},
- {JOHAB_MIEUM, 0, 0},
- {JOHAB_PIEUP, 0, 0},
- {JOHAB_SSANGPIEUP, 0, 0},
- {JOHAB_SIOS, 0, 0},
- {JOHAB_SSANGSIOS, 0, 0},
- {JOHAB_IEUNG, 0, 0},
- {JOHAB_CIEUC, 0, 0},
- {JOHAB_SSANGCIEUC, 0, 0},
- {JOHAB_CHIEUCH, 0, 0},
- {JOHAB_KHIEUKH, 0, 0},
- {JOHAB_THIEUTH, 0, 0},
- {JOHAB_PHIEUPH, 0, 0},
- {JOHAB_HIEUH, 0, 0},
- /* Some of the following are representable as a glyph, the others not. */
- {JOHAB_NIEUN, JOHAB_KIYEOK, 0},
- {JOHAB_NIEUN, JOHAB_NIEUN, 0},
- {JOHAB_NIEUN, JOHAB_TIKEUT, 0},
- {JOHAB_NIEUN, JOHAB_PIEUP, 0},
- {JOHAB_TIKEUT, JOHAB_KIYEOK, 0},
- {JOHAB_RIEUL, JOHAB_NIEUN, 0},
- {JOHAB_RIEUL, JOHAB_RIEUL, 0},
- {JOHAB_RIEUL_HIEUH, 0, 0},
- {JOHAB_RIEUL, JOHAB_IEUNG, 0},
- {JOHAB_MIEUM, JOHAB_PIEUP, 0},
- {JOHAB_MIEUM, JOHAB_IEUNG, 0}, /* KAPYEOUNMIEUM */
- {JOHAB_PIEUP_KIYEOK, 0, 0},
- {JOHAB_PIEUP, JOHAB_NIEUN, 0},
- {JOHAB_PIEUP_TIKEUT, 0, 0},
- {JOHAB_PIEUP_SIOS, 0, 0},
- {JOHAB_PIEUP, JOHAB_SIOS, JOHAB_KIYEOK},
- {JOHAB_PIEUP, JOHAB_SIOS, JOHAB_TIKEUT},
- {JOHAB_PIEUP, JOHAB_SIOS, JOHAB_PIEUP},
- {JOHAB_PIEUP, JOHAB_SIOS, JOHAB_SIOS},
- {JOHAB_PIEUP, JOHAB_SIOS, JOHAB_CIEUC},
- {JOHAB_PIEUP_CIEUC, 0, 0},
- {JOHAB_PIEUP, JOHAB_CHIEUCH, 0},
- {JOHAB_PIEUP, JOHAB_THIEUTH, 0},
- {JOHAB_PIEUP, JOHAB_PHIEUPH, 0},
- {JOHAB_KAPYEOUNPIEUP, 0, 0},
- {JOHAB_SSANGPIEUP, JOHAB_IEUNG, 0}, /* KAPYEOUNSSANGPIEUP */
- {JOHAB_SIOS_KIYEOK, 0, 0},
- {JOHAB_SIOS, JOHAB_NIEUN, 0},
- {JOHAB_SIOS_TIKEUT, 0, 0},
- {JOHAB_SIOS, JOHAB_RIEUL, 0},
- {JOHAB_SIOS, JOHAB_MIEUM, 0},
- {JOHAB_SIOS_PIEUP, 0, 0},
- {JOHAB_SIOS, JOHAB_PIEUP, JOHAB_KIYEOK},
- {JOHAB_SIOS, JOHAB_SIOS, JOHAB_SIOS},
- {JOHAB_SIOS, JOHAB_IEUNG, 0},
- {JOHAB_SIOS_CIEUC, 0, 0},
- {JOHAB_SIOS, JOHAB_CHIEUCH, 0},
- {JOHAB_SIOS, JOHAB_KHIEUKH, 0},
- {JOHAB_SIOS, JOHAB_THIEUTH, 0},
- {JOHAB_SIOS, JOHAB_PHIEUPH, 0},
- {JOHAB_SIOS, JOHAB_HIEUH, 0},
- {JOHAB_CHITUEUMSIOS, 0, 0},
- {JOHAB_CHITUEUMSIOS, JOHAB_CHITUEUMSIOS, 0},
- {JOHAB_CEONGCHITUEUMSIOS, 0, 0},
- {JOHAB_CEONGCHITUEUMSIOS, JOHAB_CEONGCHITUEUMSIOS, 0},
- {JOHAB_PANSIOS, 0, 0},
- {JOHAB_IEUNG, JOHAB_KIYEOK, 0},
- {JOHAB_IEUNG, JOHAB_TIKEUT, 0},
- {JOHAB_IEUNG, JOHAB_MIEUM, 0},
- {JOHAB_IEUNG, JOHAB_PIEUP, 0},
- {JOHAB_IEUNG, JOHAB_SIOS, 0},
- {JOHAB_IEUNG, JOHAB_PANSIOS, 0},
- {JOHAB_IEUNG, JOHAB_IEUNG, 0},
- {JOHAB_IEUNG, JOHAB_CIEUC, 0},
- {JOHAB_IEUNG, JOHAB_CHIEUCH, 0},
- {JOHAB_IEUNG, JOHAB_THIEUTH, 0},
- {JOHAB_IEUNG, JOHAB_PHIEUPH, 0},
- {JOHAB_YESIEUNG, 0, 0},
- {JOHAB_CIEUC, JOHAB_IEUNG, 0},
- {JOHAB_CHITUEUMCIEUC, 0, 0},
- {JOHAB_CHITUEUMCIEUC, JOHAB_CHITUEUMCIEUC, 0},
- {JOHAB_CEONGEUMCIEUC, 0, 0},
- {JOHAB_CEONGEUMCIEUC, JOHAB_CEONGEUMCIEUC, 0},
- {JOHAB_CHIEUCH, JOHAB_KHIEUKH, 0},
- {JOHAB_CHIEUCH, JOHAB_HIEUH, 0},
- {JOHAB_CHITUEUMCHIEUCH, 0, 0},
- {JOHAB_CEONGEUMCHIEUCH, 0, 0},
- {JOHAB_PHIEUPH, JOHAB_PIEUP, 0},
- {JOHAB_PHIEUPH, JOHAB_IEUNG, 0}, /* KAPYEOUNPHIEUPH */
- {JOHAB_HIEUH, JOHAB_HIEUH, 0},
- {JOHAB_YEORINHIEUH, 0, 0},
- /* 0x115A ~ 0x115E -- reserved */
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- /* CHOSEONG FILLER */
- {0, 0, 0},
-
- /*
- * JUNGSEONG
- */
- /*
- * JUNGSEONG
- */
- {0, 0, 0}, /* JUNGSEONG FILL */
- /* JUNGSEONG 0x1161 -- 0x1175 : matched to each ksc5601 Jamos extactly. */
- {JOHAB_A, 0, 0},
- {JOHAB_AE, 0, 0},
- {JOHAB_YA, 0, 0},
- {JOHAB_YAE, 0, 0},
- {JOHAB_EO, 0, 0},
- {JOHAB_E, 0, 0},
- {JOHAB_YEO, 0, 0},
- {JOHAB_YE, 0, 0},
- {JOHAB_O, 0, 0},
- {JOHAB_WA, 0, 0},
- {JOHAB_WAE, 0, 0},
- {JOHAB_OE, 0, 0},
- {JOHAB_YO, 0, 0},
- {JOHAB_U, 0, 0},
- {JOHAB_WEO, 0, 0},
- {JOHAB_WE, 0, 0},
- {JOHAB_WI, 0, 0},
- {JOHAB_YU, 0, 0},
- {JOHAB_EU, 0, 0},
- {JOHAB_YI, 0, 0},
- {JOHAB_I, 0, 0},
- /* Some of the following are representable as a glyph, the others not. */
- {JOHAB_A, JOHAB_O, 0},
- {JOHAB_A, JOHAB_U, 0},
- {JOHAB_YA, JOHAB_O, 0},
- {JOHAB_YA, JOHAB_YO, 0},
- {JOHAB_EO, JOHAB_O, 0},
- {JOHAB_EO, JOHAB_U, 0},
- {JOHAB_EO, JOHAB_EU, 0},
- {JOHAB_YEO, JOHAB_O, 0},
- {JOHAB_YEO, JOHAB_U, 0},
- {JOHAB_O, JOHAB_EO, 0},
- {JOHAB_O, JOHAB_E, 0},
- {JOHAB_O, JOHAB_YE, 0},
- {JOHAB_O, JOHAB_O, 0},
- {JOHAB_O, JOHAB_U, 0},
- {JOHAB_YO_YA, 0, 0},
- {JOHAB_YO_YAE, 0, 0},
- {JOHAB_YO, JOHAB_YEO, 0},
- {JOHAB_YO, JOHAB_O, 0},
- {JOHAB_YO_I, 0, 0},
- {JOHAB_U, JOHAB_A, 0},
- {JOHAB_U, JOHAB_AE, 0},
- {JOHAB_U, JOHAB_EO, JOHAB_EU},
- {JOHAB_U, JOHAB_YE, 0},
- {JOHAB_U, JOHAB_U, 0},
- {JOHAB_YU, JOHAB_A, 0},
- {JOHAB_YU, JOHAB_EO, 0},
- {JOHAB_YU, JOHAB_E, 0},
- {JOHAB_YU_YEO, 0, 0},
- {JOHAB_YU_YE, 0, 0},
- {JOHAB_YU, JOHAB_U, 0},
- {JOHAB_YU_I, 0, 0},
- {JOHAB_EU, JOHAB_U, 0},
- {JOHAB_EU, JOHAB_EU, 0},
- {JOHAB_YI, JOHAB_U, 0},
- {JOHAB_I, JOHAB_A, 0},
- {JOHAB_I, JOHAB_YA, 0},
- {JOHAB_I, JOHAB_O, 0},
- {JOHAB_I, JOHAB_U, 0},
- {JOHAB_I, JOHAB_EU, 0},
- {JOHAB_I, JOHAB_ARAEA, 0},
- {JOHAB_ARAEA, 0, 0},
- {JOHAB_ARAEA, JOHAB_EO, 0},
- {JOHAB_ARAEA, JOHAB_U, 0},
- {JOHAB_ARAEA, JOHAB_I, 0},
- {JOHAB_ARAEA, JOHAB_ARAEA, 0},
- /* 0x11A3 ~ 0x11A7 -- reserved */
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0}, /* (INTERNAL) JONGSEONG FILL */
-
- /*
- * JONGSEONG
- */
- {JOHAB_KIYEOK, 0, 0},
- {JOHAB_SSANGKIYEOK, 0, 0},
- {JOHAB_KIYEOK_SIOS, 0, 0},
- {JOHAB_NIEUN, 0, 0},
- {JOHAB_NIEUN_CIEUC, 0, 0},
- {JOHAB_NIEUN_HIEUH, 0, 0},
- {JOHAB_TIKEUT, 0, 0},
- {JOHAB_RIEUL, 0, 0},
- {JOHAB_RIEUL_KIYEOK, 0, 0},
- {JOHAB_RIEUL_MIEUM, 0, 0},
- {JOHAB_RIEUL_PIEUP, 0, 0},
- {JOHAB_RIEUL_SIOS, 0, 0},
- {JOHAB_RIEUL, JOHAB_TIKEUT, 0},
- {JOHAB_RIEUL_PHIEUPH, 0, 0},
- {JOHAB_RIEUL_HIEUH, 0, 0},
- {JOHAB_MIEUM, 0, 0},
- {JOHAB_PIEUP, 0, 0},
- {JOHAB_PIEUP_SIOS, 0, 0},
- {JOHAB_SIOS, 0, 0},
- {JOHAB_SSANGSIOS, 0, 0},
- {JOHAB_IEUNG, 0, 0},
- {JOHAB_CIEUC, 0, 0},
- {JOHAB_CHIEUCH, 0, 0},
- {JOHAB_KHIEUKH, 0, 0},
- {JOHAB_THIEUTH, 0, 0},
- {JOHAB_PHIEUPH, 0, 0},
- {JOHAB_HIEUH, 0, 0},
- {JOHAB_KIYEOK, JOHAB_RIEUL, 0},
- {JOHAB_KIYEOK, JOHAB_SIOS, JOHAB_KIYEOK},
- {JOHAB_NIEUN, JOHAB_KIYEOK, 0},
- {JOHAB_NIEUN, JOHAB_TIKEUT, 0},
- {JOHAB_NIEUN, JOHAB_SIOS, 0},
- {JOHAB_NIEUN, JOHAB_PANSIOS, 0},
- {JOHAB_NIEUN, JOHAB_THIEUTH, 0},
- {JOHAB_TIKEUT, JOHAB_KIYEOK, 0},
- {JOHAB_TIKEUT, JOHAB_RIEUL, 0},
- {JOHAB_RIEUL, JOHAB_KIYEOK, JOHAB_SIOS},
- {JOHAB_RIEUL, JOHAB_NIEUN, 0},
- {JOHAB_RIEUL, JOHAB_TIKEUT, 0},
- {JOHAB_RIEUL, JOHAB_TIKEUT, JOHAB_HIEUH},
- {JOHAB_RIEUL, JOHAB_RIEUL, 0},
- {JOHAB_RIEUL, JOHAB_MIEUM, JOHAB_KIYEOK},
- {JOHAB_RIEUL, JOHAB_MIEUM, JOHAB_SIOS},
- {JOHAB_RIEUL, JOHAB_PIEUP, JOHAB_SIOS},
- {JOHAB_RIEUL, JOHAB_PHIEUPH, JOHAB_HIEUH},
- {JOHAB_RIEUL, JOHAB_KAPYEOUNPIEUP, 0},
- {JOHAB_RIEUL, JOHAB_SIOS, JOHAB_SIOS},
- {JOHAB_RIEUL, JOHAB_PANSIOS, 0},
- {JOHAB_RIEUL, JOHAB_KHIEUKH, 0},
- {JOHAB_RIEUL_YEORINHIEUH, 0, 0},
- {JOHAB_MIEUM, JOHAB_KIYEOK, 0},
- {JOHAB_MIEUM, JOHAB_RIEUL, 0},
- {JOHAB_MIEUM, JOHAB_PIEUP, 0},
- {JOHAB_MIEUM, JOHAB_SIOS, 0},
- {JOHAB_MIEUM, JOHAB_SIOS, JOHAB_SIOS},
- {JOHAB_MIEUM, JOHAB_PANSIOS, 0},
- {JOHAB_MIEUM, JOHAB_CHIEUCH, 0},
- {JOHAB_MIEUM, JOHAB_HIEUH, 0},
- {JOHAB_MIEUM, JOHAB_IEUNG, 0}, /* KAPYEOUNMIEUM */
- {JOHAB_PIEUP, JOHAB_RIEUL, 0},
- {JOHAB_PIEUP, JOHAB_PHIEUPH, 0},
- {JOHAB_PIEUP, JOHAB_HIEUH, 0},
- {JOHAB_KAPYEOUNPIEUP, 0, 0},
- {JOHAB_SIOS_KIYEOK, 0, 0},
- {JOHAB_SIOS_TIKEUT, 0, 0},
- {JOHAB_SIOS, JOHAB_RIEUL, 0},
- {JOHAB_SIOS_PIEUP, 0, 0},
- {JOHAB_PANSIOS, 0, 0},
- {JOHAB_IEUNG, JOHAB_KIYEOK, 0},
- {JOHAB_IEUNG, JOHAB_KIYEOK, JOHAB_KIYEOK},
- {JOHAB_IEUNG, JOHAB_IEUNG, 0},
- {JOHAB_IEUNG, JOHAB_KHIEUKH, 0},
- {JOHAB_YESIEUNG, 0, 0},
- {JOHAB_YESIEUNG, JOHAB_SIOS, 0},
- {JOHAB_YESIEUNG, JOHAB_PANSIOS, 0},
- {JOHAB_PHIEUPH, JOHAB_PIEUP, 0},
- {JOHAB_PHIEUPH, JOHAB_IEUNG, 0}, /* KAPYEOUNPHIEUPH */
- {JOHAB_HIEUH, JOHAB_NIEUN, 0},
- {JOHAB_HIEUH, JOHAB_RIEUL, 0},
- {JOHAB_HIEUH, JOHAB_MIEUM, 0},
- {JOHAB_HIEUH, JOHAB_PIEUP, 0},
- {JOHAB_YEORINHIEUH, 0, 0},
- /* reserved */
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0},
- {0, 0, 0}
-};
-
diff --git a/modules/hangul/tables-ksc5601.i b/modules/hangul/tables-ksc5601.i
deleted file mode 100644
index d457bd25..00000000
--- a/modules/hangul/tables-ksc5601.i
+++ /dev/null
@@ -1,361 +0,0 @@
-/* -*-c-*- */
-
-/* ks c 5601 HANGUL syllables -> UCS2 table
- *
- * This table is a part of the GNU C library:
- *
- * Copyright (C) 1998 Free Software Foundation, Inc.
- */
-
-#define KSC5601_HANGUL 2350
-#define KSC5601_HANJA 4888
-#define KSC5601_SYMBOL 986
-
-static guint16 __ksc5601_hangul_to_ucs[KSC5601_HANGUL]=
-{
- 0xac00, 0xac01, 0xac04, 0xac07, 0xac08, 0xac09, 0xac0a, 0xac10,
- 0xac11, 0xac12, 0xac13, 0xac14, 0xac15, 0xac16, 0xac17, 0xac19,
- 0xac1a, 0xac1b, 0xac1c, 0xac1d, 0xac20, 0xac24, 0xac2c, 0xac2d,
- 0xac2f, 0xac30, 0xac31, 0xac38, 0xac39, 0xac3c, 0xac40, 0xac4b,
- 0xac4d, 0xac54, 0xac58, 0xac5c, 0xac70, 0xac71, 0xac74, 0xac77,
- 0xac78, 0xac7a, 0xac80, 0xac81, 0xac83, 0xac84, 0xac85, 0xac86,
- 0xac89, 0xac8a, 0xac8b, 0xac8c, 0xac90, 0xac94, 0xac9c, 0xac9d,
- 0xac9f, 0xaca0, 0xaca1, 0xaca8, 0xaca9, 0xacaa, 0xacac, 0xacaf,
- 0xacb0, 0xacb8, 0xacb9, 0xacbb, 0xacbc, 0xacbd, 0xacc1, 0xacc4,
- 0xacc8, 0xaccc, 0xacd5, 0xacd7, 0xace0, 0xace1, 0xace4, 0xace7,
- 0xace8, 0xacea, 0xacec, 0xacef, 0xacf0, 0xacf1, 0xacf3, 0xacf5,
- 0xacf6, 0xacfc, 0xacfd, 0xad00, 0xad04, 0xad06, 0xad0c, 0xad0d,
- 0xad0f, 0xad11, 0xad18, 0xad1c, 0xad20, 0xad29, 0xad2c, 0xad2d,
- 0xad34, 0xad35, 0xad38, 0xad3c, 0xad44, 0xad45, 0xad47, 0xad49,
- 0xad50, 0xad54, 0xad58, 0xad61, 0xad63, 0xad6c, 0xad6d, 0xad70,
- 0xad73, 0xad74, 0xad75, 0xad76, 0xad7b, 0xad7c, 0xad7d, 0xad7f,
- 0xad81, 0xad82, 0xad88, 0xad89, 0xad8c, 0xad90, 0xad9c, 0xad9d,
- 0xada4, 0xadb7, 0xadc0, 0xadc1, 0xadc4, 0xadc8, 0xadd0, 0xadd1,
- 0xadd3, 0xaddc, 0xade0, 0xade4, 0xadf8, 0xadf9, 0xadfc, 0xadff,
- 0xae00, 0xae01, 0xae08, 0xae09, 0xae0b, 0xae0d, 0xae14, 0xae30,
- 0xae31, 0xae34, 0xae37, 0xae38, 0xae3a, 0xae40, 0xae41, 0xae43,
- 0xae45, 0xae46, 0xae4a, 0xae4c, 0xae4d, 0xae4e, 0xae50, 0xae54,
- 0xae56, 0xae5c, 0xae5d, 0xae5f, 0xae60, 0xae61, 0xae65, 0xae68,
- 0xae69, 0xae6c, 0xae70, 0xae78, 0xae79, 0xae7b, 0xae7c, 0xae7d,
- 0xae84, 0xae85, 0xae8c, 0xaebc, 0xaebd, 0xaebe, 0xaec0, 0xaec4,
- 0xaecc, 0xaecd, 0xaecf, 0xaed0, 0xaed1, 0xaed8, 0xaed9, 0xaedc,
- 0xaee8, 0xaeeb, 0xaeed, 0xaef4, 0xaef8, 0xaefc, 0xaf07, 0xaf08,
- 0xaf0d, 0xaf10, 0xaf2c, 0xaf2d, 0xaf30, 0xaf32, 0xaf34, 0xaf3c,
- 0xaf3d, 0xaf3f, 0xaf41, 0xaf42, 0xaf43, 0xaf48, 0xaf49, 0xaf50,
- 0xaf5c, 0xaf5d, 0xaf64, 0xaf65, 0xaf79, 0xaf80, 0xaf84, 0xaf88,
- 0xaf90, 0xaf91, 0xaf95, 0xaf9c, 0xafb8, 0xafb9, 0xafbc, 0xafc0,
- 0xafc7, 0xafc8, 0xafc9, 0xafcb, 0xafcd, 0xafce, 0xafd4, 0xafdc,
- 0xafe8, 0xafe9, 0xaff0, 0xaff1, 0xaff4, 0xaff8, 0xb000, 0xb001,
- 0xb004, 0xb00c, 0xb010, 0xb014, 0xb01c, 0xb01d, 0xb028, 0xb044,
- 0xb045, 0xb048, 0xb04a, 0xb04c, 0xb04e, 0xb053, 0xb054, 0xb055,
- 0xb057, 0xb059, 0xb05d, 0xb07c, 0xb07d, 0xb080, 0xb084, 0xb08c,
- 0xb08d, 0xb08f, 0xb091, 0xb098, 0xb099, 0xb09a, 0xb09c, 0xb09f,
- 0xb0a0, 0xb0a1, 0xb0a2, 0xb0a8, 0xb0a9, 0xb0ab, 0xb0ac, 0xb0ad,
- 0xb0ae, 0xb0af, 0xb0b1, 0xb0b3, 0xb0b4, 0xb0b5, 0xb0b8, 0xb0bc,
- 0xb0c4, 0xb0c5, 0xb0c7, 0xb0c8, 0xb0c9, 0xb0d0, 0xb0d1, 0xb0d4,
- 0xb0d8, 0xb0e0, 0xb0e5, 0xb108, 0xb109, 0xb10b, 0xb10c, 0xb110,
- 0xb112, 0xb113, 0xb118, 0xb119, 0xb11b, 0xb11c, 0xb11d, 0xb123,
- 0xb124, 0xb125, 0xb128, 0xb12c, 0xb134, 0xb135, 0xb137, 0xb138,
- 0xb139, 0xb140, 0xb141, 0xb144, 0xb148, 0xb150, 0xb151, 0xb154,
- 0xb155, 0xb158, 0xb15c, 0xb160, 0xb178, 0xb179, 0xb17c, 0xb180,
- 0xb182, 0xb188, 0xb189, 0xb18b, 0xb18d, 0xb192, 0xb193, 0xb194,
- 0xb198, 0xb19c, 0xb1a8, 0xb1cc, 0xb1d0, 0xb1d4, 0xb1dc, 0xb1dd,
- 0xb1df, 0xb1e8, 0xb1e9, 0xb1ec, 0xb1f0, 0xb1f9, 0xb1fb, 0xb1fd,
- 0xb204, 0xb205, 0xb208, 0xb20b, 0xb20c, 0xb214, 0xb215, 0xb217,
- 0xb219, 0xb220, 0xb234, 0xb23c, 0xb258, 0xb25c, 0xb260, 0xb268,
- 0xb269, 0xb274, 0xb275, 0xb27c, 0xb284, 0xb285, 0xb289, 0xb290,
- 0xb291, 0xb294, 0xb298, 0xb299, 0xb29a, 0xb2a0, 0xb2a1, 0xb2a3,
- 0xb2a5, 0xb2a6, 0xb2aa, 0xb2ac, 0xb2b0, 0xb2b4, 0xb2c8, 0xb2c9,
- 0xb2cc, 0xb2d0, 0xb2d2, 0xb2d8, 0xb2d9, 0xb2db, 0xb2dd, 0xb2e2,
- 0xb2e4, 0xb2e5, 0xb2e6, 0xb2e8, 0xb2eb, 0xb2ec, 0xb2ed, 0xb2ee,
- 0xb2ef, 0xb2f3, 0xb2f4, 0xb2f5, 0xb2f7, 0xb2f8, 0xb2f9, 0xb2fa,
- 0xb2fb, 0xb2ff, 0xb300, 0xb301, 0xb304, 0xb308, 0xb310, 0xb311,
- 0xb313, 0xb314, 0xb315, 0xb31c, 0xb354, 0xb355, 0xb356, 0xb358,
- 0xb35b, 0xb35c, 0xb35e, 0xb35f, 0xb364, 0xb365, 0xb367, 0xb369,
- 0xb36b, 0xb36e, 0xb370, 0xb371, 0xb374, 0xb378, 0xb380, 0xb381,
- 0xb383, 0xb384, 0xb385, 0xb38c, 0xb390, 0xb394, 0xb3a0, 0xb3a1,
- 0xb3a8, 0xb3ac, 0xb3c4, 0xb3c5, 0xb3c8, 0xb3cb, 0xb3cc, 0xb3ce,
- 0xb3d0, 0xb3d4, 0xb3d5, 0xb3d7, 0xb3d9, 0xb3db, 0xb3dd, 0xb3e0,
- 0xb3e4, 0xb3e8, 0xb3fc, 0xb410, 0xb418, 0xb41c, 0xb420, 0xb428,
- 0xb429, 0xb42b, 0xb434, 0xb450, 0xb451, 0xb454, 0xb458, 0xb460,
- 0xb461, 0xb463, 0xb465, 0xb46c, 0xb480, 0xb488, 0xb49d, 0xb4a4,
- 0xb4a8, 0xb4ac, 0xb4b5, 0xb4b7, 0xb4b9, 0xb4c0, 0xb4c4, 0xb4c8,
- 0xb4d0, 0xb4d5, 0xb4dc, 0xb4dd, 0xb4e0, 0xb4e3, 0xb4e4, 0xb4e6,
- 0xb4ec, 0xb4ed, 0xb4ef, 0xb4f1, 0xb4f8, 0xb514, 0xb515, 0xb518,
- 0xb51b, 0xb51c, 0xb524, 0xb525, 0xb527, 0xb528, 0xb529, 0xb52a,
- 0xb530, 0xb531, 0xb534, 0xb538, 0xb540, 0xb541, 0xb543, 0xb544,
- 0xb545, 0xb54b, 0xb54c, 0xb54d, 0xb550, 0xb554, 0xb55c, 0xb55d,
- 0xb55f, 0xb560, 0xb561, 0xb5a0, 0xb5a1, 0xb5a4, 0xb5a8, 0xb5aa,
- 0xb5ab, 0xb5b0, 0xb5b1, 0xb5b3, 0xb5b4, 0xb5b5, 0xb5bb, 0xb5bc,
- 0xb5bd, 0xb5c0, 0xb5c4, 0xb5cc, 0xb5cd, 0xb5cf, 0xb5d0, 0xb5d1,
- 0xb5d8, 0xb5ec, 0xb610, 0xb611, 0xb614, 0xb618, 0xb625, 0xb62c,
- 0xb634, 0xb648, 0xb664, 0xb668, 0xb69c, 0xb69d, 0xb6a0, 0xb6a4,
- 0xb6ab, 0xb6ac, 0xb6b1, 0xb6d4, 0xb6f0, 0xb6f4, 0xb6f8, 0xb700,
- 0xb701, 0xb705, 0xb728, 0xb729, 0xb72c, 0xb72f, 0xb730, 0xb738,
- 0xb739, 0xb73b, 0xb744, 0xb748, 0xb74c, 0xb754, 0xb755, 0xb760,
- 0xb764, 0xb768, 0xb770, 0xb771, 0xb773, 0xb775, 0xb77c, 0xb77d,
- 0xb780, 0xb784, 0xb78c, 0xb78d, 0xb78f, 0xb790, 0xb791, 0xb792,
- 0xb796, 0xb797, 0xb798, 0xb799, 0xb79c, 0xb7a0, 0xb7a8, 0xb7a9,
- 0xb7ab, 0xb7ac, 0xb7ad, 0xb7b4, 0xb7b5, 0xb7b8, 0xb7c7, 0xb7c9,
- 0xb7ec, 0xb7ed, 0xb7f0, 0xb7f4, 0xb7fc, 0xb7fd, 0xb7ff, 0xb800,
- 0xb801, 0xb807, 0xb808, 0xb809, 0xb80c, 0xb810, 0xb818, 0xb819,
- 0xb81b, 0xb81d, 0xb824, 0xb825, 0xb828, 0xb82c, 0xb834, 0xb835,
- 0xb837, 0xb838, 0xb839, 0xb840, 0xb844, 0xb851, 0xb853, 0xb85c,
- 0xb85d, 0xb860, 0xb864, 0xb86c, 0xb86d, 0xb86f, 0xb871, 0xb878,
- 0xb87c, 0xb88d, 0xb8a8, 0xb8b0, 0xb8b4, 0xb8b8, 0xb8c0, 0xb8c1,
- 0xb8c3, 0xb8c5, 0xb8cc, 0xb8d0, 0xb8d4, 0xb8dd, 0xb8df, 0xb8e1,
- 0xb8e8, 0xb8e9, 0xb8ec, 0xb8f0, 0xb8f8, 0xb8f9, 0xb8fb, 0xb8fd,
- 0xb904, 0xb918, 0xb920, 0xb93c, 0xb93d, 0xb940, 0xb944, 0xb94c,
- 0xb94f, 0xb951, 0xb958, 0xb959, 0xb95c, 0xb960, 0xb968, 0xb969,
- 0xb96b, 0xb96d, 0xb974, 0xb975, 0xb978, 0xb97c, 0xb984, 0xb985,
- 0xb987, 0xb989, 0xb98a, 0xb98d, 0xb98e, 0xb9ac, 0xb9ad, 0xb9b0,
- 0xb9b4, 0xb9bc, 0xb9bd, 0xb9bf, 0xb9c1, 0xb9c8, 0xb9c9, 0xb9cc,
- 0xb9ce, 0xb9cf, 0xb9d0, 0xb9d1, 0xb9d2, 0xb9d8, 0xb9d9, 0xb9db,
- 0xb9dd, 0xb9de, 0xb9e1, 0xb9e3, 0xb9e4, 0xb9e5, 0xb9e8, 0xb9ec,
- 0xb9f4, 0xb9f5, 0xb9f7, 0xb9f8, 0xb9f9, 0xb9fa, 0xba00, 0xba01,
- 0xba08, 0xba15, 0xba38, 0xba39, 0xba3c, 0xba40, 0xba42, 0xba48,
- 0xba49, 0xba4b, 0xba4d, 0xba4e, 0xba53, 0xba54, 0xba55, 0xba58,
- 0xba5c, 0xba64, 0xba65, 0xba67, 0xba68, 0xba69, 0xba70, 0xba71,
- 0xba74, 0xba78, 0xba83, 0xba84, 0xba85, 0xba87, 0xba8c, 0xbaa8,
- 0xbaa9, 0xbaab, 0xbaac, 0xbab0, 0xbab2, 0xbab8, 0xbab9, 0xbabb,
- 0xbabd, 0xbac4, 0xbac8, 0xbad8, 0xbad9, 0xbafc, 0xbb00, 0xbb04,
- 0xbb0d, 0xbb0f, 0xbb11, 0xbb18, 0xbb1c, 0xbb20, 0xbb29, 0xbb2b,
- 0xbb34, 0xbb35, 0xbb36, 0xbb38, 0xbb3b, 0xbb3c, 0xbb3d, 0xbb3e,
- 0xbb44, 0xbb45, 0xbb47, 0xbb49, 0xbb4d, 0xbb4f, 0xbb50, 0xbb54,
- 0xbb58, 0xbb61, 0xbb63, 0xbb6c, 0xbb88, 0xbb8c, 0xbb90, 0xbba4,
- 0xbba8, 0xbbac, 0xbbb4, 0xbbb7, 0xbbc0, 0xbbc4, 0xbbc8, 0xbbd0,
- 0xbbd3, 0xbbf8, 0xbbf9, 0xbbfc, 0xbbff, 0xbc00, 0xbc02, 0xbc08,
- 0xbc09, 0xbc0b, 0xbc0c, 0xbc0d, 0xbc0f, 0xbc11, 0xbc14, 0xbc15,
- 0xbc16, 0xbc17, 0xbc18, 0xbc1b, 0xbc1c, 0xbc1d, 0xbc1e, 0xbc1f,
- 0xbc24, 0xbc25, 0xbc27, 0xbc29, 0xbc2d, 0xbc30, 0xbc31, 0xbc34,
- 0xbc38, 0xbc40, 0xbc41, 0xbc43, 0xbc44, 0xbc45, 0xbc49, 0xbc4c,
- 0xbc4d, 0xbc50, 0xbc5d, 0xbc84, 0xbc85, 0xbc88, 0xbc8b, 0xbc8c,
- 0xbc8e, 0xbc94, 0xbc95, 0xbc97, 0xbc99, 0xbc9a, 0xbca0, 0xbca1,
- 0xbca4, 0xbca7, 0xbca8, 0xbcb0, 0xbcb1, 0xbcb3, 0xbcb4, 0xbcb5,
- 0xbcbc, 0xbcbd, 0xbcc0, 0xbcc4, 0xbccd, 0xbccf, 0xbcd0, 0xbcd1,
- 0xbcd5, 0xbcd8, 0xbcdc, 0xbcf4, 0xbcf5, 0xbcf6, 0xbcf8, 0xbcfc,
- 0xbd04, 0xbd05, 0xbd07, 0xbd09, 0xbd10, 0xbd14, 0xbd24, 0xbd2c,
- 0xbd40, 0xbd48, 0xbd49, 0xbd4c, 0xbd50, 0xbd58, 0xbd59, 0xbd64,
- 0xbd68, 0xbd80, 0xbd81, 0xbd84, 0xbd87, 0xbd88, 0xbd89, 0xbd8a,
- 0xbd90, 0xbd91, 0xbd93, 0xbd95, 0xbd99, 0xbd9a, 0xbd9c, 0xbda4,
- 0xbdb0, 0xbdb8, 0xbdd4, 0xbdd5, 0xbdd8, 0xbddc, 0xbde9, 0xbdf0,
- 0xbdf4, 0xbdf8, 0xbe00, 0xbe03, 0xbe05, 0xbe0c, 0xbe0d, 0xbe10,
- 0xbe14, 0xbe1c, 0xbe1d, 0xbe1f, 0xbe44, 0xbe45, 0xbe48, 0xbe4c,
- 0xbe4e, 0xbe54, 0xbe55, 0xbe57, 0xbe59, 0xbe5a, 0xbe5b, 0xbe60,
- 0xbe61, 0xbe64, 0xbe68, 0xbe6a, 0xbe70, 0xbe71, 0xbe73, 0xbe74,
- 0xbe75, 0xbe7b, 0xbe7c, 0xbe7d, 0xbe80, 0xbe84, 0xbe8c, 0xbe8d,
- 0xbe8f, 0xbe90, 0xbe91, 0xbe98, 0xbe99, 0xbea8, 0xbed0, 0xbed1,
- 0xbed4, 0xbed7, 0xbed8, 0xbee0, 0xbee3, 0xbee4, 0xbee5, 0xbeec,
- 0xbf01, 0xbf08, 0xbf09, 0xbf18, 0xbf19, 0xbf1b, 0xbf1c, 0xbf1d,
- 0xbf40, 0xbf41, 0xbf44, 0xbf48, 0xbf50, 0xbf51, 0xbf55, 0xbf94,
- 0xbfb0, 0xbfc5, 0xbfcc, 0xbfcd, 0xbfd0, 0xbfd4, 0xbfdc, 0xbfdf,
- 0xbfe1, 0xc03c, 0xc051, 0xc058, 0xc05c, 0xc060, 0xc068, 0xc069,
- 0xc090, 0xc091, 0xc094, 0xc098, 0xc0a0, 0xc0a1, 0xc0a3, 0xc0a5,
- 0xc0ac, 0xc0ad, 0xc0af, 0xc0b0, 0xc0b3, 0xc0b4, 0xc0b5, 0xc0b6,
- 0xc0bc, 0xc0bd, 0xc0bf, 0xc0c0, 0xc0c1, 0xc0c5, 0xc0c8, 0xc0c9,
- 0xc0cc, 0xc0d0, 0xc0d8, 0xc0d9, 0xc0db, 0xc0dc, 0xc0dd, 0xc0e4,
- 0xc0e5, 0xc0e8, 0xc0ec, 0xc0f4, 0xc0f5, 0xc0f7, 0xc0f9, 0xc100,
- 0xc104, 0xc108, 0xc110, 0xc115, 0xc11c, 0xc11d, 0xc11e, 0xc11f,
- 0xc120, 0xc123, 0xc124, 0xc126, 0xc127, 0xc12c, 0xc12d, 0xc12f,
- 0xc130, 0xc131, 0xc136, 0xc138, 0xc139, 0xc13c, 0xc140, 0xc148,
- 0xc149, 0xc14b, 0xc14c, 0xc14d, 0xc154, 0xc155, 0xc158, 0xc15c,
- 0xc164, 0xc165, 0xc167, 0xc168, 0xc169, 0xc170, 0xc174, 0xc178,
- 0xc185, 0xc18c, 0xc18d, 0xc18e, 0xc190, 0xc194, 0xc196, 0xc19c,
- 0xc19d, 0xc19f, 0xc1a1, 0xc1a5, 0xc1a8, 0xc1a9, 0xc1ac, 0xc1b0,
- 0xc1bd, 0xc1c4, 0xc1c8, 0xc1cc, 0xc1d4, 0xc1d7, 0xc1d8, 0xc1e0,
- 0xc1e4, 0xc1e8, 0xc1f0, 0xc1f1, 0xc1f3, 0xc1fc, 0xc1fd, 0xc200,
- 0xc204, 0xc20c, 0xc20d, 0xc20f, 0xc211, 0xc218, 0xc219, 0xc21c,
- 0xc21f, 0xc220, 0xc228, 0xc229, 0xc22b, 0xc22d, 0xc22f, 0xc231,
- 0xc232, 0xc234, 0xc248, 0xc250, 0xc251, 0xc254, 0xc258, 0xc260,
- 0xc265, 0xc26c, 0xc26d, 0xc270, 0xc274, 0xc27c, 0xc27d, 0xc27f,
- 0xc281, 0xc288, 0xc289, 0xc290, 0xc298, 0xc29b, 0xc29d, 0xc2a4,
- 0xc2a5, 0xc2a8, 0xc2ac, 0xc2ad, 0xc2b4, 0xc2b5, 0xc2b7, 0xc2b9,
- 0xc2dc, 0xc2dd, 0xc2e0, 0xc2e3, 0xc2e4, 0xc2eb, 0xc2ec, 0xc2ed,
- 0xc2ef, 0xc2f1, 0xc2f6, 0xc2f8, 0xc2f9, 0xc2fb, 0xc2fc, 0xc300,
- 0xc308, 0xc309, 0xc30c, 0xc30d, 0xc313, 0xc314, 0xc315, 0xc318,
- 0xc31c, 0xc324, 0xc325, 0xc328, 0xc329, 0xc345, 0xc368, 0xc369,
- 0xc36c, 0xc370, 0xc372, 0xc378, 0xc379, 0xc37c, 0xc37d, 0xc384,
- 0xc388, 0xc38c, 0xc3c0, 0xc3d8, 0xc3d9, 0xc3dc, 0xc3df, 0xc3e0,
- 0xc3e2, 0xc3e8, 0xc3e9, 0xc3ed, 0xc3f4, 0xc3f5, 0xc3f8, 0xc408,
- 0xc410, 0xc424, 0xc42c, 0xc430, 0xc434, 0xc43c, 0xc43d, 0xc448,
- 0xc464, 0xc465, 0xc468, 0xc46c, 0xc474, 0xc475, 0xc479, 0xc480,
- 0xc494, 0xc49c, 0xc4b8, 0xc4bc, 0xc4e9, 0xc4f0, 0xc4f1, 0xc4f4,
- 0xc4f8, 0xc4fa, 0xc4ff, 0xc500, 0xc501, 0xc50c, 0xc510, 0xc514,
- 0xc51c, 0xc528, 0xc529, 0xc52c, 0xc530, 0xc538, 0xc539, 0xc53b,
- 0xc53d, 0xc544, 0xc545, 0xc548, 0xc549, 0xc54a, 0xc54c, 0xc54d,
- 0xc54e, 0xc553, 0xc554, 0xc555, 0xc557, 0xc558, 0xc559, 0xc55d,
- 0xc55e, 0xc560, 0xc561, 0xc564, 0xc568, 0xc570, 0xc571, 0xc573,
- 0xc574, 0xc575, 0xc57c, 0xc57d, 0xc580, 0xc584, 0xc587, 0xc58c,
- 0xc58d, 0xc58f, 0xc591, 0xc595, 0xc597, 0xc598, 0xc59c, 0xc5a0,
- 0xc5a9, 0xc5b4, 0xc5b5, 0xc5b8, 0xc5b9, 0xc5bb, 0xc5bc, 0xc5bd,
- 0xc5be, 0xc5c4, 0xc5c5, 0xc5c6, 0xc5c7, 0xc5c8, 0xc5c9, 0xc5ca,
- 0xc5cc, 0xc5ce, 0xc5d0, 0xc5d1, 0xc5d4, 0xc5d8, 0xc5e0, 0xc5e1,
- 0xc5e3, 0xc5e5, 0xc5ec, 0xc5ed, 0xc5ee, 0xc5f0, 0xc5f4, 0xc5f6,
- 0xc5f7, 0xc5fc, 0xc5fd, 0xc5fe, 0xc5ff, 0xc600, 0xc601, 0xc605,
- 0xc606, 0xc607, 0xc608, 0xc60c, 0xc610, 0xc618, 0xc619, 0xc61b,
- 0xc61c, 0xc624, 0xc625, 0xc628, 0xc62c, 0xc62d, 0xc62e, 0xc630,
- 0xc633, 0xc634, 0xc635, 0xc637, 0xc639, 0xc63b, 0xc640, 0xc641,
- 0xc644, 0xc648, 0xc650, 0xc651, 0xc653, 0xc654, 0xc655, 0xc65c,
- 0xc65d, 0xc660, 0xc66c, 0xc66f, 0xc671, 0xc678, 0xc679, 0xc67c,
- 0xc680, 0xc688, 0xc689, 0xc68b, 0xc68d, 0xc694, 0xc695, 0xc698,
- 0xc69c, 0xc6a4, 0xc6a5, 0xc6a7, 0xc6a9, 0xc6b0, 0xc6b1, 0xc6b4,
- 0xc6b8, 0xc6b9, 0xc6ba, 0xc6c0, 0xc6c1, 0xc6c3, 0xc6c5, 0xc6cc,
- 0xc6cd, 0xc6d0, 0xc6d4, 0xc6dc, 0xc6dd, 0xc6e0, 0xc6e1, 0xc6e8,
- 0xc6e9, 0xc6ec, 0xc6f0, 0xc6f8, 0xc6f9, 0xc6fd, 0xc704, 0xc705,
- 0xc708, 0xc70c, 0xc714, 0xc715, 0xc717, 0xc719, 0xc720, 0xc721,
- 0xc724, 0xc728, 0xc730, 0xc731, 0xc733, 0xc735, 0xc737, 0xc73c,
- 0xc73d, 0xc740, 0xc744, 0xc74a, 0xc74c, 0xc74d, 0xc74f, 0xc751,
- 0xc752, 0xc753, 0xc754, 0xc755, 0xc756, 0xc757, 0xc758, 0xc75c,
- 0xc760, 0xc768, 0xc76b, 0xc774, 0xc775, 0xc778, 0xc77c, 0xc77d,
- 0xc77e, 0xc783, 0xc784, 0xc785, 0xc787, 0xc788, 0xc789, 0xc78a,
- 0xc78e, 0xc790, 0xc791, 0xc794, 0xc796, 0xc797, 0xc798, 0xc79a,
- 0xc7a0, 0xc7a1, 0xc7a3, 0xc7a4, 0xc7a5, 0xc7a6, 0xc7ac, 0xc7ad,
- 0xc7b0, 0xc7b4, 0xc7bc, 0xc7bd, 0xc7bf, 0xc7c0, 0xc7c1, 0xc7c8,
- 0xc7c9, 0xc7cc, 0xc7ce, 0xc7d0, 0xc7d8, 0xc7dd, 0xc7e4, 0xc7e8,
- 0xc7ec, 0xc800, 0xc801, 0xc804, 0xc808, 0xc80a, 0xc810, 0xc811,
- 0xc813, 0xc815, 0xc816, 0xc81c, 0xc81d, 0xc820, 0xc824, 0xc82c,
- 0xc82d, 0xc82f, 0xc831, 0xc838, 0xc83c, 0xc840, 0xc848, 0xc849,
- 0xc84c, 0xc84d, 0xc854, 0xc870, 0xc871, 0xc874, 0xc878, 0xc87a,
- 0xc880, 0xc881, 0xc883, 0xc885, 0xc886, 0xc887, 0xc88b, 0xc88c,
- 0xc88d, 0xc894, 0xc89d, 0xc89f, 0xc8a1, 0xc8a8, 0xc8bc, 0xc8bd,
- 0xc8c4, 0xc8c8, 0xc8cc, 0xc8d4, 0xc8d5, 0xc8d7, 0xc8d9, 0xc8e0,
- 0xc8e1, 0xc8e4, 0xc8f5, 0xc8fc, 0xc8fd, 0xc900, 0xc904, 0xc905,
- 0xc906, 0xc90c, 0xc90d, 0xc90f, 0xc911, 0xc918, 0xc92c, 0xc934,
- 0xc950, 0xc951, 0xc954, 0xc958, 0xc960, 0xc961, 0xc963, 0xc96c,
- 0xc970, 0xc974, 0xc97c, 0xc988, 0xc989, 0xc98c, 0xc990, 0xc998,
- 0xc999, 0xc99b, 0xc99d, 0xc9c0, 0xc9c1, 0xc9c4, 0xc9c7, 0xc9c8,
- 0xc9ca, 0xc9d0, 0xc9d1, 0xc9d3, 0xc9d5, 0xc9d6, 0xc9d9, 0xc9da,
- 0xc9dc, 0xc9dd, 0xc9e0, 0xc9e2, 0xc9e4, 0xc9e7, 0xc9ec, 0xc9ed,
- 0xc9ef, 0xc9f0, 0xc9f1, 0xc9f8, 0xc9f9, 0xc9fc, 0xca00, 0xca08,
- 0xca09, 0xca0b, 0xca0c, 0xca0d, 0xca14, 0xca18, 0xca29, 0xca4c,
- 0xca4d, 0xca50, 0xca54, 0xca5c, 0xca5d, 0xca5f, 0xca60, 0xca61,
- 0xca68, 0xca7d, 0xca84, 0xca98, 0xcabc, 0xcabd, 0xcac0, 0xcac4,
- 0xcacc, 0xcacd, 0xcacf, 0xcad1, 0xcad3, 0xcad8, 0xcad9, 0xcae0,
- 0xcaec, 0xcaf4, 0xcb08, 0xcb10, 0xcb14, 0xcb18, 0xcb20, 0xcb21,
- 0xcb41, 0xcb48, 0xcb49, 0xcb4c, 0xcb50, 0xcb58, 0xcb59, 0xcb5d,
- 0xcb64, 0xcb78, 0xcb79, 0xcb9c, 0xcbb8, 0xcbd4, 0xcbe4, 0xcbe7,
- 0xcbe9, 0xcc0c, 0xcc0d, 0xcc10, 0xcc14, 0xcc1c, 0xcc1d, 0xcc21,
- 0xcc22, 0xcc27, 0xcc28, 0xcc29, 0xcc2c, 0xcc2e, 0xcc30, 0xcc38,
- 0xcc39, 0xcc3b, 0xcc3c, 0xcc3d, 0xcc3e, 0xcc44, 0xcc45, 0xcc48,
- 0xcc4c, 0xcc54, 0xcc55, 0xcc57, 0xcc58, 0xcc59, 0xcc60, 0xcc64,
- 0xcc66, 0xcc68, 0xcc70, 0xcc75, 0xcc98, 0xcc99, 0xcc9c, 0xcca0,
- 0xcca8, 0xcca9, 0xccab, 0xccac, 0xccad, 0xccb4, 0xccb5, 0xccb8,
- 0xccbc, 0xccc4, 0xccc5, 0xccc7, 0xccc9, 0xccd0, 0xccd4, 0xcce4,
- 0xccec, 0xccf0, 0xcd01, 0xcd08, 0xcd09, 0xcd0c, 0xcd10, 0xcd18,
- 0xcd19, 0xcd1b, 0xcd1d, 0xcd24, 0xcd28, 0xcd2c, 0xcd39, 0xcd5c,
- 0xcd60, 0xcd64, 0xcd6c, 0xcd6d, 0xcd6f, 0xcd71, 0xcd78, 0xcd88,
- 0xcd94, 0xcd95, 0xcd98, 0xcd9c, 0xcda4, 0xcda5, 0xcda7, 0xcda9,
- 0xcdb0, 0xcdc4, 0xcdcc, 0xcdd0, 0xcde8, 0xcdec, 0xcdf0, 0xcdf8,
- 0xcdf9, 0xcdfb, 0xcdfd, 0xce04, 0xce08, 0xce0c, 0xce14, 0xce19,
- 0xce20, 0xce21, 0xce24, 0xce28, 0xce30, 0xce31, 0xce33, 0xce35,
- 0xce58, 0xce59, 0xce5c, 0xce5f, 0xce60, 0xce61, 0xce68, 0xce69,
- 0xce6b, 0xce6d, 0xce74, 0xce75, 0xce78, 0xce7c, 0xce84, 0xce85,
- 0xce87, 0xce89, 0xce90, 0xce91, 0xce94, 0xce98, 0xcea0, 0xcea1,
- 0xcea3, 0xcea4, 0xcea5, 0xceac, 0xcead, 0xcec1, 0xcee4, 0xcee5,
- 0xcee8, 0xceeb, 0xceec, 0xcef4, 0xcef5, 0xcef7, 0xcef8, 0xcef9,
- 0xcf00, 0xcf01, 0xcf04, 0xcf08, 0xcf10, 0xcf11, 0xcf13, 0xcf15,
- 0xcf1c, 0xcf20, 0xcf24, 0xcf2c, 0xcf2d, 0xcf2f, 0xcf30, 0xcf31,
- 0xcf38, 0xcf54, 0xcf55, 0xcf58, 0xcf5c, 0xcf64, 0xcf65, 0xcf67,
- 0xcf69, 0xcf70, 0xcf71, 0xcf74, 0xcf78, 0xcf80, 0xcf85, 0xcf8c,
- 0xcfa1, 0xcfa8, 0xcfb0, 0xcfc4, 0xcfe0, 0xcfe1, 0xcfe4, 0xcfe8,
- 0xcff0, 0xcff1, 0xcff3, 0xcff5, 0xcffc, 0xd000, 0xd004, 0xd011,
- 0xd018, 0xd02d, 0xd034, 0xd035, 0xd038, 0xd03c, 0xd044, 0xd045,
- 0xd047, 0xd049, 0xd050, 0xd054, 0xd058, 0xd060, 0xd06c, 0xd06d,
- 0xd070, 0xd074, 0xd07c, 0xd07d, 0xd081, 0xd0a4, 0xd0a5, 0xd0a8,
- 0xd0ac, 0xd0b4, 0xd0b5, 0xd0b7, 0xd0b9, 0xd0c0, 0xd0c1, 0xd0c4,
- 0xd0c8, 0xd0c9, 0xd0d0, 0xd0d1, 0xd0d3, 0xd0d4, 0xd0d5, 0xd0dc,
- 0xd0dd, 0xd0e0, 0xd0e4, 0xd0ec, 0xd0ed, 0xd0ef, 0xd0f0, 0xd0f1,
- 0xd0f8, 0xd10d, 0xd130, 0xd131, 0xd134, 0xd138, 0xd13a, 0xd140,
- 0xd141, 0xd143, 0xd144, 0xd145, 0xd14c, 0xd14d, 0xd150, 0xd154,
- 0xd15c, 0xd15d, 0xd15f, 0xd161, 0xd168, 0xd16c, 0xd17c, 0xd184,
- 0xd188, 0xd1a0, 0xd1a1, 0xd1a4, 0xd1a8, 0xd1b0, 0xd1b1, 0xd1b3,
- 0xd1b5, 0xd1ba, 0xd1bc, 0xd1c0, 0xd1d8, 0xd1f4, 0xd1f8, 0xd207,
- 0xd209, 0xd210, 0xd22c, 0xd22d, 0xd230, 0xd234, 0xd23c, 0xd23d,
- 0xd23f, 0xd241, 0xd248, 0xd25c, 0xd264, 0xd280, 0xd281, 0xd284,
- 0xd288, 0xd290, 0xd291, 0xd295, 0xd29c, 0xd2a0, 0xd2a4, 0xd2ac,
- 0xd2b1, 0xd2b8, 0xd2b9, 0xd2bc, 0xd2bf, 0xd2c0, 0xd2c2, 0xd2c8,
- 0xd2c9, 0xd2cb, 0xd2d4, 0xd2d8, 0xd2dc, 0xd2e4, 0xd2e5, 0xd2f0,
- 0xd2f1, 0xd2f4, 0xd2f8, 0xd300, 0xd301, 0xd303, 0xd305, 0xd30c,
- 0xd30d, 0xd30e, 0xd310, 0xd314, 0xd316, 0xd31c, 0xd31d, 0xd31f,
- 0xd320, 0xd321, 0xd325, 0xd328, 0xd329, 0xd32c, 0xd330, 0xd338,
- 0xd339, 0xd33b, 0xd33c, 0xd33d, 0xd344, 0xd345, 0xd37c, 0xd37d,
- 0xd380, 0xd384, 0xd38c, 0xd38d, 0xd38f, 0xd390, 0xd391, 0xd398,
- 0xd399, 0xd39c, 0xd3a0, 0xd3a8, 0xd3a9, 0xd3ab, 0xd3ad, 0xd3b4,
- 0xd3b8, 0xd3bc, 0xd3c4, 0xd3c5, 0xd3c8, 0xd3c9, 0xd3d0, 0xd3d8,
- 0xd3e1, 0xd3e3, 0xd3ec, 0xd3ed, 0xd3f0, 0xd3f4, 0xd3fc, 0xd3fd,
- 0xd3ff, 0xd401, 0xd408, 0xd41d, 0xd440, 0xd444, 0xd45c, 0xd460,
- 0xd464, 0xd46d, 0xd46f, 0xd478, 0xd479, 0xd47c, 0xd47f, 0xd480,
- 0xd482, 0xd488, 0xd489, 0xd48b, 0xd48d, 0xd494, 0xd4a9, 0xd4cc,
- 0xd4d0, 0xd4d4, 0xd4dc, 0xd4df, 0xd4e8, 0xd4ec, 0xd4f0, 0xd4f8,
- 0xd4fb, 0xd4fd, 0xd504, 0xd508, 0xd50c, 0xd514, 0xd515, 0xd517,
- 0xd53c, 0xd53d, 0xd540, 0xd544, 0xd54c, 0xd54d, 0xd54f, 0xd551,
- 0xd558, 0xd559, 0xd55c, 0xd560, 0xd565, 0xd568, 0xd569, 0xd56b,
- 0xd56d, 0xd574, 0xd575, 0xd578, 0xd57c, 0xd584, 0xd585, 0xd587,
- 0xd588, 0xd589, 0xd590, 0xd5a5, 0xd5c8, 0xd5c9, 0xd5cc, 0xd5d0,
- 0xd5d2, 0xd5d8, 0xd5d9, 0xd5db, 0xd5dd, 0xd5e4, 0xd5e5, 0xd5e8,
- 0xd5ec, 0xd5f4, 0xd5f5, 0xd5f7, 0xd5f9, 0xd600, 0xd601, 0xd604,
- 0xd608, 0xd610, 0xd611, 0xd613, 0xd614, 0xd615, 0xd61c, 0xd620,
- 0xd624, 0xd62d, 0xd638, 0xd639, 0xd63c, 0xd640, 0xd645, 0xd648,
- 0xd649, 0xd64b, 0xd64d, 0xd651, 0xd654, 0xd655, 0xd658, 0xd65c,
- 0xd667, 0xd669, 0xd670, 0xd671, 0xd674, 0xd683, 0xd685, 0xd68c,
- 0xd68d, 0xd690, 0xd694, 0xd69d, 0xd69f, 0xd6a1, 0xd6a8, 0xd6ac,
- 0xd6b0, 0xd6b9, 0xd6bb, 0xd6c4, 0xd6c5, 0xd6c8, 0xd6cc, 0xd6d1,
- 0xd6d4, 0xd6d7, 0xd6d9, 0xd6e0, 0xd6e4, 0xd6e8, 0xd6f0, 0xd6f5,
- 0xd6fc, 0xd6fd, 0xd700, 0xd704, 0xd711, 0xd718, 0xd719, 0xd71c,
- 0xd720, 0xd728, 0xd729, 0xd72b, 0xd72d, 0xd734, 0xd735, 0xd738,
- 0xd73c, 0xd744, 0xd747, 0xd749, 0xd750, 0xd751, 0xd754, 0xd756,
- 0xd757, 0xd758, 0xd759, 0xd760, 0xd761, 0xd763, 0xd765, 0xd769,
- 0xd76c, 0xd770, 0xd774, 0xd77c, 0xd77d, 0xd781, 0xd788, 0xd789,
- 0xd78c, 0xd790, 0xd798, 0xd799, 0xd79b, 0xd79d
-};
-
-
-/* mapping table used to convert indexes to JOHAB
-bit 43210 초 성 중 성 종 성
-00000 no code no code no code
-00001 file code no code file code
-00010 ㄱ file code ㄱ
-00011 ㄲ ㅏ ㄲ
-00100 ㄴ ㅐ ㄳ
-00101 ㄷ ㅑ ㄴ
-00110 ㄸ ㅒ ㄵ
-00111 ㄹ ㅓ ㄶ
-01000 ㅁ no code ㄷ
-01001 ㅂ no code ㄹ
-01010 ㅃ ㅔ ㄺ
-01011 ㅅ ㅕ ㄻ
-01100 ㅆ ㅖ ㄼ
-01101 ㅇ ㅗ ㄽ
-01110 ㅈ ㅘ ㄾ
-01111 ㅉ ㅙ ㄿ
-10000 ㅊ no code ㅀ
-10001 ㅋ no code ㅁ
-10010 ㅌ ㅚ no code
-10011 ㅍ ㅛ ㅂ
-10100 ㅎ ㅜ ㅄ
-10101 no code ㅝ ㅅ
-10110 no code ㅞ ㅆ
-10111 no code ㅟ ㅇ
-11000 no code no code ㅈ
-11001 no code no code ㅊ
-11010 no code ㅠ ㅋ
-11011 no code ㅡ ㅌ
-11100 no code ㅢ ㅍ
-11101 no code ㅣ ㅎ
-11110 no code no code no code
-11111 no code no code no code
-*/
-/* The following arrays are based on the above table: */
-static guint16 larray[32]=
-{
-2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,0,0,0,0,0,0,0,0,0,0,0,0,0
-};
-static guint16 varray[32]=
-{
-3,4,5,6,7,10,11,12,13,14,15,18,19,20,21,22,23,26,27,28,29,0,0,0,0,0,0,0,0,0,0,0
-};
-static guint16 tarray[32]=
-{
-1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,20,21,22,23,24,25,26,27,28,29,30,0,0
-};
-
diff --git a/modules/hebrew/Makefile.am b/modules/hebrew/Makefile.am
index 33355ab6..f4480151 100644
--- a/modules/hebrew/Makefile.am
+++ b/modules/hebrew/Makefile.am
@@ -19,23 +19,6 @@ noinst_LTLIBRARIES =
common_sources = hebrew-shaper.c hebrew-shaper.h
-if HAVE_X
-INCLUDES += $(X_CFLAGS)
-if INCLUDE_HEBREW_X
-noinst_LTLIBRARIES += libpango-hebrew-x.la
-else
-module_LTLIBRARIES += pango-hebrew-x.la
-endif
-endif
-
-hebrew_x_sources = $(common_sources) hebrew-x.c
-
-pango_hebrew_x_la_LDFLAGS = -export-dynamic -avoid-version -module
-pango_hebrew_x_la_LIBADD = $(pangoxlibs)
-pango_hebrew_x_la_SOURCES = $(hebrew_x_sources)
-libpango_hebrew_x_la_SOURCES = $(hebrew_x_sources)
-libpango_hebrew_x_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_hebrew_x
-
if HAVE_XFT
INCLUDES += $(XFT_CFLAGS)
diff --git a/modules/hebrew/hebrew-x.c b/modules/hebrew/hebrew-x.c
deleted file mode 100644
index 70c5e95d..00000000
--- a/modules/hebrew/hebrew-x.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/* Pango
- * hebrew-x.c:
- *
- * Copyright (C) 1999 Red Hat Software
- * Author: Owen Taylor <otaylor@redhat.com>
- *
- * Copyright (c) 1996-2000 by Sun Microsystems, Inc.
- * Author: Chookij Vanatham <Chookij.Vanatham@Eng.Sun.COM>
- *
- * Hebrew points positioning improvements 2001
- * Author: Dov Grobgeld <dov@imagic.weizmann.ac.il>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#include <string.h>
-
-#include <glib.h>
-#include <string.h>
-#include "pangox.h"
-#include "pango-engine.h"
-#include "hebrew-shaper.h"
-
-#define ucs2iso8859_8(wc) (unsigned int)((unsigned int)(wc) - 0x0590 + 0x10)
-#define iso8859_8_2uni(c) ((gunichar)(c) - 0x10 + 0x0590)
-
-#define SCRIPT_ENGINE_NAME "HebrewScriptEngineX"
-#define MAX_CLUSTER_CHRS 20
-
-static const gint iso_8859_8_shape_table[128] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
- 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
- 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
- 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
- 0xF8, 0xF9, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-/* Unicode Hebrew Font Layout
- */
-static const gint Unicode_shape_table[128] = {
- /* 00 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
- /* cantillation marks followed by accents */
- /* 10 */ 0x0000, 0x0591, 0x0592, 0x0593, 0x0594, 0x0595, 0x0596, 0x0597,
- 0x0598, 0x0599, 0x059A, 0x059B, 0x059C, 0x059D, 0x059E, 0x059F,
- /* 20 */ 0x05A0, 0x05A1, 0x0000, 0x05A3, 0x05A4, 0x05A5, 0x05A6, 0x05A7,
- 0x05A8, 0x05A9, 0x05AA, 0x05AB, 0x05AC, 0x05AD, 0x05AE, 0x05AF,
- /* 30 */ 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7,
- 0x05B8, 0x05B9, 0x0000, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
- /* 40 */ 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05C4, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-
- /* Aleph-Tav, Yiddish ligatures, and punctuation */
- /* 50 */ 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
- 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
- /* 60 */ 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
- 0x05E8, 0x05E9, 0x05EA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- /* 70 */ 0x05F0, 0x05F1, 0x05F2, 0x05F3, 0x05F4, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-};
-
-/* We handle the range U+0591 to U+05f4 exactly
- */
-static PangoEngineRange hebrew_ranges[] = {
- { 0x0591, 0x05f4, "*" }, /* Hebrew */
- { 0xfb1d, 0xfb4f, "*" } /* Hebrew presentation forms */
-};
-
-static PangoEngineInfo script_engines[] = {
- {
- SCRIPT_ENGINE_NAME,
- PANGO_ENGINE_TYPE_SHAPE,
- PANGO_RENDER_TYPE_X,
- hebrew_ranges, G_N_ELEMENTS(hebrew_ranges)
- }
-};
-
-/*
- * X window system script engine portion
- */
-
-typedef struct _HebrewFontInfo HebrewFontInfo;
-
-/* The type of encoding that we will use
- */
-typedef enum {
- HEBREW_FONT_NONE,
- HEBREW_FONT_ISO8859_8,
- HEBREW_FONT_ISO10646
-} HebrewFontType;
-
-struct _HebrewFontInfo
-{
- PangoFont *font;
- HebrewFontType type;
- PangoXSubfont subfont;
-};
-
-/* Returns a structure with information we will use to rendering given the
- * #PangoFont. This is computed once per font and cached for later retrieval.
- */
-static HebrewFontInfo *
-get_font_info (PangoFont *font)
-{
- static const char *charsets[] = {
- "iso8859-8",
- "iso10646-1",
- };
-
- static const int charset_types[] = {
- HEBREW_FONT_ISO8859_8,
- HEBREW_FONT_ISO10646,
- };
-
- HebrewFontInfo *font_info;
- GQuark info_id = g_quark_from_string ("hebrew-font-info");
-
- font_info = g_object_get_qdata (G_OBJECT (font), info_id);
-
- if (!font_info)
- {
- /* No cached information not found, so we need to compute it
- * from scratch
- */
- PangoXSubfont *subfont_ids;
- gint *subfont_charsets;
- gint n_subfonts, i;
-
- font_info = g_new (HebrewFontInfo, 1);
- font_info->font = font;
- font_info->type = HEBREW_FONT_NONE;
-
- g_object_set_qdata_full (G_OBJECT (font), info_id, font_info, (GDestroyNotify)g_free);
-
- n_subfonts = pango_x_list_subfonts (font, (char **)charsets, G_N_ELEMENTS (charsets),
- &subfont_ids, &subfont_charsets);
-
- for (i=0; i < n_subfonts; i++)
- {
- HebrewFontType font_type = charset_types[subfont_charsets[i]];
-
- if (font_type == HEBREW_FONT_ISO10646 &&
- pango_x_has_glyph (font, PANGO_X_MAKE_GLYPH (subfont_ids[i], 0x05D0)))
- {
- font_info->type = font_type;
- font_info->subfont = subfont_ids[i];
-
- break;
- }
- else if (font_type == HEBREW_FONT_ISO8859_8 &&
- pango_x_has_glyph (font, PANGO_X_MAKE_GLYPH (subfont_ids[i], 0xE0)))
- {
- font_info->type = font_type;
- font_info->subfont = subfont_ids[i];
-
- break;
- }
- }
- g_free (subfont_ids);
- g_free (subfont_charsets);
- }
-
- return font_info;
-}
-
-static void
-add_glyph (HebrewFontInfo *font_info,
- PangoGlyphString *glyphs,
- gint cluster_start,
- PangoGlyph glyph,
- gboolean is_combining,
- gint width,
- gint x_offset,
- gint y_offset
- )
-{
- gint index = glyphs->num_glyphs;
-
- pango_glyph_string_set_size (glyphs, index + 1);
-
- glyphs->glyphs[index].glyph = glyph;
- glyphs->glyphs[index].attr.is_cluster_start = is_combining ? 0 : 1;
-
- glyphs->log_clusters[index] = cluster_start;
-
- glyphs->glyphs[index].geometry.x_offset = x_offset;
- glyphs->glyphs[index].geometry.y_offset = y_offset;
- glyphs->glyphs[index].geometry.width = width;
-
-#if 0
- {
- PangoRectangle ink_rect, logical_rect;
-
- pango_font_get_glyph_extents (font_info->font,
- glyphs->glyphs[index].glyph, &ink_rect, &logical_rect);
-
- printf("width logical_rect.width x_offset y_offset = %d %d %d %d\n", width, logical_rect.width, x_offset, y_offset);
- glyphs->glyphs[index].geometry.x_offset = 0;
- glyphs->glyphs[index].geometry.y_offset = 0;
- glyphs->glyphs[index].geometry.width = width;
- }
-#endif
-}
-
-static PangoGlyph
-get_glyph(HebrewFontInfo *font_info,
- int glyph_num)
-{
- return PANGO_X_MAKE_GLYPH (font_info->subfont, glyph_num);
-}
-
-static void
-add_cluster(HebrewFontInfo *font_info,
- PangoFont *font,
- PangoGlyphString *glyphs,
- int cluster_size,
- int cluster_start,
- int glyph_num[],
- PangoGlyph glyph[],
- int width[],
- int x_offset[],
- int y_offset[])
-{
- int i;
-
- for (i=0; i<cluster_size; i++)
- {
- add_glyph (font_info, glyphs, cluster_start, glyph[i],
- i == 0 ? FALSE : TRUE, width[i], x_offset[i], y_offset[i]);
- }
-}
-
-static gint
-get_glyph_num(HebrewFontInfo *font_info,
- PangoFont *font,
- gunichar uch)
-{
- if (font_info->type == HEBREW_FONT_ISO8859_8)
- {
- return iso_8859_8_shape_table[ucs2iso8859_8(uch)];
- }
- else
- {
- return Unicode_shape_table[ucs2iso8859_8(uch)];
- }
-}
-
-static void
-get_cluster_glyphs(HebrewFontInfo *font_info,
- PangoFont *font,
- gunichar cluster[],
- gint cluster_size,
- /* output */
- gint glyph_num[],
- PangoGlyph glyph[],
- gint widths[],
- PangoRectangle ink_rects[])
-{
- int i;
- for (i=0; i<cluster_size; i++)
- {
- PangoRectangle logical_rect;
- glyph_num[i] = get_glyph_num(font_info, font, cluster[i]);
- glyph[i] = get_glyph(font_info, glyph_num[i]);
-
- pango_font_get_glyph_extents (font_info->font,
- glyph[i], &ink_rects[i], &logical_rect);
-
- /* Assign the base char width to the last character in the cluster */
- if (i==0)
- {
- widths[i] = 0;
- widths[cluster_size-1] = logical_rect.width;
- }
- else if (i < cluster_size-1)
- widths[i] = 0;
- }
-}
-
-static void
-hebrew_engine_shape (PangoFont *font,
- const char *text,
- gint length,
- PangoAnalysis *analysis,
- PangoGlyphString *glyphs)
-{
- HebrewFontInfo *font_info;
- const char *p;
- const char *log_cluster;
- gunichar cluster[MAX_CLUSTER_CHRS];
- gint cluster_size;
- gint glyph_num[MAX_CLUSTER_CHRS];
- gint glyph_width[MAX_CLUSTER_CHRS], x_offset[MAX_CLUSTER_CHRS], y_offset[MAX_CLUSTER_CHRS];
- PangoRectangle ink_rects[MAX_CLUSTER_CHRS];
- PangoGlyph glyph[MAX_CLUSTER_CHRS];
-
- pango_glyph_string_set_size (glyphs, 0);
-
- font_info = get_font_info (font);
-
- p = text;
- while (p < text + length)
- {
- log_cluster = p;
- p = hebrew_shaper_get_next_cluster (p, text + length - p,
- /* output */
- cluster, &cluster_size);
- get_cluster_glyphs(font_info,
- font,
- cluster,
- cluster_size,
- /* output */
- glyph_num,
- glyph,
- glyph_width,
- ink_rects);
-#if 0
- {
- int i;
- for (i=0; i< cluster_size; i++)
- {
- printf("cluster %d: U+%04x %d\n", i, glyph_num[i], glyph_width[i]);
- }
- }
-#endif
-
- /* Kern the glyphs! */
- hebrew_shaper_get_cluster_kerning(cluster,
- cluster_size,
- /* Input and output */
- ink_rects,
- glyph_width,
- /* output */
- x_offset,
- y_offset);
-
-
-#if 0
- old_add_cluster (font_info, glyphs, log_cluster - text, cluster, cluster_size);
-#endif
- add_cluster(font_info,
- font,
- glyphs,
- cluster_size,
- log_cluster - text,
- glyph_num,
- glyph,
- glyph_width,
- x_offset,
- y_offset);
-
- }
-
- /* Simple bidi support */
- if (analysis->level % 2)
- hebrew_shaper_bidi_reorder(glyphs);
-}
-
-static PangoCoverage *
-hebrew_engine_get_coverage (PangoFont *font,
- PangoLanguage *lang)
-{
- PangoCoverage *result = pango_coverage_new ();
-
- HebrewFontInfo *font_info = get_font_info (font);
-
- if (font_info->type != HEBREW_FONT_NONE)
- {
- gunichar wc;
-
- for (wc = 0x590; wc <= 0x5f4; wc++)
- pango_coverage_set (result, wc, PANGO_COVERAGE_EXACT);
- }
-
- return result;
-}
-
-static PangoEngine *
-hebrew_engine_x_new ()
-{
- PangoEngineShape *result;
-
- result = g_new (PangoEngineShape, 1);
-
- result->engine.id = SCRIPT_ENGINE_NAME;
- result->engine.type = PANGO_ENGINE_TYPE_SHAPE;
- result->engine.length = sizeof (result);
- result->script_shape = hebrew_engine_shape;
- result->get_coverage = hebrew_engine_get_coverage;
-
- return (PangoEngine *)result;
-}
-
-/* List the engines contained within this module
- */
-void
-PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines,
- int *n_engines)
-{
- *engines = script_engines;
- *n_engines = G_N_ELEMENTS (script_engines);
-}
-
-/* Load a particular engine given the ID for the engine
- */
-PangoEngine *
-PANGO_MODULE_ENTRY(load) (const char *id)
-{
- if (!strcmp (id, SCRIPT_ENGINE_NAME))
- return hebrew_engine_x_new ();
- else
- return NULL;
-}
-
-void
-PANGO_MODULE_ENTRY(unload) (PangoEngine *engine)
-{
-}
diff --git a/modules/indic/Makefile.am b/modules/indic/Makefile.am
index 2501d6f4..4da765d1 100644
--- a/modules/indic/Makefile.am
+++ b/modules/indic/Makefile.am
@@ -21,69 +21,6 @@ moduledir = $(libdir)/pango/$(PANGO_MODULE_VERSION)/modules
module_LTLIBRARIES =
noinst_LTLIBRARIES =
-if HAVE_X
-INCLUDES += $(X_CFLAGS)
-if INCLUDE_MYANMAR_X
-noinst_LTLIBRARIES += libpango-myanmar-x.la
-else
-module_LTLIBRARIES += pango-myanmar-x.la
-endif
-
-if INCLUDE_GURMUKHI_X
-noinst_LTLIBRARIES += libpango-gurmukhi-x.la
-else
-module_LTLIBRARIES += pango-gurmukhi-x.la
-endif
-
-if INCLUDE_BENGALI_X
-noinst_LTLIBRARIES += libpango-bengali-x.la
-else
-module_LTLIBRARIES += pango-bengali-x.la
-endif
-
-if INCLUDE_DEVANAGARI_X
-noinst_LTLIBRARIES += libpango-devanagari-x.la
-else
-module_LTLIBRARIES += pango-devanagari-x.la
-endif
-
-if INCLUDE_GUJARATI_X
-noinst_LTLIBRARIES += libpango-gujarati-x.la
-else
-module_LTLIBRARIES += pango-gujarati-x.la
-endif
-endif
-
-pango_devanagari_x_la_LDFLAGS = -export-dynamic -avoid-version -module
-pango_devanagari_x_la_LIBADD = $(pangoxlibs)
-pango_devanagari_x_la_SOURCES = devanagari-x.c pango-indic-script.h
-libpango_devanagari_x_la_SOURCES = devanagari-x.c pango-indic-script.h
-libpango_devanagari_x_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_devanagari_x
-
-pango_myanmar_x_la_LDFLAGS = -export-dynamic -avoid-version -module
-pango_myanmar_x_la_LIBADD = $(pangoxlibs)
-pango_myanmar_x_la_SOURCES = myanmar-x.c pango-indic-script.h
-libpango_myanmar_x_la_SOURCES = myanmar-x.c pango-indic-script.h
-libpango_myanmar_x_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_myanmar_x
-
-pango_gurmukhi_x_la_LDFLAGS = -export-dynamic -avoid-version -module
-pango_gurmukhi_x_la_LIBADD = $(pangoxlibs)
-pango_gurmukhi_x_la_SOURCES = gurmukhi-x.c pango-indic-script.h
-libpango_gurmukhi_x_la_SOURCES = gurmukhi-x.c pango-indic-script.h
-libpango_gurmukhi_x_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_gurmukhi_x
-
-pango_bengali_x_la_LDFLAGS = -export-dynamic -avoid-version -module
-pango_bengali_x_la_LIBADD = $(pangoxlibs)
-pango_bengali_x_la_SOURCES = bengali-x.c pango-indic-script.h
-libpango_bengali_x_la_SOURCES = bengali-x.c pango-indic-script.h
-libpango_bengali_x_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_bengali_x
-
-pango_gujarati_x_la_LDFLAGS = -export-dynamic -avoid-version -module
-pango_gujarati_x_la_LIBADD = $(pangoxlibs)
-pango_gujarati_x_la_SOURCES = gujarati-x.c pango-indic-script.h
-libpango_gujarati_x_la_SOURCES = gujarati-x.c pango-indic-script.h
-libpango_gujarati_x_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_gujarati_x
-
if HAVE_XFT
INCLUDES += $(XFT_CFLAGS)
diff --git a/modules/indic/bengali-x.c b/modules/indic/bengali-x.c
deleted file mode 100644
index 7f74abe8..00000000
--- a/modules/indic/bengali-x.c
+++ /dev/null
@@ -1,309 +0,0 @@
-/* Pango - Bengali module
- * bengali.c:
- *
- * Copyright (C) 2000 Robert Brady,
- * (C) 2000 SuSE Linux Ltd.
- *
- * Author: Robert Brady <rwb197@zepler.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * Licence as published by the Free Software Foundation; either
- * version 2 of the licence, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public Licence for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * Licence along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * This is the renderer for Bengali script.
- *
- * This script is used to write many languages including the
- * following.
- *
- * as Assamese
- * bn Bengali
- * kha Khasi
- * mni Manipuri
- * mun Munda
- * sat Santali
- *
- */
-
-
-#include <glib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "pangox.h"
-#include "pango-indic.h"
-#include "pango-engine.h"
-
-#define SCRIPT_STRING "Bengali"
-#define SCRIPT_ENGINE_NAME SCRIPT_STRING "ScriptEngineX"
-#define ISCII_BASED
-#define RANGE_START 0x980
-#define RANGE_SIZE 0x80
-
-#include "pango-indic-script.h"
-
-static gboolean is_prefixing_vowel (gunichar i);
-static gboolean is_vowel_sign (gunichar i);
-static gboolean is_vowel_half (gunichar i);
-static gunichar vowel_sign_to_matra (gunichar i);
-static gboolean vowel_split (gunichar i, gunichar *a, gunichar *b);
-
-static PangoIndicScript script = {
- SCRIPT_STRING,
- &is_prefixing_vowel,
- &is_vowel_sign,
- &vowel_sign_to_matra,
- &is_vowel_half,
- &vowel_split,
-};
-
-static gunichar
-vowel_sign_to_matra (gunichar i)
-{
- if (!is_vowel_sign (i))
- return i;
- return i + 0x987 - 0x9c8;
-}
-
-gboolean
-vowel_split (gunichar i, gunichar *a, gunichar *b)
-{
- if (i == 0x9cb || i == 0x9cc) {
- if (a)
- *a = 0x9c7;
- if (b) {
- if (i == 0x9cc)
- *b = 0xe9d7;
- else
- *b = 0xe9be;
- }
- return TRUE;
- }
- return FALSE;
-}
-
-#define RA_SUPERSCRIPT 0xe9ff
-#define RA_SUBSCRIPT 0xe9fe
-
-static char *default_charset = "iso10646-bng";
-
-static PangoEngineRange pango_indic_range[] =
-{
- {RANGE_START, RANGE_END, "*"},
-};
-
-SCRIPT_ENGINE_DEFINITION
-
-static PangoCoverage *
-pango_indic_engine_get_coverage (PangoFont * font, PangoLanguage *lang)
-{
- gunichar i;
- PangoCoverage *result = pango_coverage_new ();
- PangoXSubfont subfont;
-
- int dev_font = pango_x_find_first_subfont (font, &default_charset, 1, &subfont);
-
- if (dev_font)
- {
- for (i = RANGE_START; i <= RANGE_END; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_EXACT);
-
- pango_coverage_set (result, 0x10000, PANGO_COVERAGE_EXACT);
- }
-
- return result;
-}
-
-static gboolean
-is_vowel_sign (gunichar i)
-{
- /* one that combines, whether or not it spaces */
- return (i >= 0x9BE && i <= 0x9Cc) || (i >= 0x9E2 && i <= 0x9E3);
-}
-
-static int
-is_consonant (int i)
-{
- return (i >= 0x995 && i <= 0x9b9) || (i >= 0x9dc && i <= 0x9df) || (i >= 0x9f0 && i <= 0x09f1);
-}
-
-static int
-is_ind_vowel (int i)
-{
- return (i >= 0x985 && i <= 0x994);
-}
-
-static gboolean
-is_vowel_half (gunichar i)
-{
- return (i == 0xe9d7) || (i == 0xe9be) || (i == 0x9d7);
-}
-
-static int
-is_prefixing_vowel (gunichar what)
-{
- return (what == 0x9bf) || (what == 0x9c7) || (what == 0x9c8);
-}
-
-static void
-pango_indic_make_ligs (gunichar * start, gunichar * end)
-{
- int num = end - start;
- int i;
-
- for (i = 0; i < num; i++)
- {
- gunichar t0 = pango_indic_get_char (start + i, end);
- gunichar t1 = pango_indic_get_char (start + 1 + i, end);
-
- if ((t0 == VIRAMA) && (t1 == 0x9af))
- {
- start[i+0] = 0;
- start[i+1] = 0xe9fd;
- }
- }
-
- if (start[0] == RA && start[1] == VIRAMA && is_consonant (start[2]))
- {
- start[0] = 0;
- start[1] = start[2];
- start[2] = RA_SUPERSCRIPT;
- }
-
- for (i = 0; i < (num - 1); i++)
- {
- if (start[i] == VIRAMA)
- {
- if (start[i+1] == RA)
- {
- start[i] = 0;
- start[i+1] = RA_SUBSCRIPT;
- break;
- }
- }
- }
-
-}
-
-static void
-pango_indic_engine_shape (PangoFont * font,
- const char *text,
- int length,
- PangoAnalysis * analysis, PangoGlyphString * glyphs)
-{
- PangoXSubfont subfont;
-
- int n_chars, n_glyph;
- int lvl;
- int i;
- gunichar *wc;
- int sb;
- int n_syls;
- gunichar **syls = g_new (gunichar *, 2);
- g_return_if_fail (font != NULL);
- g_return_if_fail (text != NULL);
- g_return_if_fail (length >= 0);
- g_return_if_fail (analysis != NULL);
-
- n_chars = n_glyph = g_utf8_strlen (text, length);
- lvl = pango_x_find_first_subfont (font, &default_charset, 1, &subfont);
- if (!lvl)
- {
- pango_x_fallback_shape (font, glyphs, text, n_chars);
- return;
- }
-
- pango_indic_split_out_characters (&script, text, n_chars, &wc,
- &n_glyph, glyphs);
- pango_indic_convert_vowels (&script, TRUE, &n_glyph, wc,
- pango_x_has_glyph (font,
- PANGO_X_MAKE_GLYPH (subfont, 0xc9bd)));
-
- n_syls = 1;
- syls[0] = wc;
- sb = glyphs->log_clusters[0];
- for (i = 0; i < n_glyph; i++)
- {
- if (i && (is_consonant (wc[i]) | is_ind_vowel (wc[i]))
- && wc[i - 1] != VIRAMA)
- {
- syls = g_renew (gunichar *, syls, n_syls + 2);
- syls[n_syls] = wc + i;
- n_syls++;
- sb = glyphs->log_clusters[i];
- }
- glyphs->log_clusters[i] = sb;
- }
- syls[n_syls] = wc + i;
-
- for (i = 0; i < n_syls; i++)
- {
- pango_indic_make_ligs (syls[i], syls[i+1]);
- pango_indic_shift_vowels (&script, syls[i], syls[i + 1]);
- }
-
- pango_indic_compact (&script, &n_glyph, wc, glyphs->log_clusters);
- pango_x_apply_ligatures (font, subfont, &wc, &n_glyph, &glyphs->log_clusters);
- pango_indic_compact (&script, &n_glyph, wc, glyphs->log_clusters);
- pango_glyph_string_set_size (glyphs, n_glyph);
-
- for (i = 0; i < n_glyph; i++)
- {
- PangoRectangle logical_rect;
- glyphs->glyphs[i].glyph = PANGO_X_MAKE_GLYPH (subfont, wc[i]);
- pango_font_get_glyph_extents (font, glyphs->glyphs[i].glyph,
- NULL, &logical_rect);
- glyphs->glyphs[i].geometry.x_offset = 0;
- glyphs->glyphs[i].geometry.y_offset = 0;
- glyphs->glyphs[i].geometry.width = logical_rect.width;
- }
- g_free (syls);
-}
-
-static PangoEngine *
-pango_indic_engine_x_new ()
-{
- PangoEngineShape *result;
- result = g_new (PangoEngineShape, 1);
- result->engine.id = SCRIPT_ENGINE_NAME;
- 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;
-}
-
-void
-PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines,
- int *n_engines)
-{
- *engines = script_engines;
- *n_engines = n_script_engines;
-}
-
-PangoEngine *
-PANGO_MODULE_ENTRY(load) (const char *id)
-{
- if (!strcmp (id, SCRIPT_ENGINE_NAME))
- return pango_indic_engine_x_new ();
- else
- return NULL;
-}
-
-void
-PANGO_MODULE_ENTRY(unload) (PangoEngine *engine)
-{
-}
-
diff --git a/modules/indic/devanagari-x.c b/modules/indic/devanagari-x.c
deleted file mode 100644
index 865124e3..00000000
--- a/modules/indic/devanagari-x.c
+++ /dev/null
@@ -1,361 +0,0 @@
-/* Pango - Devanagari module
- *
- * Copyright (C) 2000 SuSE Linux Ltd
- * Author: Robert Brady <robert@suse.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * Licence as published by the Free Software Foundation; either
- * version 2.1 of the Licence, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public Licence for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * Licence along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * This is the renderer for the Devanagari script.
- *
- * This script is used to write many languages, including the
- * following.
- *
- * awa Awadhi bh Bihari bra Braj Bhasa
- * gon Gondhi hi Hindi kok Konkani
- * mr Marathi new Newari ne Nepali
- * sa Sanskrit sat Santali
- *
- * For a description of the rendering algorithm, see section 9.1 of
- * /The Unicode Standard Version 3.0/.
- */
-
-
-#include <glib.h>
-#include <string.h>
-
-#include "pangox.h"
-#include "pango-engine.h"
-
-#define RANGE_START 0x900
-#define RANGE_SIZE 0x80
-
-#define ISCII_BASED
-#define SCRIPT_STRING "Devanagari"
-#define SCRIPT_ENGINE_NAME SCRIPT_STRING "ScriptEngineX"
-
-#include "pango-indic.h"
-#include "pango-indic-script.h"
-
-static gboolean is_prefixing_vowel (gunichar i);
-static gboolean is_vowel_sign (gunichar i);
-static gunichar vowel_sign_to_matra (gunichar i);
-
-static PangoIndicScript script =
-{
- SCRIPT_STRING,
- &is_prefixing_vowel,
- &is_vowel_sign,
- &vowel_sign_to_matra,
- NULL, /* no split vowels for Devanagari */
-};
-
-#define INTERMEDIATE_HALF_FORM_OFFSET 0xf000
-#define FINAL_HALF_FORM_OFFSET 0xe000
-
-#define RA_SUPERSCRIPT 0xc97f
-#define RA_SUBSCRIPT 0xc97e
-
-static char *default_charset = "iso10646-dev";
-
-static PangoEngineRange pango_indic_range[] =
-{
- {RANGE_START, RANGE_END, "*"},
- {PANGO_ZERO_WIDTH_JOINER, PANGO_ZERO_WIDTH_JOINER, "*"},
-};
-
-SCRIPT_ENGINE_DEFINITION
-
-static PangoCoverage *
-pango_indic_engine_get_coverage (PangoFont * font, PangoLanguage *lang)
-{
- gunichar i;
- PangoCoverage *result = pango_coverage_new ();
- PangoXSubfont subfont;
-
- int dev_font = pango_x_find_first_subfont (font, &default_charset, 1, &subfont);
-
- if (dev_font)
- {
- for (i = RANGE_START; i <= RANGE_END; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_EXACT);
-
- pango_coverage_set (result, PANGO_ZERO_WIDTH_JOINER, PANGO_COVERAGE_EXACT);
- }
-
- return result;
-}
-
-static gboolean
-is_vowel_sign (gunichar i)
-{
- /* one that combines, whether or not it spaces */
- return (i >= 0x93E && i <= 0x94c) || (i >= 0x962 && i <= 0x963);
-}
-
-static int
-is_consonant (int i)
-{
- return (i >= 0x915 && i <= 0x939) || (i >= 0x958 && i <= 0x95f);
-}
-
-static int
-is_ind_vowel (int i)
-{
- return (i >= 0x905 && i <= 0x914);
-}
-
-static gunichar
-vowel_sign_to_matra (gunichar i)
-{
- if (is_vowel_sign (i))
- return i + 0x905 - 0x93e;
- return i;
-}
-
-static gboolean
-is_prefixing_vowel (gunichar i)
-{
- return i == 0x93f;
-}
-
-static void
-dev_mini_shuffle (gunichar *s, gunichar *e)
-{
- gunichar *dest = s;
- while (s < e)
- {
- if (*s)
- {
- *dest = *s;
- dest++;
- }
- s++;
- }
- while (dest < e)
- {
- *dest = 0;
- dest++;
- }
-}
-
-static int
-is_intermediate_form (int q)
-{
- return (q >= 0xf000 && q <= 0xffff);
-}
-
-static int
-is_consonantal_form (int q)
-{
- return (q == PANGO_ZERO_WIDTH_JOINER) || is_consonant (q) || (q >= 0xd000);
-}
-
-static int
-nominal_form (int q)
-{
- return q - 0xf000;
-}
-
-static int
-half_form (int q)
-{
- return (q & 0xfff) + 0xe000;
-}
-
-static void
-shuffle_one_along (gunichar *start, gunichar *end)
-{
- end--;
- if (*end != 0)
- g_printerr ("pango devanagari error, please report. bad shuffle!\n");
- while (end > start)
- {
- end[0] = end[-1];
- end--;
- }
- start[0] = 0;
-}
-
-static void
-pango_indic_make_ligs (gunichar * start, gunichar * end)
-{
- int num = end - start;
- int i;
-
- for (i = 0; i < (end - start); i++)
- {
- gunichar t0 = pango_indic_get_char (start + i, end);
- gunichar t1 = pango_indic_get_char (start + 1 + i, end);
-
- if (is_consonant (t0) && t1 == VIRAMA)
- {
- start[i+0] = t0 + INTERMEDIATE_HALF_FORM_OFFSET;
- start[i+1] = 0;
- }
- }
-
- if (num > 2 && start[0] == INTERMEDIATE_HALF_FORM_OFFSET + RA)
- {
- for (i=1;i<num;i++)
- start[i-1] = start[i];
-
- start[num-1] = RA_SUPERSCRIPT;
- }
-
- dev_mini_shuffle (start, end);
-
- for (i = 0; i < (end - start - 1); i++)
- if (is_intermediate_form (start[i]))
- {
- if (start[i+1] == RA)
- {
- start[i] = nominal_form (start[i]);
- start[i+1] = RA_SUBSCRIPT;
- }
- else if (start[i+1] == (RA + INTERMEDIATE_HALF_FORM_OFFSET))
- {
- start[i] = nominal_form (start[i]);
- start[i+1] = RA_SUBSCRIPT;
- shuffle_one_along (start+2, end);
- start[i+2] = VIRAMA;
- }
- }
-}
-
-static void
-pango_indic_engine_shape (PangoFont * font,
- const char *text,
- int length,
- PangoAnalysis * analysis,
- PangoGlyphString * glyphs)
-{
- PangoXSubfont subfont;
-
- int n_chars, n_glyph;
- int lvl;
- int i;
- gunichar *wc;
- int sb;
- int n_syls;
- gunichar **syls = g_new (gunichar *, 2);
-
- g_return_if_fail (font != NULL);
- g_return_if_fail (text != NULL);
- g_return_if_fail (length >= 0);
- g_return_if_fail (analysis != NULL);
-
- n_chars = n_glyph = g_utf8_strlen (text, length);
- lvl = pango_x_find_first_subfont (font, &default_charset, 1, &subfont);
- if (!lvl)
- {
- pango_x_fallback_shape (font, glyphs, text, n_chars);
- return;
- }
-
- pango_indic_split_out_characters (&script, text, n_chars, &wc, &n_glyph,
- glyphs);
- pango_indic_convert_vowels (&script, TRUE, &n_glyph, wc,
- pango_x_has_glyph (font,
- PANGO_X_MAKE_GLYPH(subfont, 0xc93e)));
-
- n_syls = 1;
- syls[0] = wc;
- sb = glyphs->log_clusters[0];
- for (i = 0; i < n_chars; i++)
- {
- if (i && (is_consonant (wc[i]) | is_ind_vowel (wc[i]))
- && wc[i - 1] != VIRAMA)
- {
- syls = g_renew (gunichar *, syls, n_syls + 2);
- syls[n_syls] = wc + i;
- n_syls++;
- sb = glyphs->log_clusters[i];
- }
- glyphs->log_clusters[i] = sb;
- }
- syls[n_syls] = wc + i;
-
- for (i = 0; i < n_syls; i++)
- {
- pango_indic_make_ligs (syls[i], syls[i+1]);
- pango_indic_shift_vowels (&script, syls[i], syls[i + 1]);
- }
-
- pango_indic_compact (&script, &n_glyph, wc, glyphs->log_clusters);
- pango_x_apply_ligatures (font, subfont, &wc, &n_glyph, &glyphs->log_clusters);
- pango_indic_compact (&script, &n_glyph, wc, glyphs->log_clusters);
- pango_glyph_string_set_size (glyphs, n_glyph);
-
- for (i = 0; i < n_glyph; i++)
- {
- PangoRectangle logical_rect;
-#if 0
- if (i && (wc[i] == VIRAMA) && (wc[i-1] == RA_SUBSCRIPT))
- {
- wc[i] = LOWER_VIRAMA_GLYPH;
- }
-#endif
- if ((i != (n_glyph - 1)) && is_intermediate_form (wc[i]) &&
- is_consonantal_form (wc[i+1]))
- {
- wc[i] = half_form (wc[i]);
- }
- glyphs->glyphs[i].glyph = PANGO_X_MAKE_GLYPH (subfont, wc[i]);
- pango_font_get_glyph_extents (font, glyphs->glyphs[i].glyph,
- NULL, &logical_rect);
- glyphs->glyphs[i].geometry.x_offset = 0;
- glyphs->glyphs[i].geometry.y_offset = 0;
- glyphs->glyphs[i].geometry.width = logical_rect.width;
- }
- g_free (syls);
-}
-
-static PangoEngine *
-pango_indic_engine_x_new ()
-{
- PangoEngineShape *result;
- result = g_new (PangoEngineShape, 1);
- result->engine.id = SCRIPT_ENGINE_NAME;
- 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;
-}
-
-void
-PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines,
- int *n_engines)
-{
- *engines = script_engines;
- *n_engines = n_script_engines;
-}
-
-PangoEngine *
-PANGO_MODULE_ENTRY(load) (const char *id)
-{
- if (!strcmp (id, SCRIPT_ENGINE_NAME))
- return pango_indic_engine_x_new ();
- else
- return NULL;
-}
-
-void
-PANGO_MODULE_ENTRY(unload) (PangoEngine *engine)
-{
-}
diff --git a/modules/indic/gujarati-x.c b/modules/indic/gujarati-x.c
deleted file mode 100644
index f414a38a..00000000
--- a/modules/indic/gujarati-x.c
+++ /dev/null
@@ -1,337 +0,0 @@
-/* Pango - Gujarati module
- *
- * Copyright (C) 2000 SuSE Linux Ltd
- * Author: Robert Brady <robert@suse.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * Licence as published by the Free Software Foundation; either
- * version 2.1 of the Licence, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public Licence for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * Licence along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- */
-
-
-#include <glib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "pangox.h"
-
-#define RANGE_START 0xA80
-#define RANGE_SIZE 0x80
-
-#define ISCII_BASED
-#define SCRIPT_STRING "Gujarati"
-#define SCRIPT_ENGINE_NAME SCRIPT_STRING "ScriptEngineX"
-
-#include "pango-indic.h"
-#include "pango-indic-script.h"
-#include "pango-engine.h"
-
-static gboolean is_prefixing_vowel (gunichar i);
-static gboolean is_vowel_sign (gunichar i);
-
-static PangoIndicScript script = {
- SCRIPT_STRING,
- &is_prefixing_vowel,
- &is_vowel_sign,
- NULL, /* vowel sign to matra must die! */
- NULL, /* no split vowels for Devanagari */
-};
-
-#define INTERMEDIATE_HALF_FORM_OFFSET 0xf000
-#define FINAL_HALF_FORM_OFFSET 0xe000
-#define RA_SUPERSCRIPT 0xeaff
-#define RA_SUBSCRIPT 0xeafe
-
-static char *default_charset = "iso10646-guj";
-
-static PangoEngineRange pango_indic_range[] =
-{
- {RANGE_START, RANGE_END, "*"},
- {PANGO_ZERO_WIDTH_JOINER, PANGO_ZERO_WIDTH_JOINER, "*"},
-};
-
-SCRIPT_ENGINE_DEFINITION
-
-static PangoCoverage *
-pango_indic_engine_get_coverage (PangoFont * font, PangoLanguage *lang)
-{
- gunichar i;
- PangoCoverage *result = pango_coverage_new ();
- PangoXSubfont subfont;
-
- int dev_font = pango_x_find_first_subfont (font, &default_charset, 1, &subfont);
-
- if (dev_font)
- {
- for (i = RANGE_START; i <= RANGE_END; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_EXACT);
-
- pango_coverage_set (result, PANGO_ZERO_WIDTH_JOINER, PANGO_COVERAGE_EXACT);
- }
-
- return result;
-}
-
-static gboolean
-is_vowel_sign (gunichar i)
-{
- /* one that combines, whether or not it spaces */
- return (i >= 0xABE && i <= 0xACC);
-}
-
-static int
-is_consonant (int i)
-{
- return (i >= 0xA95 && i <= 0xAB9) || (i == 0xAE0);
-}
-
-static int
-is_ind_vowel (int i)
-{
- return (i >= 0xA85 && i <= 0xA94);
-}
-
-static gboolean
-is_prefixing_vowel (gunichar i)
-{
- return i == 0xABF;
-}
-
-static void
-dev_mini_shuffle (gunichar *s, gunichar *e)
-{
- gunichar *dest = s;
- while (s < e)
- {
- if (*s)
- {
- *dest = *s;
- dest++;
- }
- s++;
- }
- while (dest < e)
- {
- *dest = 0;
- dest++;
- }
-}
-
-static int
-is_intermediate_form (int q)
-{
- return (q >= 0xf000 && q <= 0xffff);
-}
-
-static int
-is_consonantal_form (int q)
-{
- return (q == PANGO_ZERO_WIDTH_JOINER) || is_consonant (q) || (q >= 0xc000);
-}
-
-static int
-nominal_form (int q)
-{
- return q - 0xf000;
-}
-
-static int
-half_form (int q)
-{
- return (q & 0xfff) + 0xe000;
-}
-
-static void
-shuffle_one_along (gunichar *start, gunichar *end)
-{
- end--;
- if (*end != 0)
- {
- return;
- }
- while (end > start)
- {
- end[0] = end[-1];
- end--;
- }
- start[0] = 0;
-}
-
-static void
-pango_indic_make_ligs (gunichar * start, gunichar * end)
-{
- int num = end - start;
- int i;
-
- for (i = 0; i < (end - start); i++)
- {
- gunichar t0 = pango_indic_get_char (start + i, end);
- gunichar t1 = pango_indic_get_char (start + 1 + i, end);
-
- if (is_consonant (t0) && t1 == VIRAMA)
- {
- start[i+0] = t0 + INTERMEDIATE_HALF_FORM_OFFSET;
- start[i+1] = 0;
- }
- }
-
- while (num && !is_consonant (start[num-1]))
- {
- num--;
- }
- if (num > 2 && start[0] == INTERMEDIATE_HALF_FORM_OFFSET + RA)
- {
- for (i=1;i<num;i++)
- {
- start[i-1] = start[i];
- }
- start[num-1] = RA_SUPERSCRIPT;
- }
-
- dev_mini_shuffle (start, end);
-
- for (i = 0; i < (end - start - 1); i++)
- if (is_intermediate_form (start[i]))
- {
- if (start[i+1] == RA)
- {
- start[i] = nominal_form (start[i]);
- start[i+1] = RA_SUBSCRIPT;
- }
- else if (start[i+1] == (RA + INTERMEDIATE_HALF_FORM_OFFSET))
- {
- start[i] = nominal_form (start[i]);
- start[i+1] = RA_SUBSCRIPT;
- shuffle_one_along (start+2, end);
- start[i+2] = VIRAMA;
- }
- }
-}
-
-static void
-pango_indic_engine_shape (PangoFont * font,
- const char *text,
- int length,
- PangoAnalysis * analysis, PangoGlyphString * glyphs)
-{
- PangoXSubfont subfont;
-
- int n_chars, n_glyph;
- int lvl;
- int i;
- gunichar *wc;
- int sb;
- int n_syls;
- gunichar **syls = g_new (gunichar *, 2);
-
- g_return_if_fail (font != NULL);
- g_return_if_fail (text != NULL);
- g_return_if_fail (length >= 0);
- g_return_if_fail (analysis != NULL);
-
- n_chars = n_glyph = g_utf8_strlen (text, length);
- lvl = pango_x_find_first_subfont (font, &default_charset, 1, &subfont);
- if (!lvl)
- {
- pango_x_fallback_shape (font, glyphs, text, n_chars);
- return;
- }
-
- pango_indic_split_out_characters (&script, text, n_chars, &wc,
- &n_glyph, glyphs);
- pango_indic_convert_vowels (&script, TRUE, &n_glyph, wc, FALSE);
-
- n_syls = 1;
- syls[0] = wc;
- sb = glyphs->log_clusters[0];
- for (i = 0; i < n_chars; i++)
- {
- if (i && (is_consonant (wc[i]) | is_ind_vowel (wc[i]))
- && wc[i - 1] != VIRAMA)
- {
- syls = g_renew (gunichar *, syls, n_syls + 2);
- syls[n_syls] = wc + i;
- n_syls++;
- sb = glyphs->log_clusters[i];
- }
- glyphs->log_clusters[i] = sb;
- }
- syls[n_syls] = wc + i;
-
- for (i = 0; i < n_syls; i++)
- {
- pango_indic_make_ligs (syls[i], syls[i+1]);
- pango_indic_shift_vowels (&script, syls[i], syls[i + 1]);
- }
-
- pango_indic_compact (&script, &n_glyph, wc, glyphs->log_clusters);
- pango_x_apply_ligatures (font, subfont, &wc, &n_glyph, &glyphs->log_clusters);
- pango_indic_compact (&script, &n_glyph, wc, glyphs->log_clusters);
- pango_glyph_string_set_size (glyphs, n_glyph);
-
- for (i = 0; i < n_glyph; i++)
- {
- PangoRectangle logical_rect;
- if ((i != (n_glyph - 1)) && is_intermediate_form (wc[i]) &&
- is_consonantal_form (wc[i+1]))
- {
- wc[i] = half_form (wc[i]);
- }
- glyphs->glyphs[i].glyph = PANGO_X_MAKE_GLYPH (subfont, wc[i]);
- pango_font_get_glyph_extents (font, glyphs->glyphs[i].glyph,
- NULL, &logical_rect);
- glyphs->glyphs[i].geometry.x_offset = 0;
- glyphs->glyphs[i].geometry.y_offset = 0;
- glyphs->glyphs[i].geometry.width = logical_rect.width;
- }
- g_free (syls);
-}
-
-static PangoEngine *
-pango_indic_engine_x_new ()
-{
- PangoEngineShape *result;
- result = g_new (PangoEngineShape, 1);
- result->engine.id = SCRIPT_ENGINE_NAME;
- 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;
-}
-
-void
-PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines,
- int *n_engines)
-{
- *engines = script_engines;
- *n_engines = n_script_engines;
-}
-
-PangoEngine *
-PANGO_MODULE_ENTRY(load) (const char *id)
-{
- if (!strcmp (id, SCRIPT_ENGINE_NAME))
- return pango_indic_engine_x_new ();
- else
- return NULL;
-}
-
-void
-PANGO_MODULE_ENTRY(unload) (PangoEngine * engine)
-{
-}
diff --git a/modules/indic/gurmukhi-x.c b/modules/indic/gurmukhi-x.c
deleted file mode 100644
index 6187f937..00000000
--- a/modules/indic/gurmukhi-x.c
+++ /dev/null
@@ -1,252 +0,0 @@
-/* Pango - Gurmukhi module
- * gurmukhi.c:
- *
- * Copyright (C) 2000 SuSE Linux Ltd
- * Author: Robert Brady <robert@suse.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * This is the renderer for Gurmukhi. This script is primarily used
- * to write the Panjabi (pa) language.
- */
-
-
-#include <glib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "pangox.h"
-#include "pango-indic.h"
-#include "pango-engine.h"
-
-#define RANGE_START 0xa00
-#define RANGE_SIZE 0x80
-#define SCRIPT_STRING "Gurmukhi"
-#define SCRIPT_ENGINE_NAME SCRIPT_STRING "ScriptEngineX"
-#define ISCII_BASED
-
-#include "pango-indic-script.h"
-
-static gboolean is_prefixing_vowel (gunichar i);
-static gunichar vowel_sign_to_matra (gunichar i);
-static gboolean is_vowel_sign (gunichar i);
-static gboolean is_vowel_half (gunichar i);
-
-static PangoIndicScript script = {
- SCRIPT_STRING,
- &is_prefixing_vowel,
- &is_vowel_sign,
- &vowel_sign_to_matra,
- &is_vowel_half,
-};
-
-#define RA_SUBSCRIPT 0xea7e
-
-static char *default_charset = "iso10646-gur";
-
-static PangoEngineRange pango_indic_range[] =
-{
- {RANGE_START, RANGE_END, "*"},
-};
-
-SCRIPT_ENGINE_DEFINITION
-
-static PangoCoverage *
-pango_indic_engine_get_coverage (PangoFont * font, PangoLanguage *lang)
-{
- gunichar i;
- PangoCoverage *result = pango_coverage_new ();
- PangoXSubfont subfont;
-
- int dev_font = pango_x_find_first_subfont (font, &default_charset, 1, &subfont);
-
- if (dev_font)
- {
- for (i = RANGE_START; i <= RANGE_END; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_EXACT);
-
- }
-
- return result;
-}
-
-static gboolean
-is_vowel_sign (gunichar i)
-{
- /* one that combines, whether or not it spaces */
- return (i >= 0xa3e && i <= 0xa4c);
-}
-
-static gunichar
-vowel_sign_to_matra (gunichar i)
-{
- if (i >= 0xa3e && i <= 0xa4c)
- return i - 0xa3e + 0xa06;
- return i;
-}
-
-static int
-is_consonant (int i)
-{
- return (i >= 0xa15 && i <= 0xa39) ||
- (i >= 0xa59 && i <= 0xa5e);
-}
-
-static int
-is_ind_vowel (int i)
-{
- return (i >= 0xa05 && i <= 0xa14);
-}
-
-static gboolean
-is_vowel_half (gunichar i)
-{
- return 0;
-}
-
-static int
-is_prefixing_vowel (gunichar what)
-{
- return (what == 0xa3f);
-}
-
-static void
-pango_indic_make_ligs (gunichar * start, gunichar * end)
-{
- int i;
- for (i = 0; i < (end-start-2);i++)
- {
- if (is_consonant (start[i]))
- {
- if (start[i+2]==RA && start[i+1]==VIRAMA)
- {
- start[i+1] = 0;
- start[i+2] = RA_SUBSCRIPT;
- }
- }
- }
-}
-
-static void
-pango_indic_engine_shape (PangoFont * font,
- const char *text,
- int length,
- PangoAnalysis * analysis, PangoGlyphString * glyphs)
-{
- PangoXSubfont subfont;
-
- int n_chars, n_glyph;
- int lvl;
- int i;
- gunichar *wc;
- int sb;
- int n_syls;
- gunichar **syls = g_new (gunichar *, 2);
-
- g_return_if_fail (font != NULL);
- g_return_if_fail (text != NULL);
- g_return_if_fail (length >= 0);
- g_return_if_fail (analysis != NULL);
-
- n_chars = n_glyph = g_utf8_strlen (text, length);
- lvl = pango_x_find_first_subfont (font, &default_charset, 1, &subfont);
- if (!lvl)
- {
- pango_x_fallback_shape (font, glyphs, text, n_chars);
- return;
- }
-
- pango_indic_split_out_characters (&script, text, n_chars, &wc,
- &n_glyph, glyphs);
- pango_indic_convert_vowels (&script, TRUE, &n_glyph, wc, FALSE);
-
- n_syls = 1;
- syls[0] = wc;
- sb = glyphs->log_clusters[0];
- for (i = 0; i < n_glyph; i++)
- {
- if (i && (is_consonant (wc[i]) | is_ind_vowel (wc[i]))
- && wc[i - 1] != VIRAMA)
- {
- syls = g_renew (gunichar *, syls, n_syls + 2);
- syls[n_syls] = wc + i;
- n_syls++;
- sb = glyphs->log_clusters[i];
- }
- glyphs->log_clusters[i] = sb;
- }
- syls[n_syls] = wc + i;
-
- for (i = 0; i < n_syls; i++)
- {
- pango_indic_make_ligs (syls[i], syls[i+1]);
- pango_indic_shift_vowels (&script, syls[i], syls[i + 1]);
- }
-
- pango_indic_compact (&script, &n_glyph, wc, glyphs->log_clusters);
- pango_x_apply_ligatures (font, subfont, &wc, &n_glyph, &glyphs->log_clusters);
- pango_indic_compact (&script, &n_glyph, wc, glyphs->log_clusters);
- pango_glyph_string_set_size (glyphs, n_glyph);
-
- for (i = 0; i < n_glyph; i++)
- {
- PangoRectangle logical_rect;
- glyphs->glyphs[i].glyph = PANGO_X_MAKE_GLYPH (subfont, wc[i]);
- pango_font_get_glyph_extents (font, glyphs->glyphs[i].glyph,
- NULL, &logical_rect);
- glyphs->glyphs[i].geometry.x_offset = 0;
- glyphs->glyphs[i].geometry.y_offset = 0;
- glyphs->glyphs[i].geometry.width = logical_rect.width;
- }
- g_free (syls);
-}
-
-static PangoEngine *
-pango_indic_engine_x_new ()
-{
- PangoEngineShape *result;
- result = g_new (PangoEngineShape, 1);
- result->engine.id = SCRIPT_ENGINE_NAME;
- 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;
-}
-
-void
-PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines,
- int *n_engines)
-{
- *engines = script_engines;
- *n_engines = n_script_engines;
-}
-
-PangoEngine *
-PANGO_MODULE_ENTRY(load) (const char *id)
-{
- if (!strcmp (id, SCRIPT_ENGINE_NAME))
- return pango_indic_engine_x_new ();
- else
- return NULL;
-}
-
-void
-PANGO_MODULE_ENTRY(unload) (PangoEngine * engine)
-{
-}
diff --git a/modules/indic/myanmar-x.c b/modules/indic/myanmar-x.c
deleted file mode 100644
index 76dd5c18..00000000
--- a/modules/indic/myanmar-x.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/* Pango - Myanmar module
- * myanmar.c:
- *
- * Copyright (C) 2000 SuSE Linux Ltd
- * Author: Robert Brady <robert@suse.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * This is the renderer for the Burmese (Myanmar) script. This
- * script is used to write the following languages :
- *
- * my Burmese
- * shn Shan
- * mkh Mon
- * pi Pali
- *
- */
-
-
-#include <glib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "pangox.h"
-#include "pango-indic.h"
-#include "pango-engine.h"
-
-#define RANGE_START 0x1000
-#define RANGE_SIZE 0x80
-#define SCRIPT_STRING "Myanmar"
-#define SCRIPT_ENGINE_NAME SCRIPT_STRING "ScriptEngineX"
-#define VIRAMA 0x1039
-
-#include "pango-indic-script.h"
-
-static gboolean is_prefixing_vowel (gunichar i);
-static gboolean is_vowel_sign (gunichar i);
-static gunichar vowel_sign_to_matra (gunichar i);
-
-static PangoIndicScript script = {
- SCRIPT_STRING,
- &is_prefixing_vowel,
- &is_vowel_sign,
- &vowel_sign_to_matra,
-};
-
-static char *default_charset = "iso10646-brm";
-
-static PangoEngineRange pango_indic_range[] =
-{
- {RANGE_START, RANGE_END, "*"},
-};
-
-SCRIPT_ENGINE_DEFINITION
-
-static PangoCoverage *
-pango_engine_get_coverage (PangoFont * font, PangoLanguage *lang)
-{
- gunichar i;
- PangoCoverage *result = pango_coverage_new ();
- PangoXSubfont subfont;
-
- int dev_font = pango_x_find_first_subfont (font, &default_charset, 1, &subfont);
-
- if (dev_font)
- {
- for (i = RANGE_START; i <= RANGE_END; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_EXACT);
-
- }
-
- return result;
-}
-
-static gboolean
-is_vowel_sign (gunichar i)
-{
- /* one that combines, whether or not it spaces */
- return (i >= 0x102c && i <= 0x1032) || (i >= 0x1056 && i <= 0x1059);
-}
-
-static gunichar
-vowel_sign_to_matra (gunichar i)
-{
- if (i >= 0x102d && i <= 0x1032)
- return i - 0x102d + 0x1023;
- return i;
-}
-
-static int
-is_consonant (int i)
-{
- return (i >= 0x1000 && i <= 0x1020) || (i >= 0x1052 && i <= 0x1053);
-}
-
-static int
-is_ind_vowel (int i)
-{
- return (i >= 0x1021 && i <= 0x102a);
-}
-
-static int
-is_prefixing_vowel (gunichar what)
-{
- return (what == 0x1031);
-}
-
-static void
-pango_engine_shape (PangoFont * font,
- const char *text,
- int length,
- PangoAnalysis * analysis, PangoGlyphString * glyphs)
-{
- PangoXSubfont subfont;
-
- int n_chars, n_glyph;
- int lvl;
- int i;
- gunichar *wc;
- int sb;
- int n_syls;
- gunichar **syls = g_new (gunichar *, 2);
-
- g_return_if_fail (font != NULL);
- g_return_if_fail (text != NULL);
- g_return_if_fail (length >= 0);
- g_return_if_fail (analysis != NULL);
-
- n_chars = n_glyph = g_utf8_strlen (text, length);
- lvl = pango_x_find_first_subfont (font, &default_charset, 1, &subfont);
- if (!lvl)
- {
- pango_x_fallback_shape (font, glyphs, text, n_chars);
- return;
- }
-
- pango_indic_split_out_characters (&script, text, n_chars, &wc,
- &n_glyph, glyphs);
- pango_indic_convert_vowels (&script, FALSE, &n_glyph, wc, FALSE);
-
- n_syls = 1;
- syls[0] = wc;
- sb = glyphs->log_clusters[0];
- for (i = 0; i < n_glyph; i++)
- {
- if (i && (is_consonant (wc[i]) | is_ind_vowel (wc[i]))
- && wc[i - 1] != VIRAMA)
- {
- syls = g_renew (gunichar *, syls, n_syls + 2);
- syls[n_syls] = wc + i;
- n_syls++;
- sb = glyphs->log_clusters[i];
- }
- glyphs->log_clusters[i] = sb;
- }
- syls[n_syls] = wc + i;
-
- for (i = 0; i < n_syls; i++)
- {
- pango_indic_shift_vowels (&script, syls[i], syls[i + 1]);
- }
-
- pango_indic_compact (&script, &n_glyph, wc, glyphs->log_clusters);
- while ((i=pango_x_apply_ligatures (font, subfont, &wc, &n_glyph, &glyphs->log_clusters)))
- {
- pango_indic_compact (&script, &n_glyph, wc, glyphs->log_clusters);
- }
- pango_indic_compact (&script, &n_glyph, wc, glyphs->log_clusters);
- pango_glyph_string_set_size (glyphs, n_glyph);
-
- for (i = 0; i < n_glyph; i++)
- {
- PangoRectangle logical_rect;
- glyphs->glyphs[i].glyph = PANGO_X_MAKE_GLYPH (subfont, wc[i]);
- pango_font_get_glyph_extents (font, glyphs->glyphs[i].glyph,
- NULL, &logical_rect);
- glyphs->glyphs[i].geometry.x_offset = 0;
- glyphs->glyphs[i].geometry.y_offset = 0;
- glyphs->glyphs[i].geometry.width = logical_rect.width;
- }
- g_free (syls);
-}
-
-static PangoEngine *
-pango_engine_x_new ()
-{
- PangoEngineShape *result;
- result = g_new (PangoEngineShape, 1);
- result->engine.id = SCRIPT_ENGINE_NAME;
- 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;
-}
-
-void
-PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines,
- int *n_engines)
-{
- *engines = script_engines;
- *n_engines = n_script_engines;
-}
-
-PangoEngine *
-PANGO_MODULE_ENTRY(load) (const char *id)
-{
- if (!strcmp (id, SCRIPT_ENGINE_NAME))
- return pango_engine_x_new ();
- else
- return NULL;
-}
-
-void
-PANGO_MODULE_ENTRY(unload) (PangoEngine * engine)
-{
-}
diff --git a/modules/tamil/Makefile.am b/modules/tamil/Makefile.am
deleted file mode 100644
index b26e3744..00000000
--- a/modules/tamil/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-## Process this file with automake to create Makefile.in.
-
-pangolibs = $(top_builddir)/pango/libpango-$(PANGO_API_VERSION).la $(GLIB_LIBS)
-pangoxlibs = $(top_builddir)/pango/libpangox-$(PANGO_API_VERSION).la $(X_LIBS) $(pangolibs)
-pangoft2libs = $(top_builddir)/pango/libpangoft2-$(PANGO_API_VERSION).la $(FREETYPE_LIBS) $(pangolibs)
-
-INCLUDES = \
- -DPANGO_ENABLE_ENGINE \
- -DG_DISABLE_DEPRECATED \
- $(PANGO_DEBUG_FLAGS) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/pango/ \
- $(GLIB_CFLAGS)
-
-moduledir = $(libdir)/pango/$(PANGO_MODULE_VERSION)/modules
-module_LTLIBRARIES =
-noinst_LTLIBRARIES =
-
-if HAVE_X
-INCLUDES += $(X_CFLAGS)
-if INCLUDE_TAMIL_X
-noinst_LTLIBRARIES += libpango-tamil-x.la
-else
-module_LTLIBRARIES += pango-tamil-x.la
-endif
-endif
-
-x_sources = \
- tamil-x.c \
- tadefs.h
-
-pango_tamil_x_la_LDFLAGS = -export-dynamic -avoid-version -module
-pango_tamil_x_la_LIBADD = $(pangoxlibs)
-pango_tamil_x_la_SOURCES = $(x_sources)
-libpango_tamil_x_la_SOURCES = $(x_sources)
-libpango_tamil_x_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_tamil_x
-
-
-included-modules: $(noinst_LTLIBRARIES)
-
-.PHONY: included-modules
diff --git a/modules/tamil/taconv.c b/modules/tamil/taconv.c
deleted file mode 100644
index 85e15de6..00000000
--- a/modules/tamil/taconv.c
+++ /dev/null
@@ -1,590 +0,0 @@
-/* taconv.h
- * Author: Sivaraj D (sivaraj@tamil.net)
- * Date : 4-Jan-2000
- */
-
-/* Warning: These routines are very inefficient.
- */
-
-#include <stdio.h>
-#include "taconv.h"
-#include "tadefs.h"
-
-/* tsc_find_char: Search the string for given character,
- * and return its position */
-int tsc_find_char(unsigned char *str, unsigned char c)
-{
- int i=0;
- while(str[i]) {
- if (c==str[i])
- return i;
- i++;
- }
- return -1; /* character not found */
-}
-
-/* u_find_char: Search the string of integers for given unicode character
- * and return its position */
-int u_find_char(unsigned int *str, unsigned int c)
-{
- int i=0;
- while(str[i]) {
- if (c==str[i])
- return i;
- i++;
- }
- return -1; /* character not found */
-}
-
-int tsc2uni(unsigned char *tsc_str, unsigned int *uni_str,
- int *num_tsc, int *num_uni,
- int num_in_left, int num_out_left)
-{
- int i = 0, pos;
- unsigned char c1, c2, c3;
-
- /* default is 1 char */
- *num_tsc = 1;
- *num_uni = 1;
-
- if (num_in_left > 0)
- c1 = tsc_str[0];
- else
- return TA_INSUF_IN;
-
- if (num_in_left > 1)
- c2 = tsc_str[1];
- else
- c2 = TA_NULL;
-
- if (num_in_left > 2)
- c3 = tsc_str[2];
- else
- c3 = TA_NULL;
-
- if (num_out_left < 3)
- return TA_INSUF_OUT; /* Need atleast 3 chars */
-
- /* us-ascii characters */
- if (c1 < 0x80) {
- uni_str[i] = (int)c1;
- return TA_SUCCESS;
- }
-
- /* direct one to one translation - uyirs, aaytham, quotes,
- * copyright & numbers */
- if((pos = tsc_find_char(tsc_uyir, c1)) >= 0 ) {
- uni_str[i] = u_uyir[pos];
- return TA_SUCCESS;
- }
-
- /* mey is always amey + puLLI in unicode */
- if (is_tsc_mey(c1)) {
- if (c1 == 0x8C) {
- uni_str[i++] = 0x0B95;
- uni_str[i++] = 0x0BCD;
- }
- pos = tsc_find_char(tsc_mey, c1);
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_PULLI;
- *num_uni = i+1;
- return TA_SUCCESS;
- }
-
- /* ukaram = amey + umodi1 */
- if ((c1 >= 0xCC && c1 <= 0xDB) ||
- c1 == 0x99 || c1 == 0x9A ) {
- pos = tsc_find_char(tsc_ukaram, c1);
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_UMODI1;
- *num_uni = i+1;
- return TA_SUCCESS;
- }
-
- /* uukaram = amey + umodi2 */
- if ((c1 >= 0xDC && c1 <= 0xEB) ||
- c1 == 0x9B || c1 == 0x9C ) {
- pos = tsc_find_char(tsc_uukaaram, c1);
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_UMODI2;
- *num_uni = i+1;
- return TA_SUCCESS;
- }
-
- /* TI */
- if (c1 == TSC_TI) {
- uni_str[i++] = 0x0B9F; /* TA */
- uni_str[i] = U_KOKKI1;
- *num_uni = i+1;
- return TA_SUCCESS;
- }
-
- /* TII */
- if (c1 == TSC_TI) {
- uni_str[i++] = 0x0B9F; /* TA */
- uni_str[i] = U_KOKKI2;
- *num_uni = i+1;
- return TA_SUCCESS;
- }
-
- /* characters starting with akarameriya meys */
- if (is_tsc_amey(c1)) {
- if (c1 == 0x87) { /* KSHA = KA+puLLi+SHA in unicode */
- uni_str[i++] = 0x0B95; /* KA */
- uni_str[i++] = 0x0BCD; /* puLLi */
- }
- pos = tsc_find_char(tsc_amey, c1);
- switch(c2) {
- case TSC_KAAL:
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_KAAL;
- *num_tsc = 2;
- *num_uni = i+1;
- return TA_SUCCESS;
- case TSC_KOKKI1:
- pos = tsc_find_char(tsc_amey, c1);
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_KOKKI1;
- *num_tsc = 2;
- *num_uni = i+1;
- return TA_SUCCESS;
- case TSC_KOKKI2:
- pos = tsc_find_char(tsc_amey, c1);
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_KOKKI2;
- *num_tsc = 2;
- *num_uni = i+1;
- return TA_SUCCESS;
- case TSC_UMODI1: /* ok, I know this is not correct */
- pos = tsc_find_char(tsc_amey, c1);
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_UMODI1;
- *num_tsc = 2;
- *num_uni = i+1;
- return TA_SUCCESS;
- case TSC_UMODI2:
- pos = tsc_find_char(tsc_amey, c1);
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_UMODI2;
- *num_tsc = 2;
- *num_uni = i+1;
- return TA_SUCCESS;
- default:
- pos = tsc_find_char(tsc_amey, c1);
- uni_str[i] = u_amey[pos];
- *num_uni = i+1;
- return TA_SUCCESS;
- }
- }
-
- /* ekaram, okaram & aukaaram */
- if (c1 == TSC_KOMBU1) {
- if (((c2 >= 0xB8 && c2 <= 0xC9) ||
- (c2 >= 0x93 && c2 <= 0x96)) &&
- num_in_left > 2) {
- pos = tsc_find_char(tsc_amey, c2);
- switch(c3) {
- case TSC_KAAL:
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_OMODI1;
- *num_tsc = 3;
- *num_uni = i+1;
- return TA_SUCCESS;
- case TSC_AUMODI:
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_AUMODI;
- *num_tsc = 3;
- *num_uni = i+1;
- return TA_SUCCESS;
- default: /* it is ekaram */
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_KOMBU1;
- *num_tsc = 2;
- *num_uni = i+1;
- return TA_SUCCESS;
- } /* switch */
- } /* c2 */
- else {
- /* if the sequence is illegal, handle it gracefully */
- uni_str[i++] = U_ZWSP; /* zero width space */
- uni_str[i] = U_KOMBU1;
- *num_uni = i+1;
- return TA_ILL_SEQ;
- } /* c2 */
- } /* c1 */
-
-
- /* eekaaram, ookaaram */
- if (c1 == TSC_KOMBU2) {
- if ((c2 >= 0xB8 && c2 <= 0xC9) ||
- (c2 >= 0x93 && c2 <= 0x96)) {
- switch(c3) {
- case TSC_KAAL:
- pos = tsc_find_char(tsc_amey, c2);
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_OMODI2;
- *num_tsc = 3;
- *num_uni = i+1;
- return TA_SUCCESS;
- default: /* it is eekaaram */
- pos = tsc_find_char(tsc_amey, c2);
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_KOMBU2;
- *num_tsc = 2;
- *num_uni = i+1;
- return TA_SUCCESS;
- } /* switch */
- } /* c2 */
- else {
- /* if the sequence is illegal, handle it gracefully */
- uni_str[i++] = U_ZWSP; /* zero width space */
- uni_str[i] = U_KOMBU2;
- *num_uni = i+1;
- return TA_ILL_SEQ;
- } /* c2 */
- } /* c1 */
-
- /* aikaaram */
- if (c1 == TSC_AIMODI) {
- if ((c2 >= 0xB8 && c2 <= 0xC9) ||
- (c2 >= 0x93 && c2 <= 0x96)) {
- pos = tsc_find_char(tsc_amey, c2);
- uni_str[i++] = u_amey[pos];
- uni_str[i] = U_AIMODI;
- *num_tsc = 2;
- *num_uni = i+1;
- return TA_SUCCESS;
- } /* c2 */
- else {
- /* if the sequence is illegal, handle it gracefully */
- uni_str[i++] = U_ZWSP; /* zero width space */
- uni_str[i] = U_AIMODI;
- *num_uni = i+1;
- return TA_ILL_SEQ;
- } /* c2 */
- } /* c1 */
-
- /* It is illegal in the language for the modifiers to appear alone.
- * However in practice, they might appear alone, for example, when
- * teaching the language. We will precede those with a zero width
- * space to avoid combining them improperly */
- if (c1 == TSC_KAAL || c1 == TSC_AUMODI ||
- c1 == TSC_KOKKI1 || c1 == TSC_KOKKI2 ||
- c1 == TSC_UMODI1 || c1 == TSC_UMODI2 ) {
- pos = tsc_find_char(tsc_modi, c1);
- uni_str[i++] = U_ZWSP;
- uni_str[i] = u_modi[pos];
- *num_uni = i+1;
- return TA_ILL_SEQ;
- }
-
- /* These two characters were undefined in TSCII */
- if (c1 == 0xFE || c1 == 0xFF ) {
- uni_str[i++] = U_ZWSP;
- return TA_NOT_DEFINED;
- }
-
- /* For everything else, display a space */
- uni_str[i++] = U_SPACE;
- return TA_ILL_SEQ;
-}
-
-
-int uni2tsc(unsigned int *uni_str, unsigned char *tsc_str,
- int *num_uni, int *num_tsc,
- int num_in_left, int num_out_left)
-{
- int i = 0, pos;
- unsigned int c1, c2, c3;
-
- /* default is 1 char */
- *num_uni = 1;
- *num_tsc = 1;
-
- if (num_in_left > 0)
- c1 = uni_str[0];
- else
- return TA_INSUF_IN;
-
- if (num_in_left > 1)
- c2 = uni_str[1];
- else
- c2 = TA_NULL;
-
- if (num_in_left > 2)
- c3 = uni_str[2];
- else
- c3 = TA_NULL;
-
- if (num_out_left < 3)
- return TA_INSUF_OUT; /* Need atleast three chars */
-
- if (c1 < 0x80) {
- tsc_str[i] = (char)c1;
- return TA_SUCCESS;
- }
-
- if (c1 < 0x0B80 || c1 > 0x0BFF) {
- tsc_str[i] = SPACE;
- return TA_OUT_OF_RANGE;
- }
-
- if (c1 < 0x0B82)
- return TA_ILL_SEQ;
-
- if (c1 == 0x0B82) {
- tsc_str[i] = SPACE;
- return TA_SUCCESS; /* Don't know any TAMIL SIGN ANUSVARA */
- }
-
- /* uyir, aaytham & numbers */
- if ((c1 >= 0x0B83 && c1 <= 0x0B94) ||
- (c1 >= 0x0BE7 && c1 <= 0x0BF2)) {
- if ((pos = u_find_char(u_uyir, c1)) < 0) {
- tsc_str[i] = SPACE;
- return TA_NOT_DEFINED;
- }
- tsc_str[i] = tsc_uyir[pos];
- return TA_SUCCESS;
- }
-
- /* akarameriya mey */
- if (c1 >= 0x0B95 && c1 <= 0x0BB9) {
- if ((pos = u_find_char(u_amey, c1)) < 0) {
- tsc_str[i] = SPACE;
- return TA_NOT_DEFINED;
- }
- switch(c2) {
- case U_PULLI:
- tsc_str[i] = tsc_mey[pos];
- *num_uni = 2;
- return TA_SUCCESS;
- case U_KAAL:
- tsc_str[i++] = tsc_amey[pos];
- tsc_str[i] = TSC_KAAL;
- *num_tsc = 2;
- *num_uni = 2;
- return TA_SUCCESS;
- case U_KOKKI1:
- /* TI & TII case */
- if (c1 == 0x0B9f) {
- tsc_str[i] = TSC_TI;
- *num_uni = 2;
- return TA_SUCCESS;
- }
- tsc_str[i++] = tsc_amey[pos];
- tsc_str[i] = TSC_KOKKI1;
- *num_tsc = 2;
- *num_uni = 2;
- return TA_SUCCESS;
- case U_KOKKI2:
- /* TI & TII case */
- if (c1 == 0x0B9f) {
- tsc_str[i] = TSC_TII;
- *num_uni = 2;
- return TA_SUCCESS;
- }
- tsc_str[i++] = tsc_amey[pos];
- tsc_str[i] = TSC_KOKKI2;
- *num_tsc = 2;
- *num_uni = 2;
- return TA_SUCCESS;
- case U_UMODI1:
- /* If it is a grantha add a hook, otherwise
- * we have separate chars in TSCII */
- if (u_find_char(u_grantha, c1) < 0) {
- tsc_str[i] = tsc_ukaram[pos];
- *num_uni = 2;
- return TA_SUCCESS;
- }
- else {
- tsc_str[i++] = tsc_amey[pos];
- tsc_str[i] = TSC_UMODI1;
- *num_tsc = 2;
- *num_uni = 2;
- return TA_SUCCESS;
- }
- case U_UMODI2:
- if (u_find_char(u_grantha, c1) < 0) {
- tsc_str[i] = tsc_uukaaram[pos];
- *num_uni = 2;
- return TA_SUCCESS;
- }
- else {
- tsc_str[i++] = tsc_amey[pos];
- tsc_str[i] = TSC_UMODI2;
- *num_tsc = 2;
- *num_uni = 2;
- return TA_SUCCESS;
- }
- case U_KOMBU1:
- /* Unicode seems to allow double modifiers for
- * okaram, ookaaram & aukaaram. This is
- * somewhat unnecessary. But we will handle
- * that condition too.
- */
- switch(c3) {
- case U_KAAL:
- tsc_str[i++] = TSC_KOMBU1;
- tsc_str[i++] = tsc_amey[pos];
- tsc_str[i] = TSC_KAAL;
- *num_tsc = 3;
- *num_uni = 3;
- return TA_SUCCESS;
- case U_AUMARK:
- tsc_str[i++] = TSC_KOMBU1;
- tsc_str[i++] = tsc_amey[pos];
- tsc_str[i] = TSC_AUMODI;
- *num_tsc = 3;
- *num_uni = 3;
- return TA_SUCCESS;
- default:
- tsc_str[i++] = TSC_KOMBU1;
- tsc_str[i] = tsc_amey[pos];
- *num_tsc = 2;
- *num_uni = 2;
- return TA_SUCCESS;
- }
- case U_KOMBU2:
- if (c3 == U_KAAL) {
- tsc_str[i++] = TSC_KOMBU2;
- tsc_str[i++] = tsc_amey[pos];
- tsc_str[i] = TSC_KAAL;
- *num_tsc = 3;
- *num_uni = 3;
- return TA_SUCCESS;
- }
- else {
- tsc_str[i++] = TSC_KOMBU2;
- tsc_str[i] = tsc_amey[pos];
- *num_tsc = 2;
- *num_uni = 2;
- return TA_SUCCESS;
- }
- case U_AIMODI:
- tsc_str[i++] = TSC_AIMODI;
- tsc_str[i] = tsc_amey[pos];
- *num_tsc = 2;
- *num_uni = 2;
- return TA_SUCCESS;
- case U_OMODI1:
- tsc_str[i++] = TSC_KOMBU1;
- tsc_str[i++] = tsc_amey[pos];
- tsc_str[i] = TSC_KAAL;
- *num_tsc = 3;
- *num_uni = 2;
- return TA_SUCCESS;
- case U_OMODI2:
- tsc_str[i++] = TSC_KOMBU2;
- tsc_str[i++] = tsc_amey[pos];
- tsc_str[i] = TSC_KAAL;
- *num_tsc = 3;
- *num_uni = 2;
- return TA_SUCCESS;
- case U_AUMODI:
- tsc_str[i++] = TSC_KOMBU1;
- tsc_str[i++] = tsc_amey[pos];
- tsc_str[i] = TSC_AUMODI;
- *num_tsc = 3;
- *num_uni = 2;
- return TA_SUCCESS;
- default:
- tsc_str[i] = tsc_amey[pos];
- return TA_SUCCESS;
- }
- }
-
- /* modifiers - illegal sequence */
- if (c1 >= 0x0BBE && c1 <= 0x0BD7) {
- if ((pos = u_find_char(u_modi, c1)) < 0) {
- tsc_str[i] = SPACE;
- return TA_NOT_DEFINED;
- }
- tsc_str[i] = tsc_modi[pos];
- return TA_ILL_SEQ;
- }
- tsc_str[i] = SPACE;
- return TA_NOT_DEFINED;
-}
-
-int is_tsc_uyir(unsigned char c)
-{
- if (c >= 0xAB && c <= 0xB7)
- return TA_TRUE;
- else
- return TA_FALSE;
-
-}
-
-int is_tsc_modi(unsigned char c)
-{
- if ((c >= 0xA1 && c <= 0xA8) ||
- c == 0xAA )
- return TA_TRUE;
- else
- return TA_FALSE;
-}
-
-int is_tsc_amey(unsigned char c)
-{
- if ((c >= 0x83 && c <= 0x87) ||
- (c >= 0xB8 && c <= 0xC9))
- return TA_TRUE;
- else
- return TA_FALSE;
-}
-
-int is_tsc_mey(unsigned char c)
-{
- if ((c >= 0x88 && c <= 0x8C) ||
- (c >= 0xEC && c <= 0xFD))
- return TA_TRUE;
- else
- return TA_FALSE;
-}
-
-int is_tsc_number(unsigned char c)
-{
- if ( c >= 0x81 ||
- (c >= 0x8D && c <= 0x90) ||
- (c >= 0x95 && c <= 0x98) ||
- (c >= 0x9D && c <= 0x9F))
- return TA_TRUE;
- else
- return TA_FALSE;
-}
-
-int is_uni_uyir(unsigned int c)
-{
- if ((c >= 0x0B85 && c <= 0x0B8A) ||
- (c >= 0x0B8E && c <= 0x0B90) ||
- (c >= 0x0B92 && c <= 0x0B94) ||
- (c == 0x0B83))
- return TA_TRUE;
- else
- return TA_FALSE;
-}
-
-int is_uni_amey(unsigned int c)
-{
- if (u_find_char(u_amey, c) < 0)
- return TA_FALSE;
- else
- return TA_TRUE;
-}
-
-int is_uni_modi(unsigned int c)
-{
- if (u_find_char(u_modi, c) < 0)
- return TA_FALSE;
- else
- return TA_TRUE;
-}
-
-int is_uni_numb(unsigned int c)
-{
- if ((c >= 0x0BE7 && c <= 0x0BF2))
- return TA_FALSE;
- else
- return TA_TRUE;
-}
diff --git a/modules/tamil/taconv.h b/modules/tamil/taconv.h
deleted file mode 100644
index dad44078..00000000
--- a/modules/tamil/taconv.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* taconv.h:
- * Author: Sivaraj D (sivaraj@tamil.net)
- * Date : 4-Jan-2000
- */
-
-/* Return codes */
-#define TA_SUCCESS 0
-#define TA_ILL_SEQ 1 /* Sequence is illegal in language */
-#define TA_INSUF_IN 2
-#define TA_INSUF_OUT 3 /* Need atleast three chars */
-#define TA_OUT_OF_RANGE 4 /* Char outside 0x00-0x7f or 0xb80-0xbff */
-#define TA_NOT_DEFINED 5 /* Within 0xb80-0xbff but not defined
- * by unicode*/
-
-#define TA_NULL 0x00
-#define TA_TRUE 1
-#define TA_FALSE 0
-
-/* tsc2uni: Get the first TSCII Tamil character in tsc_str and convert it to
- * corresponding unicode character in uni_str.
- * tsc_str: TSCII string (in)
- * uni_str: Unicode string (out)
- * num_tsc: Number of TSCII characters processed (out)
- * num_uni: Number of Unicode characters returned (out)
- * num_in_left: Number of characters left in input buffer (in)
- * num_out_left: Number of characters left in output buffer (in)
- */
-int tsc2uni(unsigned char *tsc_str, unsigned int *uni_str,
- int *num_tsc, int *num_uni,
- int num_in_left, int num_out_left);
-
-/* uni2tsc: Get the first Unicode character in uni_str and convert it to
- * corresponding TSCII Tamil character in tsc_str.
- * uni_str: Unicode string (out)
- * tsc_str: TSCII string (in)
- * num_uni: Number of Unicode characters returned (out)
- * num_tsc: Number of TSCII characters processed (out)
- * num_in_left: Number of characters left in input buffer (in)
- * num_out_left: Number of characters left in output buffer (in)
- */
-int uni2tsc(unsigned int *uni_str, unsigned char *tsc_str,
- int *num_uni, int *num_tsc,
- int num_in_left, int num_out_left);
-
-int is_tsc_uyir(unsigned char c); /* Returns 1 if c is a vowel, else 0 */
-int is_tsc_modi(unsigned char c); /* Returns 1 if c is a modifier */
-int is_tsc_amey(unsigned char c); /* Returns 1 if c is a akara mey */
-int is_tsc_mey(unsigned char c); /* Returns 1 if c is a consonant */
-int is_tsc_number(unsigned char c); /* Returns 1 if c is a number */
-
-int is_uni_uyir(unsigned int c); /* Returns 1 if c is a vowel, else 0 */
-int is_uni_modi(unsigned int c); /* Returns 1 if c is a modifier */
-int is_uni_amey(unsigned int c); /* Returns 1 if c is a akara mey */
-int is_uni_numb(unsigned int c); /* Returns 1 if c is a number */
-
diff --git a/modules/tamil/tadefs.h b/modules/tamil/tadefs.h
deleted file mode 100644
index bad92aec..00000000
--- a/modules/tamil/tadefs.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Pango
- * tadefs.h:
- *
- * Authors: Sivaraj D (sivaraj@tamil.net)
- * Vikram Subramanian (upender@vsnl.com)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#define U_KAAL 0x0BBE
-#define U_KOKKI1 0x0BBF
-#define U_KOKKI2 0x0BC0
-#define U_UMODI1 0x0BC1
-#define U_UMODI2 0x0BC2
-#define U_KOMBU1 0x0BC6
-#define U_KOMBU2 0x0BC7
-#define U_AIMODI 0x0BC8
-#define U_OMODI1 0x0BCA
-#define U_OMODI2 0x0BCB
-#define U_AUMODI 0x0BCC
-#define U_AUMARK 0x0BD7
-#define U_PULLI 0x0BCD
-
-#define U_KA 0x0B95
-
-#define U_SPACE 0x0020
-#define U_ZWSP 0x200B
-
-
-
-
-
-
-
diff --git a/modules/tamil/tamil-x.c b/modules/tamil/tamil-x.c
deleted file mode 100644
index 119bf9bc..00000000
--- a/modules/tamil/tamil-x.c
+++ /dev/null
@@ -1,422 +0,0 @@
-/* Pango
- * tamil-x.c:
- *
- * Authors: Sivaraj D (sivaraj@tamil.net)
- * Vikram Subramanian (upender@vsnl.com)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* A version using Unicode based font with ligature information in it
- *
- * Vikram Subramanian <upender@vsnl.com>
- */
-#include <stdio.h>
-#include <string.h>
-#include <glib.h>
-#include "pango-engine.h"
-#include "pangox.h"
-#include "tadefs.h"
-
-#define SCRIPT_ENGINE_NAME "TamilScriptEngineX"
-
-
-/* The charset for the font */
-static char *default_charset = "iso10646-tam";
-
-/* Bitmap to test whether a char is a consonant */
-/** Remember to change this when adding KSHA later **/
-static const unsigned char cons_map[] = {0xB1, 0xC6, 0x38, 0xFE, 0x1D};
-
-static PangoEngineRange tamil_range[] = {
- { 0x0b80, 0x0bff, "*" },
-};
-
-static PangoEngineInfo script_engines[] = {
- {
- SCRIPT_ENGINE_NAME,
- PANGO_ENGINE_TYPE_SHAPE,
- PANGO_RENDER_TYPE_X,
- tamil_range, G_N_ELEMENTS(tamil_range)
- }
-};
-
-static gint n_script_engines = G_N_ELEMENTS (script_engines);
-
-
-/* Return non-zero if c is a akara mey, 0 otherwise
- */
-static int
-is_consonant (unsigned int c)
-{
- /* Too many gaps between consonants - So use a bit map */
- /** KSHA might come at 0xBBA later ?? **/
- return ((c >= 0x0B95 && c <= 0x0BB9) &&
- (cons_map[(c - 0x0B95) >> 3] & (1 << ((c - 0xB95) & 7))));
-}
-
-/* Return 1 if c is a modifier, 0 otherwise
- */
-static int
-is_modifier (unsigned int c)
-{
- if ((c >= 0x0BBE && c <= 0x0BC2) ||
- (c >= 0x0BC6 && c <= 0x0BC8) ||
- (c >= 0x0BCA && c <= 0x0BCD) ||
- (c == 0x0BD7))
- return 1;
- else
- return 0;
-}
-
-
-/* Remove unwanted U+0000 */
-void
-tamil_compact (gunichar *chars,
- int *num,
- int *cluster)
-{
- gunichar *dest = chars;
- gunichar *end = chars + *num;
- int *cluster_dest = cluster;
- while (chars < end)
- {
- if (*chars)
- {
- *dest = *chars;
- *cluster_dest = *cluster;
- dest++;
- chars++;
- cluster++;
- cluster_dest++;
- }
- else
- {
- chars++;
- cluster++;
- }
- }
- *num -= (chars - dest);
-}
-
-
-/* Apply the modifier to the base character to get the string of glyph
- * indices
- */
-static void
-apply_modifier (gunichar base,
- gunichar modifier,
- gunichar *glyph_str,
- int *num_glyphs)
-{
-
- /* Modifier which appears as suffix */
- if ((modifier >= U_KAAL && modifier <= U_UMODI2) ||
- (modifier == U_PULLI))
- {
- glyph_str[0] = base;
- glyph_str[1] = modifier;
- *num_glyphs = 2;
- return;
- }
-
- /* Modifiers which appear as prefix */
- if (modifier >= U_KOMBU1 && modifier <= U_AIMODI)
- {
- glyph_str[0] = modifier;
- glyph_str[1] = base;
- *num_glyphs = 2;
- return;
- }
-
- /* Modifiers appearing as both suffix and prefix */
- if (modifier == U_OMODI1)
- {
- glyph_str[0] = U_KOMBU1;
- glyph_str[1] = base;
- glyph_str[2] = U_KAAL;
- *num_glyphs = 3;
- return;
- }
-
- if (modifier == U_OMODI2)
- {
- glyph_str[0] = U_KOMBU2;
- glyph_str[1] = base;
- glyph_str[2] = U_KAAL;
- *num_glyphs = 3;
- return;
- }
-
- if (modifier == U_AUMODI)
- {
- glyph_str[0] = U_KOMBU1;
- glyph_str[1] = base;
- glyph_str[2] = U_AUMARK;
- *num_glyphs = 3;
- return;
- }
-
- /* U_AUMARK after a consonant?? */
- glyph_str[0] = base;
- *num_glyphs = 1;
-}
-
-
-/*
- * X window system script engine portion
- */
-
-/* Find a font of the reqd. charset
- */
-static PangoXSubfont
-find_tamil_font (PangoFont *font)
-{
- PangoXSubfont result;
-
- if (pango_x_find_first_subfont (font, &default_charset, 1, &result))
- return result;
- else
- return 0; /* Could not find a font */
-}
-
-
-/* Convert UTF-8 to glyph string
- */
-static void
-tamil_engine_shape (PangoFont *font,
- const char *text,
- int length,
- PangoAnalysis *analysis,
- PangoGlyphString *glyphs)
-{
- int n_chars, n_glyph;
- int i;
- const char *cluster_start;
- const char *p;
- gunichar *wc, prevchar;
- gunichar currchar = 0; /* Quiet compiler */
- int complete; /* Whether the prev char is gauranteed to be complete
- i.e not modified by modifiers */
- int nuni; /* No. of unicode characters in a cluster */
-
- PangoXSubfont tamil_font;
-
-
- g_return_if_fail (font != NULL);
- g_return_if_fail (text != NULL);
- g_return_if_fail (length >= 0);
- g_return_if_fail (analysis != NULL);
-
- n_chars = g_utf8_strlen (text, length);
-
- tamil_font = find_tamil_font (font);
- if (!tamil_font)
- {
- pango_x_fallback_shape (font, glyphs, text, n_chars);
- return;
- }
-
- /* temporarily set the size to 2 times the number of unicode chars */
- pango_glyph_string_set_size (glyphs, n_chars * 2);
- wc = (gunichar *)g_malloc (sizeof(gunichar) * n_chars * 2);
-
- p = text;
- prevchar = 0;complete = 1;/* One character look behind */
- n_glyph = 0;
- cluster_start = text;
-
- /* The following loop is similar to the indic engine's split out chars */
- for (i=0; i < n_chars; i++) {
-
- currchar = g_utf8_get_char (p);
-
- /* Two classes - Modifiers and Non-Modifiers */
- if (is_modifier (currchar))
- {
- if (complete){ /* The previous char has been tagged complete already */
-
- /* Leave the vowel sign itself in wc */
- /* Useful in lessons */
- wc[n_glyph] = currchar;
- glyphs->log_clusters[n_glyph] = cluster_start - text;
-
- n_glyph++;
- nuni = 1;
- }
- else
- { /* Modify the previous char */
- int num_glyphs;
- gunichar glyph_str[3];
- int k;
-
- /* Modify the previous char and get a glyph string */
- apply_modifier (prevchar,currchar,glyph_str,&num_glyphs);
-
- for (k = 0;k < num_glyphs;k++)
- {
- wc[n_glyph] = glyph_str[k];
- glyphs->log_clusters[n_glyph] = cluster_start - text;
-
- n_glyph++;
- }
-
- /* 2 unicode chars in this just written cluster */
- nuni = 2;
- }
- complete = 1; /* A character has ended */
-
- /* NOTE : Double modifiers are not handled but the display will be
- * correct since the vowel sign is appended.However cluster info
- * will be wrong.
- */
- }
- else
- { /* Non-modifiers */
-
- /* Write out the previous char which is waiting to get completed */
- if (!complete)
- {
- wc[n_glyph] = prevchar;
- glyphs->log_clusters[n_glyph] = cluster_start - text;
-
- n_glyph++;
-
- /* Set the cluster start properly for the current char */
- cluster_start = g_utf8_next_char (cluster_start);
- }
-
- /* Check the type of the current char further */
- if (is_consonant (currchar))
- {
- prevchar = currchar; /* Store this consonant */
- complete = 0; /* May get modified */
- nuni = 0; /* NO unicode character written */
-
- }
- else
- {
- /* Vowels, numerals and other unhandled stuff come here */
-
- /* Write it out then and there */
- wc[n_glyph] = currchar;
- glyphs->log_clusters[n_glyph] = cluster_start - text;
-
- n_glyph++;
- nuni = 1;
-
- complete = 1; /* A character has ended */
- }
- }
-
- /* Set the beginning for the next cluster */
- while (nuni-- > 0)
- cluster_start = g_utf8_next_char (cluster_start);
-
- p = g_utf8_next_char (p);
- }
-
- /* Flush out the last char if waiting to get completed */
- if (!complete)
- {
- wc[n_glyph] = currchar;
- glyphs->log_clusters[n_glyph] = cluster_start - text;
-
- n_glyph++;
- }
-
- /* Apply ligatures as specified in the X Font */
- pango_x_apply_ligatures (font, tamil_font, &wc, &n_glyph,
- &glyphs->log_clusters);
-
- /* Remove unwanted U+0000 */
- tamil_compact (wc, &n_glyph, glyphs->log_clusters);
-
- /* Make glyphs */
- pango_glyph_string_set_size (glyphs, n_glyph);
-
- for (i = 0;i < n_glyph;i++)
- {
- PangoRectangle logical_rect;
- glyphs->glyphs[i].glyph = PANGO_X_MAKE_GLYPH (tamil_font, wc[i]);
- pango_font_get_glyph_extents (font, glyphs->glyphs[i].glyph,
- NULL, &logical_rect);
- glyphs->glyphs[i].geometry.x_offset = 0;
- glyphs->glyphs[i].geometry.y_offset = 0;
- glyphs->glyphs[i].geometry.width = logical_rect.width;
- }
-
- g_free(wc);
-}
-
-static PangoCoverage *
-tamil_engine_get_coverage (PangoFont *font,
- PangoLanguage *lang)
-{
- PangoCoverage *result = pango_coverage_new ();
-
- PangoXSubfont tamil_font = find_tamil_font (font);
- if (tamil_font)
- {
- gunichar i;
-
- for (i = 0xb80; i <= 0xbff; i++)
- pango_coverage_set (result, i, PANGO_COVERAGE_EXACT);
- }
-
- return result;
-}
-
-
-static PangoEngine *
-tamil_engine_x_new ()
-{
- PangoEngineShape *result;
-
- result = g_new (PangoEngineShape, 1);
-
- result->engine.id = SCRIPT_ENGINE_NAME;
- 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;
-
- return (PangoEngine *)result;
-}
-
-/* The following three functions provide the public module API for Pango
- */
-void
-PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines,
- int *n_engines)
-{
- *engines = script_engines;
- *n_engines = n_script_engines;
-}
-
-PangoEngine *
-PANGO_MODULE_ENTRY(load) (const char *id)
-{
- if (!strcmp (id, SCRIPT_ENGINE_NAME))
- return tamil_engine_x_new ();
- else
- return NULL;
-}
-
-void
-PANGO_MODULE_ENTRY(unload) (PangoEngine *engine)
-{
-}
diff --git a/modules/thai/Makefile.am b/modules/thai/Makefile.am
index 9d789885..d093c6f2 100644
--- a/modules/thai/Makefile.am
+++ b/modules/thai/Makefile.am
@@ -24,24 +24,6 @@ noinst_LTLIBRARIES =
common_sources = thai-shaper.c thai-shaper.h
-if HAVE_X
-INCLUDES += $(X_CFLAGS)
-if INCLUDE_THAI_X
-noinst_LTLIBRARIES += libpango-thai-x.la
-else
-module_LTLIBRARIES += pango-thai-x.la
-endif
-endif
-
-thai_x_sources = $(common_sources) thai-x.c
-
-pango_thai_x_la_LDFLAGS = -export-dynamic -avoid-version -module
-pango_thai_x_la_LIBADD = $(pangoxlibs)
-pango_thai_x_la_SOURCES = $(thai_x_sources)
-libpango_thai_x_la_SOURCES = $(thai_x_sources)
-libpango_thai_x_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_thai_x
-
-
if HAVE_XFT
INCLUDES += $(XFT_CFLAGS)
if INCLUDE_THAI_XFT
diff --git a/modules/thai/thai-x.c b/modules/thai/thai-x.c
deleted file mode 100644
index 0f18e228..00000000
--- a/modules/thai/thai-x.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/* Pango
- * thai-x.c:
- *
- * Copyright (C) 1999 Red Hat Software
- * Author: Owen Taylor <otaylor@redhat.com>
- *
- * Software and Language Engineering Laboratory, NECTEC
- * Author: Theppitak Karoonboonyanan <thep@links.nectec.or.th>
- *
- * Copyright (c) 1996-2000 by Sun Microsystems, Inc.
- * Author: Chookij Vanatham <Chookij.Vanatham@Eng.Sun.COM>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-
-#include <string.h>
-
-#include <glib.h>
-#include "pango-engine.h"
-#include "thai-shaper.h"
-
-
-#define SCRIPT_ENGINE_NAME "ThaiScriptEngineX"
-
-/* We handle the range U+0e01 to U+0e5b exactly
- */
-static PangoEngineRange thai_ranges[] = {
- { 0x0e01, 0x0e5b, "*" }, /* Thai */
-};
-
-static PangoEngineInfo script_engines[] = {
- {
- SCRIPT_ENGINE_NAME,
- PANGO_ENGINE_TYPE_SHAPE,
- PANGO_RENDER_TYPE_X,
- thai_ranges, G_N_ELEMENTS(thai_ranges)
- }
-};
-
-/* Returns a structure with information we will use to rendering given the
- * #PangoFont. This is computed once per font and cached for later retrieval.
- */
-ThaiFontInfo *
-thai_get_font_info (PangoFont *font)
-{
- static const char *charsets[] = {
- "tis620-2",
- "tis620-1",
- "tis620-0",
- "xtis620.2529-1",
- "xtis-0",
- "tis620.2533-1",
- "tis620.2529-1",
- "iso8859-11",
- "iso10646-1",
- };
-
- static const int charset_types[] = {
- THAI_FONT_TIS_WIN,
- THAI_FONT_TIS_MAC,
- THAI_FONT_TIS,
- THAI_FONT_XTIS,
- THAI_FONT_XTIS,
- THAI_FONT_TIS,
- THAI_FONT_TIS,
- THAI_FONT_TIS,
- THAI_FONT_ISO10646
- };
-
- ThaiFontInfo *font_info;
- GQuark info_id = g_quark_from_string ("thai-font-info");
-
- font_info = g_object_get_qdata (G_OBJECT (font), info_id);
-
- if (!font_info)
- {
- /* No cached information not found, so we need to compute it
- * from scratch
- */
- PangoXSubfont *subfont_ids;
- gint *subfont_charsets;
- gint n_subfonts, i;
-
- font_info = g_new (ThaiFontInfo, 1);
- font_info->font = font;
- font_info->font_set = THAI_FONT_NONE;
-
- g_object_set_qdata_full (G_OBJECT (font), info_id, font_info, (GDestroyNotify)g_free);
-
- n_subfonts = pango_x_list_subfonts (font, (char **)charsets, G_N_ELEMENTS (charsets),
- &subfont_ids, &subfont_charsets);
-
- for (i=0; i < n_subfonts; i++)
- {
- ThaiFontSet font_set = charset_types[subfont_charsets[i]];
-
- if (font_set != THAI_FONT_ISO10646 ||
- pango_x_has_glyph (font, PANGO_X_MAKE_GLYPH (subfont_ids[i], 0xe01)))
- {
- font_info->font_set = font_set;
- font_info->subfont = subfont_ids[i];
-
- break;
- }
- }
-
- g_free (subfont_ids);
- g_free (subfont_charsets);
- }
-
- return font_info;
-}
-
-PangoGlyph
-thai_make_glyph (ThaiFontInfo *font_info, unsigned int c)
-{
- return PANGO_X_MAKE_GLYPH (font_info->subfont, c);
-}
-
-PangoGlyph
-thai_make_unknown_glyph (ThaiFontInfo *font_info, unsigned int c)
-{
- return pango_x_get_unknown_glyph (font_info->font);
-}
-
-gboolean
-thai_has_glyph (ThaiFontInfo *font_info, PangoGlyph glyph)
-{
- return pango_x_has_glyph (font_info->font, glyph);
-}
-
-static PangoCoverage *
-thai_engine_get_coverage (PangoFont *font,
- PangoLanguage *lang)
-{
- PangoCoverage *result = pango_coverage_new ();
-
- ThaiFontInfo *font_info = thai_get_font_info (font);
-
- if (font_info->font_set != THAI_FONT_NONE)
- {
- gunichar wc;
-
- for (wc = 0xe01; wc <= 0xe3a; wc++)
- pango_coverage_set (result, wc, PANGO_COVERAGE_EXACT);
- for (wc = 0xe3f; wc <= 0xe5b; wc++)
- pango_coverage_set (result, wc, PANGO_COVERAGE_EXACT);
- }
-
- return result;
-}
-
-static PangoEngine *
-thai_engine_x_new ()
-{
- PangoEngineShape *result;
-
- result = g_new (PangoEngineShape, 1);
-
- result->engine.id = SCRIPT_ENGINE_NAME;
- result->engine.type = PANGO_ENGINE_TYPE_SHAPE;
- result->engine.length = sizeof (result);
- result->script_shape = thai_engine_shape;
- result->get_coverage = thai_engine_get_coverage;
-
- return (PangoEngine *)result;
-}
-
-/* List the engines contained within this module
- */
-void
-PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines,
- int *n_engines)
-{
- *engines = script_engines;
- *n_engines = G_N_ELEMENTS (script_engines);
-}
-
-/* Load a particular engine given the ID for the engine
- */
-PangoEngine *
-PANGO_MODULE_ENTRY(load) (const char *id)
-{
- if (!strcmp (id, SCRIPT_ENGINE_NAME))
- return thai_engine_x_new ();
- else
- return NULL;
-}
-
-void
-PANGO_MODULE_ENTRY(unload) (PangoEngine *engine)
-{
-}
-