summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-09-15 19:18:24 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-09-15 19:18:24 +0000
commit8870d7ce40a6658f3d8be6d047f799b9a560fc66 (patch)
tree68a3ff6968d2b63cf29747b4ac6b6dd34c9ec808
parentc628f8847dffe8ebb391b4868b5d9ae308cb4e42 (diff)
downloadpango-8870d7ce40a6658f3d8be6d047f799b9a560fc66.tar.gz
Unset gravity on the resulting font description. We want gravity to be set
2006-09-15 Behdad Esfahbod <behdad@gnome.org> * pango/pangofc-fontmap.c (pango_fc_face_describe): Unset gravity on the resulting font description. We want gravity to be set on all fonts described, but not font faces.
-rw-r--r--ChangeLog6
-rw-r--r--configure.in4
-rw-r--r--modules/arabic/Makefile.am18
-rw-r--r--pango/break.c20
-rw-r--r--pango/pango-context.c2
-rw-r--r--pango/pangofc-fontmap.c4
6 files changed, 52 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c29fbc39..a5d50692 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-15 Behdad Esfahbod <behdad@gnome.org>
+
+ * pango/pangofc-fontmap.c (pango_fc_face_describe): Unset gravity on
+ the resulting font description. We want gravity to be set on all
+ fonts described, but not font faces.
+
2006-09-14 Behdad Esfahbod <behdad@gnome.org>
* modules/indic/indic-ot-class-tables.c: Change enums to macros, to
diff --git a/configure.in b/configure.in
index 39132fec..e6610f6e 100644
--- a/configure.in
+++ b/configure.in
@@ -394,7 +394,7 @@ fi
#
# Modules to build
#
-arabic_modules="arabic-fc"
+arabic_modules="arabic-fc,arabic-lang"
basic_modules="basic-fc,basic-win32,basic-x,basic-atsui"
hangul_modules="hangul-fc"
hebrew_modules="hebrew-fc"
@@ -472,6 +472,7 @@ done
IFS="$pango_save_ifs"
AM_CONDITIONAL(INCLUDE_ARABIC_FC, echo $included_modules | egrep '(^|,)arabic-fc($|,)' > /dev/null)
+AM_CONDITIONAL(INCLUDE_ARABIC_LANG, echo $included_modules | egrep '(^|,)arabic-lang($|,)' > /dev/null)
AM_CONDITIONAL(INCLUDE_BASIC_FC, echo $included_modules | egrep '(^|,)basic-fc($|,)' > /dev/null)
AM_CONDITIONAL(INCLUDE_BASIC_WIN32, echo $included_modules | egrep '(^|,)basic-win32($|,)' > /dev/null)
AM_CONDITIONAL(INCLUDE_BASIC_X, echo $included_modules | egrep '(^|,)basic-x($|,)' > /dev/null)
@@ -485,6 +486,7 @@ AM_CONDITIONAL(INCLUDE_THAI_FC, echo $included_modules | egrep '(^|,)thai-fc($|
AM_CONDITIONAL(INCLUDE_TIBETAN_FC, echo $included_modules | egrep '(^|,)tibetan-fc($|,)' > /dev/null)
AM_CONDITIONAL(DYNAMIC_ARABIC_FC, echo $dynamic_modules | egrep '(^|,)arabic-fc($|,)' > /dev/null)
+AM_CONDITIONAL(DYNAMIC_ARABIC_LANG, echo $dynamic_modules | egrep '(^|,)arabic-lang($|,)' > /dev/null)
AM_CONDITIONAL(DYNAMIC_BASIC_FC, echo $dynamic_modules | egrep '(^|,)basic-fc($|,)' > /dev/null)
AM_CONDITIONAL(DYNAMIC_BASIC_WIN32, echo $dynamic_modules | egrep '(^|,)basic-win32($|,)' > /dev/null)
AM_CONDITIONAL(DYNAMIC_BASIC_X, echo $dynamic_modules | egrep '(^|,)basic-x($|,)' > /dev/null)
diff --git a/modules/arabic/Makefile.am b/modules/arabic/Makefile.am
index ca129b8d..26b232eb 100644
--- a/modules/arabic/Makefile.am
+++ b/modules/arabic/Makefile.am
@@ -21,3 +21,21 @@ pango_arabic_fc_la_LIBADD = $(pangoft2libs)
pango_arabic_fc_la_SOURCES = $(fc_sources)
libpango_arabic_fc_la_SOURCES = $(fc_sources)
libpango_arabic_fc_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_arabic_fc
+
+
+if INCLUDE_ARABIC_LANG
+noinst_LTLIBRARIES += libpango-arabic-lang.la
+else
+if DYNAMIC_ARABIC_LANG
+module_LTLIBRARIES += pango-arabic-lang.la
+endif
+endif
+
+lang_sources = \
+ arabic-lang.c
+
+pango_arabic_lang_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
+pango_arabic_lang_la_LIBADD = $(pangolibs)
+pango_arabic_lang_la_SOURCES = $(lang_sources)
+libpango_arabic_lang_la_SOURCES = $(lang_sources)
+libpango_arabic_lang_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_arabic_lang
diff --git a/pango/break.c b/pango/break.c
index fcdb7601..4ce2091a 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1488,11 +1488,17 @@ pango_break (const gchar *text,
g_return_if_fail (analysis != NULL);
g_return_if_fail (attrs != NULL);
+ g_message ("break");
+
if (analysis->lang_engine &&
PANGO_ENGINE_LANG_GET_CLASS (analysis->lang_engine)->script_break)
PANGO_ENGINE_LANG_GET_CLASS (analysis->lang_engine)->script_break (analysis->lang_engine, text, length, analysis, attrs, attrs_len);
else
pango_default_break (text, length, analysis, attrs, attrs_len);
+
+ int i;
+ for (i = 0; i < attrs_len; i++)
+ g_message ("%d %d", attrs[i].is_cursor_position, attrs[i].backspace_deletes_character);
}
/**
@@ -1629,6 +1635,7 @@ pango_get_log_attrs (const char *text,
static guint engine_type_id = 0;
static guint render_type_id = 0;
PangoAnalysis analysis = { 0 };
+ PangoScriptIter *iter;
analysis.level = level;
@@ -1647,8 +1654,18 @@ pango_get_log_attrs (const char *text,
render_type_id = g_quark_from_static_string (PANGO_RENDER_TYPE_NONE);
}
+ g_message ("logattrs %d >>>>>", length);
lang_map = pango_find_map (language, engine_type_id, render_type_id);
+
+ iter = pango_script_iter_new (text, length);
+ do
+ {
+
+ }
+ while (pango_script_iter_next (iter));
+ pango_script_iter_free (iter);
+
range_start = text;
script = pango_script_for_unichar (g_utf8_get_char (text));
range_engine = (PangoEngineLang*) pango_map_get_engine (lang_map, script);
@@ -1673,6 +1690,7 @@ pango_get_log_attrs (const char *text,
/* Engine has changed; do the breaking for the current range,
* then start a new range.
*/
+ g_message ("log break %d %d", chars_broken, chars_in_range);
pango_break (range_start,
pos - range_start,
&analysis,
@@ -1698,9 +1716,11 @@ pango_get_log_attrs (const char *text,
g_assert (pos == end);
g_assert (range_engine == analysis.lang_engine);
+ g_message ("log final break %d %d", chars_broken, chars_in_range);
pango_break (range_start,
end - range_start,
&analysis,
log_attrs + chars_broken,
attrs_len - chars_broken);
+ g_message ("logattrs <<<<<");
}
diff --git a/pango/pango-context.c b/pango/pango-context.c
index 8aee2a0d..5b805cfa 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -1273,7 +1273,7 @@ itemize_state_process_run (ItemizeState *state)
if (G_UNLIKELY (!g_unichar_isgraph (wc) && wc != 0x3000 &&
g_unichar_type (wc) != G_UNICODE_PRIVATE_USE))
*/
- if (G_UNLIKELY (!g_unichar_isprint (wc) &&
+ if (G_UNLIKELY (!g_unichar_isgraph (wc) &&
g_unichar_type (wc) != G_UNICODE_PRIVATE_USE))
{
shape_engine = NULL;
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 2c11b100..f77b0338 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1708,6 +1708,10 @@ pango_fc_face_describe (PangoFontFace *face)
{
desc = pango_fc_font_description_from_pattern (result_pattern, FALSE);
FcPatternDestroy (result_pattern);
+ /* Unset gravity. We want gravity to be set to descriptions of fonts,
+ * but not faces.
+ */
+ pango_font_description_unset_fields (desc, PANGO_FONT_MASK_GRAVITY);
}
FcPatternDestroy (match_pattern);