diff options
author | Owen Taylor <otaylor@redhat.com> | 2003-09-23 23:11:59 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2003-09-23 23:11:59 +0000 |
commit | 0f36f55ee0e7c9bf224fabbaf31843b3868f213c (patch) | |
tree | a8446856f4dce9b792f5e2ca1c3f9d25bbc40b76 /modules/indic | |
parent | 8fa8e29cd61c802c6b100b3cca800784e3a9de20 (diff) | |
download | pango-0f36f55ee0e7c9bf224fabbaf31843b3868f213c.tar.gz |
Modules now declare a list of scripts that they cover instead of a list of
Tue Sep 23 18:03:57 2003 Owen Taylor <otaylor@redhat.com>
* pango/pango-engines.[ch] pango/pango-engines-private.h:
Modules now declare a list of scripts that they cover instead of a
list of code point ranges. Also, there is now a ->covers() virtual
function that allows a module to decide live whether the font
covers a particular codepoint; remove old get_coverage() method.
* pango/pango-fontset.[ch]: Add a foreach() function to
iterate over all the fonts in a fontset (with a true
return stopping iteration).
* pango/pango-context.c: Complete rewrite using script-run
information to improve language tags. Switch to an approach
where we handle one run at a time rather than computing
information for each character individually then later
breaking the result into runs.
* pango/pango-fontset.[ch]: Switch over to using
pango-impl-utils.h.
* modules/basic/basic-x.c pango/pangox-fontmap.c: Adapt to
the change from get_coverage => covers.
* pango/pango-modules.h pango/modules.c: Switch PangoMap
over to being based on script rather than being based
on codepoint. Remove the no longer needed pango_map_get_entry().
* pango/modules.c: Handle new script-based modules.
* pango/pango-fc-fontmap.c pango/pango-win32-fontmap.c
pango/pang-fontmap.[ch]: Add a shape_engine_type field
to PangoFontmapClass, pango_font_map_get_shape_engine_type();
this allows generic code to find a shaper for a particular
fontmap.
* pango/pango-script.[ch]: Add pango_script_get_sample_language(),
pango_language_includes_script(); functions for determining
the relationship between scripts and language.
* tools/gen-script-for-lang.c: Modify to spit out a
useful table.
* pango/pango-script-lang-table.h: Version of table
generated from current fontconfig data.
* pango/pangox.c: Remove complicated code to compute
coverages; no longer useful now that we just have
the basic shaper as a legacy thing.
* modules/*/*.c: Adapt to identifying shape engines
by language range.
* modules/thai/thai-fc.c modules/thai/thai-shaper.[ch]:
Remove now unused "has_glyph" function and XTIS support.
* modules/thai/thai-fc.c: Handle non-Thai characters
as well, since the Thai module now gets spaces,
punctuation, and so forth.
Diffstat (limited to 'modules/indic')
-rw-r--r-- | modules/indic/indic-fc.c | 40 | ||||
-rw-r--r-- | modules/indic/indic-ot-class-tables.c | 2 | ||||
-rw-r--r-- | modules/indic/indic-ot.h | 21 |
3 files changed, 20 insertions, 43 deletions
diff --git a/modules/indic/indic-fc.c b/modules/indic/indic-fc.c index f70fadfb..68b28662 100644 --- a/modules/indic/indic-fc.c +++ b/modules/indic/indic-fc.c @@ -52,12 +52,10 @@ struct _PangoIndicInfo #define ENGINE_SUFFIX "ScriptEngineFc" #define RENDER_TYPE PANGO_RENDER_TYPE_FC -#define INDIC_ENGINE_INFO(script) {#script ENGINE_SUFFIX, PANGO_ENGINE_TYPE_SHAPE, RENDER_TYPE, script##_ranges, G_N_ELEMENTS(script##_ranges)} +#define INDIC_ENGINE_INFO(script) {#script ENGINE_SUFFIX, PANGO_ENGINE_TYPE_SHAPE, RENDER_TYPE, script##_scripts, G_N_ELEMENTS(script##_scripts)} #define PANGO_INDIC_INFO(script) {OT_TAG_##script, &script##_class_table, "pango-indic-" #script "-GSUB-ruleset", "pango-indic-" #script "-GPOS-rulsest"} -#define INDIC_SCRIPT_RANGE(script) {SCRIPT_RANGE_##script, "*"} - #define OT_TAG_deva FT_MAKE_TAG('d','e','v','a') #define OT_TAG_beng FT_MAKE_TAG('b','e','n','g') #define OT_TAG_guru FT_MAKE_TAG('g','u','r','u') @@ -68,40 +66,40 @@ struct _PangoIndicInfo #define OT_TAG_knda FT_MAKE_TAG('k','n','d','a') #define OT_TAG_mlym FT_MAKE_TAG('m','l','y','m') -static PangoEngineRange deva_ranges[] = { - INDIC_SCRIPT_RANGE(deva), /* Devanagari */ +static PangoEngineScriptInfo deva_scripts[] = { + { PANGO_SCRIPT_DEVANAGARI, "*" } }; -static PangoEngineRange beng_ranges[] = { - INDIC_SCRIPT_RANGE(beng), /* Bengali */ +static PangoEngineScriptInfo beng_scripts[] = { + {PANGO_SCRIPT_BENGALI, "*" } }; -static PangoEngineRange guru_ranges[] = { - INDIC_SCRIPT_RANGE(guru), /* Gurmukhi */ +static PangoEngineScriptInfo guru_scripts[] = { + { PANGO_SCRIPT_GURMUKHI, "*" } }; -static PangoEngineRange gujr_ranges[] = { - INDIC_SCRIPT_RANGE(gujr), /* Gujarati */ +static PangoEngineScriptInfo gujr_scripts[] = { + { PANGO_SCRIPT_GUJARATI, "*" } }; -static PangoEngineRange orya_ranges[] = { - INDIC_SCRIPT_RANGE(orya), /* Oriya */ +static PangoEngineScriptInfo orya_scripts[] = { + { PANGO_SCRIPT_ORIYA, "*" } }; -static PangoEngineRange taml_ranges[] = { - INDIC_SCRIPT_RANGE(taml), /* Tamil */ +static PangoEngineScriptInfo taml_scripts[] = { + { PANGO_SCRIPT_TAMIL, "*" } }; -static PangoEngineRange telu_ranges[] = { - INDIC_SCRIPT_RANGE(telu), /* Telugu */ +static PangoEngineScriptInfo telu_scripts[] = { + { PANGO_SCRIPT_TELUGU, "*" } }; -static PangoEngineRange knda_ranges[] = { - INDIC_SCRIPT_RANGE(knda), /* Kannada */ +static PangoEngineScriptInfo knda_scripts[] = { + { PANGO_SCRIPT_KANNADA, "*" } }; -static PangoEngineRange mlym_ranges[] = { - INDIC_SCRIPT_RANGE(mlym), /* Malayalam */ +static PangoEngineScriptInfo mlym_scripts[] = { + { PANGO_SCRIPT_MALAYALAM, "*" } }; static PangoEngineInfo script_engines[] = { diff --git a/modules/indic/indic-ot-class-tables.c b/modules/indic/indic-ot-class-tables.c index cc18a9be..c4acf4ce 100644 --- a/modules/indic/indic-ot-class-tables.c +++ b/modules/indic/indic-ot-class-tables.c @@ -213,7 +213,7 @@ static const IndicOTSplitMatra mlymSplitTable[] = {{0x0D46, 0x0D3E}, {0x0D47, 0x #define TAML_SCRIPT_FLAGS (SF_MPRE_FIXUP | SF_NO_POST_BASE_LIMIT) #define TELU_SCRIPT_FLAGS (SF_MATRAS_AFTER_BASE | 3) #define KNDA_SCRIPT_FLAGS (SF_MATRAS_AFTER_BASE | 3) -#define MLYM_SCRIPT_FLAGS (SF_NO_POST_BASE_LIMIT) +#define MLYM_SCRIPT_FLAGS (SF_MPRE_FIXUP | SF_NO_POST_BASE_LIMIT) /* * Indic Class Tables diff --git a/modules/indic/indic-ot.h b/modules/indic/indic-ot.h index caf229d4..9730db53 100644 --- a/modules/indic/indic-ot.h +++ b/modules/indic/indic-ot.h @@ -138,27 +138,6 @@ enum indic_glyph_property_ }; /* - * Per-script character ranges - */ -#define SCRIPT_RANGE_deva 0x0900, 0x0970 - -#define SCRIPT_RANGE_beng 0x0980, 0x09FA - -#define SCRIPT_RANGE_guru 0x0A00, 0x0A74 - -#define SCRIPT_RANGE_gujr 0x0A80, 0x0AEF - -#define SCRIPT_RANGE_orya 0x0B00, 0x0B70 - -#define SCRIPT_RANGE_taml 0x0B80, 0x0BF2 - -#define SCRIPT_RANGE_telu 0x0C00, 0x0C6F - -#define SCRIPT_RANGE_knda 0x0C80, 0x0CEF - -#define SCRIPT_RANGE_mlym 0x0D00, 0x0D6F - -/* * Macros to test the charClass flags for various things. */ #define IS_VM_ABOVE(charClass) ((charClass & CF_CLASS_MASK) == CC_MODIFYING_MARK_ABOVE) |