summaryrefslogtreecommitdiff
path: root/pango/pango-fontset.h
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-09-23 23:11:59 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-09-23 23:11:59 +0000
commit0f36f55ee0e7c9bf224fabbaf31843b3868f213c (patch)
treea8446856f4dce9b792f5e2ca1c3f9d25bbc40b76 /pango/pango-fontset.h
parent8fa8e29cd61c802c6b100b3cca800784e3a9de20 (diff)
downloadpango-0f36f55ee0e7c9bf224fabbaf31843b3868f213c.tar.gz
Modules now declare a list of scripts that they cover instead of a list of
Tue Sep 23 18:03:57 2003 Owen Taylor <otaylor@redhat.com> * pango/pango-engines.[ch] pango/pango-engines-private.h: Modules now declare a list of scripts that they cover instead of a list of code point ranges. Also, there is now a ->covers() virtual function that allows a module to decide live whether the font covers a particular codepoint; remove old get_coverage() method. * pango/pango-fontset.[ch]: Add a foreach() function to iterate over all the fonts in a fontset (with a true return stopping iteration). * pango/pango-context.c: Complete rewrite using script-run information to improve language tags. Switch to an approach where we handle one run at a time rather than computing information for each character individually then later breaking the result into runs. * pango/pango-fontset.[ch]: Switch over to using pango-impl-utils.h. * modules/basic/basic-x.c pango/pangox-fontmap.c: Adapt to the change from get_coverage => covers. * pango/pango-modules.h pango/modules.c: Switch PangoMap over to being based on script rather than being based on codepoint. Remove the no longer needed pango_map_get_entry(). * pango/modules.c: Handle new script-based modules. * pango/pango-fc-fontmap.c pango/pango-win32-fontmap.c pango/pang-fontmap.[ch]: Add a shape_engine_type field to PangoFontmapClass, pango_font_map_get_shape_engine_type(); this allows generic code to find a shaper for a particular fontmap. * pango/pango-script.[ch]: Add pango_script_get_sample_language(), pango_language_includes_script(); functions for determining the relationship between scripts and language. * tools/gen-script-for-lang.c: Modify to spit out a useful table. * pango/pango-script-lang-table.h: Version of table generated from current fontconfig data. * pango/pangox.c: Remove complicated code to compute coverages; no longer useful now that we just have the basic shaper as a legacy thing. * modules/*/*.c: Adapt to identifying shape engines by language range. * modules/thai/thai-fc.c modules/thai/thai-shaper.[ch]: Remove now unused "has_glyph" function and XTIS support. * modules/thai/thai-fc.c: Handle non-Thai characters as well, since the Thai module now gets spaces, punctuation, and so forth.
Diffstat (limited to 'pango/pango-fontset.h')
-rw-r--r--pango/pango-fontset.h37
1 files changed, 29 insertions, 8 deletions
diff --git a/pango/pango-fontset.h b/pango/pango-fontset.h
index 8a118328..49cc6006 100644
--- a/pango/pango-fontset.h
+++ b/pango/pango-fontset.h
@@ -41,9 +41,27 @@ GType pango_fontset_get_type (void) G_GNUC_CONST;
typedef struct _PangoFontset PangoFontset;
-PangoFont * pango_fontset_get_font (PangoFontset *fontset,
- guint wc);
-PangoFontMetrics *pango_fontset_get_metrics (PangoFontset *fontset);
+/**
+ * PangoFontsetForeachFunc
+ * @fontset: a #PangoFontset
+ * @font: a font from @fontset
+ * @data: callback data
+ *
+ * A callback function used by pango_fontset_foreach() when enumerating
+ * the fonts in a fontset.
+ *
+ * Returns: if %TRUE, stop iteration and return immediatlehy.
+ **/
+typedef gboolean (*PangoFontsetForeachFunc) (PangoFontset *fontset,
+ PangoFont *font,
+ gpointer data);
+
+PangoFont * pango_fontset_get_font (PangoFontset *fontset,
+ guint wc);
+PangoFontMetrics *pango_fontset_get_metrics (PangoFontset *fontset);
+void pango_fontset_foreach (PangoFontset *fontset,
+ PangoFontsetForeachFunc func,
+ gpointer data);
#ifdef PANGO_ENABLE_BACKEND
@@ -64,11 +82,14 @@ struct _PangoFontsetClass
/*< public >*/
- PangoFont * (*get_font) (PangoFontset *fontset,
- guint wc);
-
- PangoFontMetrics *(*get_metrics) (PangoFontset *fontset);
- PangoLanguage * (*get_language) (PangoFontset *fontset);
+ PangoFont * (*get_font) (PangoFontset *fontset,
+ guint wc);
+
+ PangoFontMetrics *(*get_metrics) (PangoFontset *fontset);
+ PangoLanguage * (*get_language) (PangoFontset *fontset);
+ void (*foreach) (PangoFontset *fontset,
+ PangoFontsetForeachFunc func,
+ gpointer data);
/*< private >*/