diff options
author | Owen Taylor <otaylor@redhat.com> | 2003-07-24 20:46:25 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2003-07-24 20:46:25 +0000 |
commit | eb4a8022b98c7da169829a4ba9c6bdc5636dd97d (patch) | |
tree | 3ae16ed4763226ee483bff07a35060c79e07e0f5 /modules | |
parent | a938a0d14fcf6df68341360db07cfbd7ba749378 (diff) | |
download | pango-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.c | 2 | ||||
-rw-r--r-- | modules/thai/thai-shaper.h | 3 | ||||
-rw-r--r-- | modules/thai/thai-x.c | 7 |
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; |