diff options
author | Owen Taylor <otaylor@redhat.com> | 2003-08-02 18:07:30 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2003-08-02 18:07:30 +0000 |
commit | 85cb529088899889a65a99d3a00f6035eecb4c98 (patch) | |
tree | 5524eccd3af9ececd7884b7ea22f29193c3f71d4 /modules/thai | |
parent | bcf10a1085bdf9344e513785c1082f9b82278619 (diff) | |
download | pango-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/thai')
-rw-r--r-- | modules/thai/Makefile.am | 18 | ||||
-rw-r--r-- | modules/thai/thai-x.c | 209 |
2 files changed, 0 insertions, 227 deletions
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) -{ -} - |