summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-07-24 20:46:25 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-07-24 20:46:25 +0000
commiteb4a8022b98c7da169829a4ba9c6bdc5636dd97d (patch)
tree3ae16ed4763226ee483bff07a35060c79e07e0f5 /modules
parenta938a0d14fcf6df68341360db07cfbd7ba749378 (diff)
downloadpango-eb4a8022b98c7da169829a4ba9c6bdc5636dd97d.tar.gz
Add (*has_glyph) to ThaiFontInfo to avoid having to call
Thu Jul 24 16:11:25 2003 Owen Taylor <otaylor@redhat.com> * modules/thai/thai-x.c modules/thai/thai-shaper.[ch]: Add (*has_glyph) to ThaiFontInfo to avoid having to call pango_x_has_glyph() from thai-shaper.c. (#114852, Tony Graham)
Diffstat (limited to 'modules')
-rw-r--r--modules/thai/thai-shaper.c2
-rw-r--r--modules/thai/thai-shaper.h3
-rw-r--r--modules/thai/thai-x.c7
3 files changed, 11 insertions, 1 deletions
diff --git a/modules/thai/thai-shaper.c b/modules/thai/thai-shaper.c
index 3dcd24bd..1bd61def 100644
--- a/modules/thai/thai-shaper.c
+++ b/modules/thai/thai-shaper.c
@@ -583,7 +583,7 @@ get_glyphs_list (ThaiFontInfo *font_info,
if (cluster[2])
xtis_index += group2_map[cluster[2] - 0xe30];
glyph = (*font_info->make_glyph) (font_info, xtis_index);
- if (pango_x_has_glyph (font_info->font, glyph)) {
+ if ((*font_info->has_glyph) (font_info, glyph)) {
glyph_lists[0] = glyph;
return 1;
}
diff --git a/modules/thai/thai-shaper.h b/modules/thai/thai-shaper.h
index 7f3925fd..7ff31205 100644
--- a/modules/thai/thai-shaper.h
+++ b/modules/thai/thai-shaper.h
@@ -39,6 +39,9 @@ struct _ThaiFontInfo
PangoGlyph
(*make_unknown_glyph) (ThaiFontInfo *font_info, unsigned int c);
+
+ gboolean
+ (*has_glyph) (ThaiFontInfo *font_info, PangoGlyph glyph);
};
/*
diff --git a/modules/thai/thai-x.c b/modules/thai/thai-x.c
index a7b82fe9..6ff5bf54 100644
--- a/modules/thai/thai-x.c
+++ b/modules/thai/thai-x.c
@@ -64,6 +64,12 @@ thai_x_make_unknown_glyph (ThaiFontInfo *font_info, unsigned int c)
return pango_x_get_unknown_glyph (font_info->font);
}
+static gboolean
+thai_x_has_glyph (ThaiFontInfo *font_info, PangoGlyph glyph)
+{
+ return pango_x_has_glyph (font_info->font, glyph);
+}
+
/* Returns a structure with information we will use to rendering given the
* #PangoFont. This is computed once per font and cached for later retrieval.
*/
@@ -136,6 +142,7 @@ thai_x_get_font_info (PangoFont *font)
font_info->make_glyph = thai_x_make_glyph;
font_info->make_unknown_glyph = thai_x_make_unknown_glyph;
+ font_info->has_glyph = thai_x_has_glyph;
}
return font_info;