summaryrefslogtreecommitdiff
path: root/pango/pangofc-fontmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pangofc-fontmap.h')
-rw-r--r--pango/pangofc-fontmap.h49
1 files changed, 38 insertions, 11 deletions
diff --git a/pango/pangofc-fontmap.h b/pango/pangofc-fontmap.h
index a6f4d511..7e339542 100644
--- a/pango/pangofc-fontmap.h
+++ b/pango/pangofc-fontmap.h
@@ -64,22 +64,38 @@ struct _PangoFcFontMap
* @default_substitute: Substitutes in default values for
* unspecified fields in a #FcPattern. This will be called
* prior to creating a font for the pattern. May be %NULL.
+ * Deprecated in favor of @context_substitute().
* @new_font: Creates a new #PangoFcFont for the specified
* pattern of the appropriate type for this font map. The
* @pattern argument must be passed to the "pattern" property
* of #PangoFcFont when you call g_object_new(). Deprecated
* in favor of @create_font().
- * @get_render_key: Given a context and font description,
- * calculate a "key" of X and Y sizes and a flags word
- * that can be used to hash the results of loading a font
- * with that information. If %NULL, a default implementation
- * is used.
+ * @get_resolution: Gets the resolution (the scale factor
+ * between logical and absolute font sizes) that the backend
+ * will use for a particular fontmap and context. @context
+ * may be null.
+ * @context_key_get: Gets an opaque key holding backend
+ * specific options for the context that will affect
+ * fonts created by create_font(). The result must point to
+ * persistant storage owned by the fontmap. This key
+ * is used to index hash tables used to look up fontsets
+ * and fonts.
+ * @context_key_copy: Copies a context key. Pango uses this
+ * to make a persistant copy of the value returned from
+ * @context_key_get.
+ * @context_key_free: Frees a context key copied with
+ * @context_key_copy.
+ * @context_key_hash: Gets a hash value for a context key
+ * @context_key_equal: Compares two context keys for equality.
* @create_font: Creates a new #PangoFcFont for the specified
* pattern of the appropriate type for this font map using
* information from the context that is passed in. The
* @pattern argument must be passed to the "pattern" property
* of #PangoFcFont when you call g_object_new(). Deprecated
* in favor of @create_font(). If %NULL, new_font() is used.
+ * @context_substitute: Substitutes in default values for
+ * unspecified fields in a #FcPattern. This will be called
+ * prior to creating a font for the pattern. May be %NULL.
*
* Class structure for #PangoFcFontMap.
**/
@@ -96,12 +112,21 @@ struct _PangoFcFontMapClass
PangoFcFont *(*new_font) (PangoFcFontMap *fontmap,
FcPattern *pattern);
- gboolean (*get_render_key) (PangoFcFontMap *fcfontmap,
- PangoContext *context,
- const PangoFontDescription *desc,
- int *xsize,
- int *ysize,
- guint *flags);
+ double (*get_resolution) (PangoFcFontMap *fcfontmap,
+ PangoContext *context);
+
+ gconstpointer (*context_key_get) (PangoFcFontMap *fcfontmap,
+ PangoContext *context);
+ gpointer (*context_key_copy) (PangoFcFontMap *fcfontmap,
+ gconstpointer key);
+ void (*context_key_free) (PangoFcFontMap *fcfontmap,
+ gpointer key);
+ guint32 (*context_key_hash) (PangoFcFontMap *fcfontmap,
+ gconstpointer key);
+ gboolean (*context_key_equal) (PangoFcFontMap *fcfontmap,
+ gconstpointer key_a,
+ gconstpointer key_b);
+
void (*context_substitute) (PangoFcFontMap *fontmap,
PangoContext *context,
FcPattern *pattern);
@@ -114,6 +139,8 @@ struct _PangoFcFontMapClass
/* Padding for future expansion */
void (*_pango_reserved1) (void);
void (*_pango_reserved2) (void);
+ void (*_pango_reserved3) (void);
+ void (*_pango_reserved4) (void);
};
PangoContext * pango_fc_font_map_create_context (PangoFcFontMap *fcfontmap);