summaryrefslogtreecommitdiff
path: root/modules/arabic
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-08-02 18:07:30 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-08-02 18:07:30 +0000
commit85cb529088899889a65a99d3a00f6035eecb4c98 (patch)
tree5524eccd3af9ececd7884b7ea22f29193c3f71d4 /modules/arabic
parentbcf10a1085bdf9344e513785c1082f9b82278619 (diff)
downloadpango-85cb529088899889a65a99d3a00f6035eecb4c98.tar.gz
Remove old X font shapers.
Sat Aug 2 13:17:45 2003 Owen Taylor <otaylor@redhat.com> * configure.in modules/arabic/{Makefile.am arconv.[ch],langboxfont.[ch], mulefont.[ch],naqshfont.[ch],arabic-x.c} modules/hangul/{Makefile.am,hangul-x.c,tables-johabfont.i, tables-ksc5601.i} modules/hebrew/{Makefile.am,hebrew-x.c} modules/indic/{Makefile.am,*-x.c} modules/tamil modules/thai/{Makefile.am,thai-x.c}: Remove old X font shapers.
Diffstat (limited to 'modules/arabic')
-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
10 files changed, 0 insertions, 2217 deletions
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
-
-