diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2006-08-15 22:55:37 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-08-15 22:55:37 +0000 |
commit | 3b88b840eac1b8b8dca9c6d93f916ef70e973ca8 (patch) | |
tree | 58ad626c25ee8857ed800dddad1355a07cfb5716 /modules | |
parent | 2f6a750a060e505e7190e0aebe650b901dcf455c (diff) | |
download | pango-3b88b840eac1b8b8dca9c6d93f916ef70e973ca8.tar.gz |
Use analysis->gravity to detect vertical fonts, instead of poking into the
2006-08-15 Behdad Esfahbod <behdad@gnome.org>
* modules/basic/basic-fc.c (basic_engine_shape): Use analysis->gravity
to detect vertical fonts, instead of poking into the font_pattern.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/basic/basic-fc.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/modules/basic/basic-fc.c b/modules/basic/basic-fc.c index 7d800bae..dcf93761 100644 --- a/modules/basic/basic-fc.c +++ b/modules/basic/basic-fc.c @@ -23,7 +23,6 @@ #include <config.h> #include <string.h> -#define PANGO_ENABLE_BACKEND 1 /* to get access to ->font_pattern :( */ #include <glib/gprintf.h> #include "pango-engine.h" #include "pango-utils.h" @@ -338,7 +337,7 @@ basic_engine_shape (PangoEngineShape *engine, const char *p; int cluster = 0; int i; - FcBool vertical = FcFalse; + gboolean vertical; g_return_if_fail (font != NULL); g_return_if_fail (text != NULL); @@ -350,11 +349,19 @@ basic_engine_shape (PangoEngineShape *engine, if (!face) return; -#ifdef FC_VERTICAL_LAYOUT - FcPatternGetBool (fc_font->font_pattern, FC_VERTICAL_LAYOUT, 0, &vertical); -#endif - - if (vertical == FcTrue) + switch (analysis->gravity) + { + case PANGO_GRAVITY_SOUTH: + case PANGO_GRAVITY_NORTH: + default: + vertical = FALSE; + break; + case PANGO_GRAVITY_EAST: + case PANGO_GRAVITY_WEST: + vertical = TRUE; + break; + } + if (vertical) { fallback_shape (engine, font, text, length, analysis, glyphs); goto out; |