summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--modules/basic/basic-fc.c21
2 files changed, 19 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 1ed99032..1734a26d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
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.
+
+2006-08-15 Behdad Esfahbod <behdad@gnome.org>
+
* modules/basic/basic-fc.c (basic_engine_shape): Always use
fallback shaping for vertical fonts.
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;