diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2006-08-15 07:24:48 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-08-15 07:24:48 +0000 |
commit | a79ad88362620acce4cdbebac12f049b83a1a396 (patch) | |
tree | 7106607a7f8d0fd49c279360bd9cb88329f3e9f1 | |
parent | fa4060b583954b6ac17b674b8b6da590bc86163f (diff) | |
download | pango-a79ad88362620acce4cdbebac12f049b83a1a396.tar.gz |
Add FIXME note about handling item gravity.
2006-08-15 Behdad Esfahbod <behdad@gnome.org>
* pango/pango-context.c (itemize_state_process_run):
Add FIXME note about handling item gravity.
* pango/pangofc-fontmap.c (fontset_hash_key_equal),
(fontset_hash_key_hash), (fontset_hash_key_copy),
(pango_fc_font_map_get_patterns): Add gravity into the hask key.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | pango/pango-context.c | 7 | ||||
-rw-r--r-- | pango/pangofc-fontmap.c | 6 |
3 files changed, 21 insertions, 1 deletions
@@ -1,5 +1,14 @@ 2006-08-15 Behdad Esfahbod <behdad@gnome.org> + * pango/pango-context.c (itemize_state_process_run): + Add FIXME note about handling item gravity. + + * pango/pangofc-fontmap.c (fontset_hash_key_equal), + (fontset_hash_key_hash), (fontset_hash_key_copy), + (pango_fc_font_map_get_patterns): Add gravity into the hask key. + +2006-08-15 Behdad Esfahbod <behdad@gnome.org> + * pango/pango-item.h: Add a gravity member to PangoItem, and * pango/pango-context.c (itemize_state_init), diff --git a/pango/pango-context.c b/pango/pango-context.c index fc199083..34a91f4b 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -1165,7 +1165,12 @@ itemize_state_process_run (ItemizeState *state) font = NULL; } else - get_shaper_and_font (state, wc, &shape_engine, &font); + { + /* FIXME: We need a way to respect item gravity when loading + * fonts, but we currently don't have a way to do that. + */ + get_shaper_and_font (state, wc, &shape_engine, &font); + } itemize_state_add_character (state, shape_engine, font, diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c index 8871866b..230cdb76 100644 --- a/pango/pangofc-fontmap.c +++ b/pango/pangofc-fontmap.c @@ -265,6 +265,7 @@ struct _FontsetHashKey { PangoFcFontMap *fontmap; PangoMatrix matrix; PangoLanguage *language; + PangoGravity gravity; PangoFontDescription *desc; int size; /* scaled via the current DPI */ gpointer context_key; @@ -307,6 +308,7 @@ fontset_hash_key_equal (const FontsetHashKey *key_a, if (key_a->size == key_b->size && pango_font_description_equal (key_a->desc, key_b->desc) && key_a->language == key_b->language && + key_a->gravity == key_b->gravity && key_a->matrix.xx == key_b->matrix.xx && key_a->matrix.xy == key_b->matrix.xy && key_a->matrix.yx == key_b->matrix.yx && @@ -339,6 +341,7 @@ fontset_hash_key_hash (const FontsetHashKey *key) /* 1237 is just an abitrary prime */ return (hash ^ + key->gravity ^ GPOINTER_TO_UINT (key->language) ^ (key->size * 1237) ^ pango_font_description_hash (key->desc)); @@ -364,6 +367,7 @@ fontset_hash_key_copy (FontsetHashKey *old) key->fontmap = old->fontmap; key->matrix = old->matrix; key->language = old->language; + key->gravity = old->gravity; key->desc = pango_font_description_copy (old->desc); key->size = old->size; if (old->context_key) @@ -1031,6 +1035,8 @@ pango_fc_font_map_get_patterns (PangoFontMap *fontmap, key.fontmap = fcfontmap; get_context_matrix (context, &key.matrix); key.language = language; + /* FIXME: support per-item gravity */ + key.gravity = pango_context_get_base_gravity (context); key.desc = pango_font_description_copy_static (desc); pango_font_description_unset_fields (key.desc, PANGO_FONT_MASK_SIZE); key.size = get_unscaled_size (fcfontmap, context, desc); |