summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2010-09-21 15:47:17 -0400
committerBehdad Esfahbod <behdad@behdad.org>2010-09-21 15:49:07 -0400
commit64ada662476f5b5506a9a455f4c39242ab51ff38 (patch)
treee823ef001fb95198ba0fea2944db8334daef4942 /modules
parente008ca8f198965b55fc4ef297b4d31902b5afc36 (diff)
parent254f42980e272f0560b28d466c2b65a1748b1132 (diff)
downloadpango-64ada662476f5b5506a9a455f4c39242ab51ff38.tar.gz
Merge branch 'master' into harfbuzz-ng-external
Conflicts: pango/Makefile.am pango/pango-ot-buffer.c pango/pango-ot-info.c Removed: pango/opentype/Makefile.am pango/opentype/hb-blob.c pango/opentype/hb-open-file-private.hh pango/opentype/hb-open-type-private.hh pango/opentype/hb-ot-layout-common-private.hh pango/opentype/hb-ot-layout-gdef-private.hh pango/opentype/hb-ot-layout-gpos-private.hh pango/opentype/hb-ot-layout-gsub-private.hh pango/opentype/hb-ot-layout-gsubgpos-private.hh pango/opentype/hb-ot-layout.cc pango/opentype/hb-ot-layout.h pango/opentype/hb-private.h
Diffstat (limited to 'modules')
-rw-r--r--modules/basic/Makefile.am3
-rw-r--r--modules/basic/basic-atsui.c15
-rw-r--r--modules/basic/basic-fc.c1
-rw-r--r--modules/basic/basic-win32.c187
-rw-r--r--modules/hebrew/hebrew-fc.c1
-rw-r--r--modules/indic/indic-fc.c1
-rw-r--r--modules/indic/indic-lang.c73
-rw-r--r--modules/indic/indic-ot-class-tables.c12
-rw-r--r--modules/khmer/khmer-fc.c1
-rw-r--r--modules/thai/thai-fc.c2
-rw-r--r--modules/tibetan/tibetan-fc.c1
11 files changed, 169 insertions, 128 deletions
diff --git a/modules/basic/Makefile.am b/modules/basic/Makefile.am
index 8035e3b3..646a61ec 100644
--- a/modules/basic/Makefile.am
+++ b/modules/basic/Makefile.am
@@ -47,7 +47,8 @@ endif
endif
pango_basic_win32_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
-pango_basic_win32_la_LIBADD = $(pangowin32libs) -lgdi32
+pango_basic_win32_la_LIBADD = $(pangowin32libs) -lgdi32 -lusp10
+libpango_basic_win32_la_LIBADD = -lgdi32 -lusp10
pango_basic_win32_la_SOURCES = basic-win32.c
libpango_basic_win32_la_SOURCES = basic-win32.c
libpango_basic_win32_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_basic_win32
diff --git a/modules/basic/basic-atsui.c b/modules/basic/basic-atsui.c
index a3df773d..369a596a 100644
--- a/modules/basic/basic-atsui.c
+++ b/modules/basic/basic-atsui.c
@@ -86,21 +86,24 @@ basic_engine_shape (PangoEngineShape *engine,
const char *p;
PangoATSUIFont *afont = PANGO_ATSUI_FONT (font);
ATSUStyle style;
- CGFontRef fontID;
+ ATSUFontID fontID;
ATSUAttributeTag styleTags[] = { kATSUFontTag };
ATSUAttributeValuePtr styleValues[] = { &fontID };
- ByteCount styleSizes[] = { sizeof (CGFontRef) };
+ ByteCount styleSizes[] = { sizeof (ATSUFontID) };
utf16 = g_utf8_to_utf16 (text, length, NULL, &n16, NULL);
- err = ATSUCreateTextLayout (&text_layout);
- err = ATSUSetTextPointerLocation (text_layout, utf16, 0, n16, n16);
+ err = ATSUCreateTextLayoutWithTextPtr (utf16, 0, n16, n16,
+ 0,
+ NULL,
+ NULL,
+ &text_layout);
err = ATSUCreateStyle(&style);
- fontID = pango_atsui_font_get_cgfont (afont);
+ fontID = pango_atsui_font_get_atsfont (afont);
err = ATSUSetAttributes(style,
- sizeof(styleTags) / sizeof(styleTags[0]),
+ (ItemCount)(sizeof(styleTags) / sizeof(styleTags[0])),
styleTags, styleSizes, styleValues);
err = ATSUSetRunStyle(text_layout,
diff --git a/modules/basic/basic-fc.c b/modules/basic/basic-fc.c
index b3619c3e..cd5cebea 100644
--- a/modules/basic/basic-fc.c
+++ b/modules/basic/basic-fc.c
@@ -27,6 +27,7 @@
#define PANGO_ENABLE_BACKEND 1 /* XXX */
#include <glib/gprintf.h>
+
#include "pango-engine.h"
#include "pango-utils.h"
#include "pangofc-font.h"
diff --git a/modules/basic/basic-win32.c b/modules/basic/basic-win32.c
index ecb139e0..7a27d501 100644
--- a/modules/basic/basic-win32.c
+++ b/modules/basic/basic-win32.c
@@ -30,6 +30,13 @@
#include <glib.h>
#include "pangowin32.h"
+
+extern HFONT _pango_win32_font_get_hfont (PangoFont *font);
+
+#ifndef PANGO_MODULE_PREFIX
+#define PANGO_MODULE_PREFIX _pango_basic_win32
+#endif
+
#include "pango-engine.h"
#include "pango-utils.h"
@@ -43,55 +50,8 @@ static gboolean pango_win32_debug = FALSE;
#include <usp10.h>
-static gboolean have_uniscribe = FALSE;
-
static HDC hdc;
-typedef HRESULT (WINAPI *pScriptGetProperties) (const SCRIPT_PROPERTIES ***,
- int *);
-
-typedef HRESULT (WINAPI *pScriptItemize) (const WCHAR *,
- int,
- int,
- const SCRIPT_CONTROL *,
- const SCRIPT_STATE *,
- SCRIPT_ITEM *,
- int *);
-
-typedef HRESULT (WINAPI *pScriptShape) (HDC,
- SCRIPT_CACHE *,
- const WCHAR *,
- int,
- int,
- SCRIPT_ANALYSIS *,
- WORD *,
- WORD *,
- SCRIPT_VISATTR *,
- int *);
-
-typedef HRESULT (WINAPI *pScriptPlace) (HDC,
- SCRIPT_CACHE *,
- const WORD *,
- int,
- const SCRIPT_VISATTR *,
- SCRIPT_ANALYSIS *,
- int *,
- GOFFSET *,
- ABC *);
-
-typedef HRESULT (WINAPI *pScriptFreeCache) (SCRIPT_CACHE *);
-
-typedef HRESULT (WINAPI *pScriptIsComplex) (WCHAR *,
- int,
- DWORD);
-
-static pScriptGetProperties script_get_properties;
-static pScriptItemize script_itemize;
-static pScriptShape script_shape;
-static pScriptPlace script_place;
-static pScriptFreeCache script_free_cache;
-static pScriptIsComplex script_is_complex;
-
#ifdef BASIC_WIN32_DEBUGGING
static const SCRIPT_PROPERTIES **scripts;
static int nscripts;
@@ -495,8 +455,7 @@ itemize_shape_and_place (PangoFont *font,
wchar_t *wtext,
int wlen,
const PangoAnalysis *analysis,
- PangoGlyphString *glyphs,
- SCRIPT_CACHE *script_cache)
+ PangoGlyphString *glyphs)
{
int i;
int item, nitems, item_step;
@@ -505,6 +464,11 @@ itemize_shape_and_place (PangoFont *font,
SCRIPT_STATE state;
SCRIPT_ITEM items[100];
double scale = pango_win32_font_get_metrics_factor (font);
+ HFONT hfont = _pango_win32_font_get_hfont (font);
+ static GHashTable *script_cache_hash = NULL;
+
+ if (!script_cache_hash)
+ script_cache_hash = g_hash_table_new (g_int64_hash, g_int64_equal);
memset (&control, 0, sizeof (control));
memset (&state, 0, sizeof (state));
@@ -517,8 +481,8 @@ itemize_shape_and_place (PangoFont *font,
g_print (G_STRLOC ": ScriptItemize: uDefaultLanguage:%04x uBidiLevel:%d\n",
control.uDefaultLanguage, state.uBidiLevel);
#endif
- if ((*script_itemize) (wtext, wlen, G_N_ELEMENTS (items), &control, NULL,
- items, &nitems))
+ if (ScriptItemize (wtext, wlen, G_N_ELEMENTS (items), &control, NULL,
+ items, &nitems))
{
#ifdef BASIC_WIN32_DEBUGGING
if (pango_win32_debug)
@@ -551,9 +515,11 @@ itemize_shape_and_place (PangoFont *font,
int advances[1000];
GOFFSET offsets[1000];
ABC abc;
- int script = items[item].a.eScript;
+ gint32 script = items[item].a.eScript;
int ng;
int char_offset;
+ SCRIPT_CACHE *script_cache;
+ gint64 font_and_script_key;
memset (advances, 0, sizeof (advances));
memset (offsets, 0, sizeof (offsets));
@@ -579,16 +545,40 @@ itemize_shape_and_place (PangoFont *font,
items[item].a.fNoGlyphIndex ? " fNoGlyphIndex" : "",
items[item].iCharPos, items[item+1].iCharPos-1, itemlen);
#endif
+ /* Create a hash key based on hfont and script engine */
+ font_and_script_key = (((gint64) ((gint32) hfont)) << 32) | script;
+
+ /* Get the script cache for this hfont and script */
+ script_cache = g_hash_table_lookup (script_cache_hash, &font_and_script_key);
+ if (!script_cache)
+ {
+ gint64 *key_n;
+ SCRIPT_CACHE *new_script_cache;
+
+ key_n = g_new (gint64, 1);
+ *key_n = font_and_script_key;
+
+ new_script_cache = g_new0 (SCRIPT_CACHE, 1);
+ script_cache = new_script_cache;
+
+ /* Insert the new value */
+ g_hash_table_insert (script_cache_hash, key_n, new_script_cache);
+
+#ifdef BASIC_WIN32_DEBUGGING
+ if (pango_win32_debug)
+ g_print (" New SCRIPT_CACHE for font %p and script %d\n", hfont, script);
+#endif
+ }
items[item].a.fRTL = analysis->level % 2;
- if ((*script_shape) (hdc, &script_cache[script],
- wtext + items[item].iCharPos, itemlen,
- G_N_ELEMENTS (iglyphs),
- &items[item].a,
- iglyphs,
- log_clusters,
- visattrs,
- &nglyphs))
+ if (ScriptShape (hdc, script_cache,
+ wtext + items[item].iCharPos, itemlen,
+ G_N_ELEMENTS (iglyphs),
+ &items[item].a,
+ iglyphs,
+ log_clusters,
+ visattrs,
+ &nglyphs))
{
#ifdef BASIC_WIN32_DEBUGGING
if (pango_win32_debug)
@@ -611,9 +601,9 @@ itemize_shape_and_place (PangoFont *font,
nglyphs, glyphs->log_clusters + ng,
char_offset);
- if ((*script_place) (hdc, &script_cache[script], iglyphs, nglyphs,
- visattrs, &items[item].a,
- advances, offsets, &abc))
+ if (ScriptPlace (hdc, script_cache, iglyphs, nglyphs,
+ visattrs, &items[item].a,
+ advances, offsets, &abc))
{
#ifdef BASIC_WIN32_DEBUGGING
if (pango_win32_debug)
@@ -671,9 +661,7 @@ uniscribe_shape (PangoFont *font,
{
wchar_t *wtext;
long wlen;
- int i;
gboolean retval = TRUE;
- SCRIPT_CACHE script_cache[100];
if (!pango_win32_font_select_font (font, hdc))
return FALSE;
@@ -684,11 +672,7 @@ uniscribe_shape (PangoFont *font,
if (retval)
{
- memset (script_cache, 0, sizeof (script_cache));
- retval = itemize_shape_and_place (font, hdc, wtext, wlen, analysis, glyphs, script_cache);
- for (i = 0; i < G_N_ELEMENTS (script_cache); i++)
- if (script_cache[i])
- (*script_free_cache)(&script_cache[i]);
+ retval = itemize_shape_and_place (font, hdc, wtext, wlen, analysis, glyphs);
}
if (retval)
@@ -726,7 +710,7 @@ text_is_simple (const char *text,
if (wtext == NULL)
return TRUE;
- retval = ((*script_is_complex) (wtext, wlen, SIC_COMPLEX) == S_FALSE);
+ retval = (ScriptIsComplex (wtext, wlen, SIC_COMPLEX) == S_FALSE);
g_free (wtext);
@@ -756,8 +740,7 @@ basic_engine_shape (PangoEngineShape *engine,
g_return_if_fail (length >= 0);
g_return_if_fail (analysis != NULL);
- if (have_uniscribe &&
- !text_is_simple (text, length) &&
+ if (!text_is_simple (text, length) &&
uniscribe_shape (font, text, length, analysis, glyphs))
return;
@@ -846,33 +829,10 @@ basic_engine_shape (PangoEngineShape *engine,
static void
init_uniscribe (void)
{
- HMODULE usp10_dll;
-
- have_uniscribe = FALSE;
-
- if ((usp10_dll = LoadLibrary ("usp10.dll")) != NULL)
- {
- (script_get_properties = (pScriptGetProperties)
- GetProcAddress (usp10_dll, "ScriptGetProperties")) &&
- (script_itemize = (pScriptItemize)
- GetProcAddress (usp10_dll, "ScriptItemize")) &&
- (script_shape = (pScriptShape)
- GetProcAddress (usp10_dll, "ScriptShape")) &&
- (script_place = (pScriptPlace)
- GetProcAddress (usp10_dll, "ScriptPlace")) &&
- (script_free_cache = (pScriptFreeCache)
- GetProcAddress (usp10_dll, "ScriptFreeCache")) &&
- (script_is_complex = (pScriptIsComplex)
- GetProcAddress (usp10_dll, "ScriptIsComplex")) &&
- (have_uniscribe = TRUE);
- }
- if (have_uniscribe)
- {
#ifdef BASIC_WIN32_DEBUGGING
- (*script_get_properties) (&scripts, &nscripts);
+ ScriptGetProperties (&scripts, &nscripts);
#endif
- hdc = pango_win32_get_dc ();
- }
+ hdc = pango_win32_get_dc ();
}
static void
@@ -909,28 +869,25 @@ PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines,
script_engines[0].scripts = basic_scripts;
script_engines[0].n_scripts = G_N_ELEMENTS (basic_scripts);
- if (have_uniscribe)
- {
#if 0
- int i;
- GArray *ranges = g_array_new (FALSE, FALSE, sizeof (PangoEngineRange));
+ int i;
+ GArray *ranges = g_array_new (FALSE, FALSE, sizeof (PangoEngineRange));
- /* Walk through scripts supported by the Uniscribe implementation on this
- * machine, and mark corresponding Unicode ranges.
- */
- for (i = 0; i < nscripts; i++)
- {
- }
+ /* Walk through scripts supported by the Uniscribe implementation on this
+ * machine, and mark corresponding Unicode ranges.
+ */
+ for (i = 0; i < nscripts; i++)
+ {
+ }
- /* Sort range array */
- g_array_sort (ranges, compare_range);
- script_engines[0].ranges = ranges;
- script_engines[0].n_ranges = ranges->len;
+ /* Sort range array */
+ g_array_sort (ranges, compare_range);
+ script_engines[0].ranges = ranges;
+ script_engines[0].n_ranges = ranges->len;
#else
- script_engines[0].scripts = uniscribe_scripts;
- script_engines[0].n_scripts = G_N_ELEMENTS (uniscribe_scripts);
+ script_engines[0].scripts = uniscribe_scripts;
+ script_engines[0].n_scripts = G_N_ELEMENTS (uniscribe_scripts);
#endif
- }
*engines = script_engines;
*n_engines = G_N_ELEMENTS (script_engines);
diff --git a/modules/hebrew/hebrew-fc.c b/modules/hebrew/hebrew-fc.c
index fcfed2b4..12f25c5e 100644
--- a/modules/hebrew/hebrew-fc.c
+++ b/modules/hebrew/hebrew-fc.c
@@ -27,6 +27,7 @@
#include <string.h>
#include <pango/pango-ot.h>
+
#include "pango-engine.h"
#include "pango-utils.h"
#include "pangofc-font.h"
diff --git a/modules/indic/indic-fc.c b/modules/indic/indic-fc.c
index 6ba90c1a..3a232be4 100644
--- a/modules/indic/indic-fc.c
+++ b/modules/indic/indic-fc.c
@@ -252,6 +252,7 @@ indic_engine_shape (PangoEngineShape *engine,
pango_glyph_string_set_size (glyphs, n_glyphs);
buffer = pango_ot_buffer_new (fc_font);
+ pango_ot_buffer_set_rtl (buffer, analysis->level % 2 != 0);
set_glyphs(font, wc_out, tags, n_glyphs, buffer,
(indic_shape_engine->classTable->scriptFlags & SF_PROCESS_ZWJ) != 0);
diff --git a/modules/indic/indic-lang.c b/modules/indic/indic-lang.c
index a3915208..dc01b6fe 100644
--- a/modules/indic/indic-lang.c
+++ b/modules/indic/indic-lang.c
@@ -34,6 +34,73 @@ typedef PangoEngineLangClass IndicEngineLangClass;
#define INDIC_ENGINE_INFO(script) \
{#script ENGINE_SUFFIX, PANGO_ENGINE_TYPE_LANG, RENDER_TYPE, script##_scripts, G_N_ELEMENTS(script##_scripts)}
+#define DEV_RRA 0x0931 /* 0930 + 093c */
+#define DEV_QA 0x0958 /* 0915 + 093c */
+#define DEV_YA 0x095F /* 092f + 003c */
+#define DEV_KHHA 0x0959
+#define DEV_GHHA 0x095A
+#define DEV_ZA 0x095B
+#define DEV_DDDHA 0x095C
+#define DEV_RHA 0x095D
+#define DEV_FA 0x095E
+#define DEV_YYA 0x095F
+
+/* Bengali */
+/* for split matras in all brahmi based script */
+#define BENGALI_SIGN_O 0x09CB /* 09c7 + 09be */
+#define BENGALI_SIGN_AU 0x09CC /* 09c7 + 09d7 */
+#define BENGALI_RRA 0x09DC
+#define BENGALI_RHA 0x09DD
+#define BENGALI_YYA 0x09DF
+
+/* Gurumukhi */
+#define GURUMUKHI_LLA 0x0A33
+#define GURUMUKHI_SHA 0x0A36
+#define GURUMUKHI_KHHA 0x0A59
+#define GURUMUKHI_GHHA 0x0A5A
+#define GURUMUKHI_ZA 0x0A5B
+#define GURUMUKHI_RRA 0x0A5C
+#define GURUMUKHI_FA 0x0A5E
+
+/* Oriya */
+#define ORIYA_AI 0x0B48
+#define ORIYA_O 0x0B4B
+#define ORIYA_AU 0x0B4C
+
+/* Telugu */
+#define TELUGU_EE 0x0C47
+#define TELUGU_AI 0x0C48
+
+/* Tamil */
+#define TAMIL_O 0x0BCA
+#define TAMIL_OO 0x0BCB
+#define TAMIL_AU 0x0BCC
+
+/* Kannada */
+#define KNDA_EE 0x0CC7
+#define KNDA_AI 0x0CC8
+#define KNDA_O 0x0CCA
+#define KNDA_OO 0x0CCB
+
+/* Malayalam */
+#define MLYM_O 0x0D4A
+#define MLYM_OO 0x0D4B
+#define MLYM_AU 0x0D4C
+
+#define IS_COMPOSITE_WITH_BRAHMI_NUKTA(c) ( \
+ (c >= BENGALI_RRA && c <= BENGALI_YYA) || \
+ (c >= DEV_QA && c <= DEV_YA) || (c == DEV_RRA) || (c >= DEV_KHHA && c <= DEV_YYA) || \
+ (c >= KNDA_EE && c <= KNDA_AI) ||(c >= KNDA_O && c <= KNDA_OO) || \
+ (c == TAMIL_O) || (c == TAMIL_OO) || (c == TAMIL_AU) || \
+ (c == TELUGU_EE) || (c == TELUGU_AI) || \
+ (c == ORIYA_AI) || (c == ORIYA_O) || (c == ORIYA_AU) || \
+ (c >= GURUMUKHI_KHHA && c <= GURUMUKHI_RRA) || (c == GURUMUKHI_FA)|| (c == GURUMUKHI_LLA)|| (c == GURUMUKHI_SHA) || \
+ FALSE)
+#define IS_SPLIT_MATRA_BRAHMI(c) ( \
+ (c == BENGALI_SIGN_O) || (c == BENGALI_SIGN_AU) || \
+ (c >= MLYM_O && c <= MLYM_AU) || \
+ FALSE)
+
static PangoEngineScriptInfo deva_scripts[] = {
{ PANGO_SCRIPT_DEVANAGARI, "*" }
@@ -110,6 +177,12 @@ indic_engine_break (PangoEngineLang *engine G_GNUC_UNUSED,
{
this_wc = g_utf8_get_char (p);
next = g_utf8_next_char (p);
+
+ if (G_UNLIKELY (
+ IS_COMPOSITE_WITH_BRAHMI_NUKTA(this_wc) || IS_SPLIT_MATRA_BRAHMI(this_wc))) {
+ attrs[i+1].backspace_deletes_character = FALSE;
+ }
+
if (next != NULL && next < (text + length))
{
next_wc = g_utf8_get_char (next);
diff --git a/modules/indic/indic-ot-class-tables.c b/modules/indic/indic-ot-class-tables.c
index a2dc7613..fca63aec 100644
--- a/modules/indic/indic-ot-class-tables.c
+++ b/modules/indic/indic-ot-class-tables.c
@@ -123,7 +123,7 @@ static const IndicOTCharClass bengCharClasses[] =
_rv, _xx, _ct, _xx, _xx, _xx, _ct, _ct, _ct, _ct, _xx, _xx, _nu, _xx, _dr, _dl, /* 09B0 - 09BF */
_dr, _db, _db, _db, _db, _xx, _xx, _dl, _dl, _xx, _xx, _s1, _s2, _vr, _xx, _xx, /* 09C0 - 09CF */
_xx, _xx, _xx, _xx, _xx, _xx, _xx, _dr, _xx, _xx, _xx, _xx, _cn, _cn, _xx, _cn, /* 09D0 - 09DF */
- _iv, _iv, _dv, _dv, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, /* 09E0 - 09EF */
+ _iv, _iv, _db, _db, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, /* 09E0 - 09EF */
_rv, _ct, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx /* 09F0 - 09FA */
};
@@ -136,7 +136,7 @@ static const IndicOTCharClass guruCharClasses[] =
_dr, _db, _db, _xx, _xx, _xx, _xx, _da, _da, _xx, _xx, _da, _da, _vr, _xx, _xx, /* 0A40 - 0A4F */
_xx, _db, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _cn, _cn, _cn, _ct, _xx, _cn, _xx, /* 0A50 - 0A5F */
_xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, /* 0A60 - 0A6F */
- _ma, _ma, _ct, _ct, _xx, _db /* 0A70 - 0A75 */
+ _ma, _ma, _iv, _iv, _xx, _db /* 0A70 - 0A75 */
};
static const IndicOTCharClass gujrCharClasses[] =
@@ -164,7 +164,7 @@ static const IndicOTCharClass oryaCharClasses[] =
static const IndicOTCharClass tamlCharClasses[] =
{
- _xx, _xx, _ma, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _xx, _iv, _iv, /* 0B80 - 0B8F */
+ _xx, _xx, _ma, _xx, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _xx, _iv, _iv, /* 0B80 - 0B8F */
_iv, _xx, _iv, _iv, _iv, _ct, _xx, _xx, _xx, _ct, _ct, _xx, _ct, _xx, _ct, _ct, /* 0B90 - 0B9F */
_xx, _xx, _xx, _ct, _ct, _xx, _xx, _xx, _ct, _ct, _ct, _xx, _xx, _xx, _ct, _ct, /* 0BA0 - 0BAF */
_ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _ct, _xx, _xx, _xx, _xx, _dr, _dr, /* 0BB0 - 0BBF */
@@ -181,9 +181,9 @@ static const IndicOTCharClass teluCharClasses[] =
_iv, _xx, _iv, _iv, _iv, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, /* 0C10 - 0C1F */
_bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _bb, /* 0C20 - 0C2F */
_bb, _bb, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _xx, _xx, _xx, _xx, _da, _da, /* 0C30 - 0C3F */
- _da, _dr, _dr, _dr, _dr, _xx, _da, _da, _s1, _xx, _da, _da, _da, _vr, _xx, _xx, /* 0C40 - 0C4F */
+ _da, _dr, _dr, _lm, _lm, _xx, _da, _da, _s1, _xx, _da, _da, _da, _vr, _xx, _xx, /* 0C40 - 0C4F */
_xx, _xx, _xx, _xx, _xx, _da, _db, _xx, _bb, _bb, _xx, _xx, _xx, _xx, _xx, _xx, /* 0C50 - 0C5F */
- _iv, _iv, _db, _db, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, /* 0C60 - 0C6F */
+ _iv, _iv, _lm, _lm, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, /* 0C60 - 0C6F */
_xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx /* 0C70 - 0C7F */
};
@@ -200,7 +200,7 @@ static const IndicOTCharClass kndaCharClasses[] =
_xx, _xx, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _iv, _iv, /* 0C80 - 0C8F */
_iv, _xx, _iv, _iv, _iv, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, /* 0C90 - 0C9F */
_bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _bb, /* 0CA0 - 0CAF */
- _rb, _ct, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _xx, _xx, _nu, _xx, _dr, _da, /* 0CB0 - 0CBF */
+ _rb, _bb, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _xx, _xx, _nu, _xx, _dr, _da, /* 0CB0 - 0CBF */
_s1, _dr, _dr, _lm, _lm, _xx, _da, _s2, _s3, _xx, _s4, _s5, _da, _vr, _xx, _xx, /* 0CC0 - 0CCF */
_xx, _xx, _xx, _xx, _xx, _lm, _lm, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _ct, _xx, /* 0CD0 - 0CDF */
_iv, _iv, _lm, _lm, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx /* 0CE0 - 0CEF */
diff --git a/modules/khmer/khmer-fc.c b/modules/khmer/khmer-fc.c
index 04c5c830..14357d78 100644
--- a/modules/khmer/khmer-fc.c
+++ b/modules/khmer/khmer-fc.c
@@ -481,6 +481,7 @@ khmer_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED,
return;
buffer = pango_ot_buffer_new (fc_font);
+ pango_ot_buffer_set_rtl (buffer, analysis->level % 2 != 0);
wcs = g_utf8_to_ucs4_fast (text, length, &n_chars);
diff --git a/modules/thai/thai-fc.c b/modules/thai/thai-fc.c
index 66dccbb4..80c945da 100644
--- a/modules/thai/thai-fc.c
+++ b/modules/thai/thai-fc.c
@@ -32,6 +32,7 @@
#include <glib.h>
#include "pango-ot.h"
+
#include "pango-engine.h"
#include "pangofc-font.h"
@@ -298,6 +299,7 @@ thai_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED,
thai_set_glyphs (font_info, text, length, analysis->script, glyphs);
buffer = pango_ot_buffer_new (PANGO_FC_FONT (font));
+ pango_ot_buffer_set_rtl (buffer, analysis->level % 2 != 0);
for (i = 0; i < glyphs->num_glyphs; i++)
pango_ot_buffer_add_glyph (buffer,
diff --git a/modules/tibetan/tibetan-fc.c b/modules/tibetan/tibetan-fc.c
index 51600fc8..4e894165 100644
--- a/modules/tibetan/tibetan-fc.c
+++ b/modules/tibetan/tibetan-fc.c
@@ -443,6 +443,7 @@ tibetan_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED,
return;
buffer = pango_ot_buffer_new (fc_font);
+ pango_ot_buffer_set_rtl (buffer, analysis->level % 2 != 0);
wcs = g_utf8_to_ucs4_fast (text, length, &n_chars);