summaryrefslogtreecommitdiff
path: root/pango/pango-context.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-08-15 22:23:19 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-08-15 22:23:19 +0000
commit2f6a750a060e505e7190e0aebe650b901dcf455c (patch)
tree5b67ba04f335acaf12d634bf0da4322068915498 /pango/pango-context.c
parent39a80ded9e79d92b70c5903ac9d4a3ae594f2fbb (diff)
downloadpango-2f6a750a060e505e7190e0aebe650b901dcf455c.tar.gz
Always use fallback shaping for vertical fonts.
2006-08-15 Behdad Esfahbod <behdad@gnome.org> * modules/basic/basic-fc.c (basic_engine_shape): Always use fallback shaping for vertical fonts. * pango/pango-context.c (get_shaper_and_font): Always use basic shaper for vertical items (east/west gravity).
Diffstat (limited to 'pango/pango-context.c')
-rw-r--r--pango/pango-context.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index c538d3e9..c0e20420 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -990,8 +990,28 @@ get_shaper_and_font (ItemizeState *state,
return *shape_engine != NULL;
if (!state->exact_engines && !state->fallback_engines)
- get_engines (state->context, state->derived_lang, state->script,
- &state->exact_engines, &state->fallback_engines);
+ {
+ /* Always use a basic shaper for vertical layout (ie, east/west gravity)
+ * as we do not support vertical shaping as of now.
+ */
+ PangoScript script;
+
+ switch (state->gravity)
+ {
+ case PANGO_GRAVITY_SOUTH:
+ case PANGO_GRAVITY_NORTH:
+ default:
+ script = state->script;
+ break;
+ case PANGO_GRAVITY_EAST:
+ case PANGO_GRAVITY_WEST:
+ script = PANGO_SCRIPT_COMMON;
+ break;
+ }
+
+ get_engines (state->context, state->derived_lang, script,
+ &state->exact_engines, &state->fallback_engines);
+ }
info.lang = state->derived_lang;
info.wc = wc;