diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2008-09-11 08:37:02 +0930 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2008-09-11 08:37:02 +0930 |
commit | 6772efcdf6b6710c839ab58a7218866cc9f409b6 (patch) | |
tree | 69b9f6f01395d2c96f27be198c101c7db328e434 /src/cairo-scaled-font-subsets-private.h | |
parent | 59fafcee8d6f3b5ba81e0bb1d90eb65b8e5daf93 (diff) | |
download | cairo-6772efcdf6b6710c839ab58a7218866cc9f409b6.tar.gz |
Put user fonts in a separate subset
Diffstat (limited to 'src/cairo-scaled-font-subsets-private.h')
-rw-r--r-- | src/cairo-scaled-font-subsets-private.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/cairo-scaled-font-subsets-private.h b/src/cairo-scaled-font-subsets-private.h index c7991a7e9..88dedb59b 100644 --- a/src/cairo-scaled-font-subsets-private.h +++ b/src/cairo-scaled-font-subsets-private.h @@ -282,6 +282,41 @@ _cairo_scaled_font_subsets_foreach_unscaled (cairo_scaled_font_subsets_t void *closure); /** + * _cairo_scaled_font_subsets_foreach_user: + * @font_subsets: a #cairo_scaled_font_subsets_t + * @font_subset_callback: a function to be called for each font subset + * @closure: closure data for the callback function + * + * Iterate over each unique scaled font subset as created by calls to + * _cairo_scaled_font_subsets_map_glyph(). A subset is determined by + * unique pairs of (font_id, subset_id) as returned by + * _cairo_scaled_font_subsets_map_glyph(). + * + * For each subset, @font_subset_callback will be called and will be + * provided with both a #cairo_scaled_font_subset_t object containing + * all the glyphs in the subset as well as the value of @closure. + * + * The #cairo_scaled_font_subset_t object contains the scaled_font, + * the font_id, and the subset_id corresponding to all glyphs + * belonging to the subset. In addition, it contains an array providing + * a mapping between subset glyph indices and the original scaled font + * glyph indices. + * + * The index of the array corresponds to subset_glyph_index values + * returned by _cairo_scaled_font_subsets_map_glyph() while the + * values of the array correspond to the scaled_font_glyph_index + * values passed as input to the same function. + * + * Return value: %CAIRO_STATUS_SUCCESS if successful, or a non-zero + * value indicating an error. Possible errors include + * %CAIRO_STATUS_NO_MEMORY. + **/ +cairo_private cairo_status_t +_cairo_scaled_font_subsets_foreach_user (cairo_scaled_font_subsets_t *font_subsets, + cairo_scaled_font_subset_callback_func_t font_subset_callback, + void *closure); + +/** * _cairo_scaled_font_subset_create_glyph_names: * @font_subsets: a #cairo_scaled_font_subsets_t * |