pango r2808 - in trunk: . docs docs/tmpl pango



Author: behdad
Date: Wed Jan 28 22:08:10 2009
New Revision: 2808
URL: http://svn.gnome.org/viewvc/pango?rev=2808&view=rev

Log:
2009-01-09  Behdad Esfahbod  <behdad gnome org>

        Bug 567165 â Apply all pattern matrices

        * pango/pangocairo-fcfont.c (_pango_cairo_fc_font_new):
        * pango/pangofc-fontmap.c (pango_fc_font_map_new_font):
        Apply all FC_MATRIX values, not just the first one.  Fixes synthetic
        italic rotated text with ft2 and xft backends.  Can't believe no one
        ever noticed that they are broken...

Modified:
   trunk/ChangeLog
   trunk/docs/pango-sections.txt
   trunk/docs/tmpl/pangofc-fontmap.sgml
   trunk/pango/pangocairo-fcfont.c
   trunk/pango/pangocairo-fcfontmap.c
   trunk/pango/pangofc-fontmap.c
   trunk/pango/pangofc-fontmap.h

Modified: trunk/docs/pango-sections.txt
==============================================================================
--- trunk/docs/pango-sections.txt	(original)
+++ trunk/docs/pango-sections.txt	Wed Jan 28 22:08:10 2009
@@ -934,6 +934,13 @@
 PANGO_FC_FONT_MAP_GET_CLASS
 
 <SUBSECTION>
+PangoFcFontsetKey
+pango_fc_fontset_key_get_context_key
+pango_fc_fontset_key_get_description
+pango_fc_fontset_key_get_language
+pango_fc_fontset_key_get_matrix
+pango_fc_fontset_key_get_absolute_size
+pango_fc_fontset_key_get_resolution
 PangoFcFontKey
 pango_fc_font_key_get_context_key
 pango_fc_font_key_get_matrix

Modified: trunk/docs/tmpl/pangofc-fontmap.sgml
==============================================================================
--- trunk/docs/tmpl/pangofc-fontmap.sgml	(original)
+++ trunk/docs/tmpl/pangofc-fontmap.sgml	Wed Jan 28 22:08:10 2009
@@ -50,11 +50,11 @@
 @get_resolution: 
 @context_key_get: 
 @context_key_copy: 
- context_key_free: 
- context_key_hash: 
- context_key_equal: 
- font_key_substitute:
- create_font: 
+ context_key_free:
+ context_key_hash:
+ context_key_equal:
+ fontset_key_substitute:
+ create_font:
 
 <!-- ##### FUNCTION pango_fc_font_map_create_context ##### -->
 <para>
@@ -133,6 +133,66 @@
 
 
 
+<!-- ##### STRUCT PangoFcFontsetKey ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION pango_fc_fontset_key_get_context_key ##### -->
+<para>
+
+</para>
+
+ key:
+ Returns:
+
+
+<!-- ##### FUNCTION pango_fc_fontset_key_get_description ##### -->
+<para>
+
+</para>
+
+ key:
+ Returns:
+
+
+<!-- ##### FUNCTION pango_fc_fontset_key_get_language ##### -->
+<para>
+
+</para>
+
+ key:
+ Returns:
+
+
+<!-- ##### FUNCTION pango_fc_fontset_key_get_matrix ##### -->
+<para>
+
+</para>
+
+ key:
+ Returns:
+
+
+<!-- ##### FUNCTION pango_fc_fontset_key_get_absolute_size ##### -->
+<para>
+
+</para>
+
+ key:
+ Returns:
+
+
+<!-- ##### FUNCTION pango_fc_fontset_key_get_resolution ##### -->
+<para>
+
+</para>
+
+ key:
+ Returns:
+
+
 <!-- ##### STRUCT PangoFcFontKey ##### -->
 <para>
 

Modified: trunk/pango/pangocairo-fcfont.c
==============================================================================
--- trunk/pango/pangocairo-fcfont.c	(original)
+++ trunk/pango/pangocairo-fcfont.c	Wed Jan 28 22:08:10 2009
@@ -223,8 +223,9 @@
   PangoCairoFcFont *cffont;
   const FcPattern *pattern = pango_fc_font_key_get_pattern (key);
   cairo_matrix_t font_matrix;
-  FcMatrix *fc_matrix;
+  FcMatrix fc_matrix, *fc_matrix_val;
   double size;
+  int i;
 
   g_return_val_if_fail (PANGO_IS_CAIRO_FC_FONT_MAP (cffontmap), NULL);
   g_return_val_if_fail (pattern != NULL, NULL);
@@ -236,16 +237,16 @@
   size = get_font_size (pattern) /
 	 pango_matrix_get_font_scale_factor (pango_fc_font_key_get_matrix (key));
 
-  if  (FcPatternGetMatrix (pattern,
-			   FC_MATRIX, 0, &fc_matrix) == FcResultMatch)
-    cairo_matrix_init (&font_matrix,
-		       fc_matrix->xx,
-		       - fc_matrix->yx,
-		       - fc_matrix->xy,
-		       fc_matrix->yy,
-		       0., 0.);
-  else
-    cairo_matrix_init_identity (&font_matrix);
+  FcMatrixInit (&fc_matrix);
+  for (i = 0; FcPatternGetMatrix (pattern, FC_MATRIX, i, &fc_matrix_val) == FcResultMatch; i++)
+    FcMatrixMultiply (&fc_matrix, &fc_matrix, fc_matrix_val);
+
+  cairo_matrix_init (&font_matrix,
+		     fc_matrix.xx,
+		     - fc_matrix.yx,
+		     - fc_matrix.xy,
+		     fc_matrix.yy,
+		     0., 0.);
 
   cairo_matrix_scale (&font_matrix,
 		      size / PANGO_SCALE, size / PANGO_SCALE);

Modified: trunk/pango/pangocairo-fcfontmap.c
==============================================================================
--- trunk/pango/pangocairo-fcfontmap.c	(original)
+++ trunk/pango/pangocairo-fcfontmap.c	Wed Jan 28 22:08:10 2009
@@ -80,14 +80,14 @@
 }
 
 static void
-pango_cairo_fc_font_map_font_key_substitute (PangoFcFontMap *fcfontmap G_GNUC_UNUSED,
-					     PangoFcFontKey *fontkey,
-					     FcPattern      *pattern)
+pango_cairo_fc_font_map_fontset_key_substitute (PangoFcFontMap    *fcfontmap G_GNUC_UNUSED,
+						PangoFcFontsetKey *fontkey,
+						FcPattern         *pattern)
 {
   FcConfigSubstitute (NULL, pattern, FcMatchPattern);
 
   if (fontkey)
-    cairo_ft_font_options_substitute (pango_fc_font_key_get_context_key (fontkey),
+    cairo_ft_font_options_substitute (pango_fc_fontset_key_get_context_key (fontkey),
 				      pattern);
 
   FcDefaultSubstitute (pattern);
@@ -166,7 +166,7 @@
 
   gobject_class->finalize  = pango_cairo_fc_font_map_finalize;
 
-  fcfontmap_class->font_key_substitute = pango_cairo_fc_font_map_font_key_substitute;
+  fcfontmap_class->fontset_key_substitute = pango_cairo_fc_font_map_fontset_key_substitute;
   fcfontmap_class->get_resolution = pango_cairo_fc_font_map_get_resolution_fc;
 
   fcfontmap_class->context_key_get = pango_cairo_fc_font_map_context_key_get;

Modified: trunk/pango/pangofc-fontmap.c
==============================================================================
--- trunk/pango/pangofc-fontmap.c	(original)
+++ trunk/pango/pangofc-fontmap.c	Wed Jan 28 22:08:10 2009
@@ -37,7 +37,6 @@
 typedef struct _PangoFcFamily       PangoFcFamily;
 typedef struct _PangoFcPatternSet   PangoFcPatternSet;
 typedef struct _PangoFcFindFuncInfo PangoFcFindFuncInfo;
-typedef struct _FontsetHashKey      FontsetHashKey;
 
 #define PANGO_FC_TYPE_FAMILY              (pango_fc_family_get_type ())
 #define PANGO_FC_FAMILY(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_FC_TYPE_FAMILY, PangoFcFamily))
@@ -109,7 +108,7 @@
   PangoFontset *fontset;
   GList *cache_link;
 
-  FontsetHashKey *key;
+  PangoFcFontsetKey *key;
 };
 
 struct _PangoFcFindFuncInfo
@@ -155,10 +154,10 @@
 				     const PangoFcFontKey *key_b);
 static void     pango_fc_font_key_free  (PangoFcFontKey       *key);
 
-static guint    fontset_hash_key_hash  (const FontsetHashKey *key);
-static gboolean fontset_hash_key_equal (const FontsetHashKey *key_a,
-					const FontsetHashKey *key_b);
-static void     fontset_hash_key_free  (FontsetHashKey       *key);
+static guint    pango_fc_fontset_key_hash  (const PangoFcFontsetKey *key);
+static gboolean pango_fc_fontset_key_equal (const PangoFcFontsetKey *key_a,
+					    const PangoFcFontsetKey *key_b);
+static void     pango_fc_fontset_key_free  (PangoFcFontsetKey       *key);
 
 static gpointer
 get_gravity_class (void)
@@ -221,21 +220,6 @@
   return key1->id == key2->id && strcmp (key1->filename, key2->filename) == 0;
 }
 
-struct _FontsetHashKey {
-  PangoFcFontMap *fontmap;
-  PangoLanguage *language;
-  PangoFontDescription *desc;
-  int scaled_size;
-  gpointer context_key;
-};
-
-struct _PangoFcFontKey {
-  PangoFcFontMap *fontmap;
-  const FcPattern *pattern;
-  PangoMatrix matrix;
-  gpointer context_key;
-};
-
 /* Fowler / Noll / Vo (FNV) Hash (http://www.isthe.com/chongo/tech/comp/fnv/)
  *
  * Not necessarily better than a lot of other hashes, but should be OK, and
@@ -259,43 +243,66 @@
   return hval;
 }
 
+struct _PangoFcFontsetKey {
+  PangoFcFontMap *fontmap;
+  PangoLanguage *language;
+  PangoFontDescription *desc;
+  PangoMatrix matrix;
+  int pixelsize;
+  double resolution;
+  gpointer context_key;
+};
+
+struct _PangoFcFontKey {
+  PangoFcFontMap *fontmap;
+  const FcPattern *pattern;
+  PangoMatrix matrix;
+  gpointer context_key;
+};
+
 static gboolean
-fontset_hash_key_equal (const FontsetHashKey *key_a,
-			const FontsetHashKey *key_b)
+pango_fc_fontset_key_equal (const PangoFcFontsetKey *key_a,
+			    const PangoFcFontsetKey *key_b)
 {
-  if (key_a->scaled_size == key_b->scaled_size &&
+  if (key_a->language == key_b->language &&
+      key_a->pixelsize == key_b->pixelsize &&
+      key_a->resolution == key_b->resolution &&
       pango_font_description_equal (key_a->desc, key_b->desc) &&
-      key_a->language == key_b->language)
+      0 == memcmp (&key_a->matrix, &key_b->matrix, 4 * sizeof (double)))
     {
       if (key_a->context_key)
 	return PANGO_FC_FONT_MAP_GET_CLASS (key_a->fontmap)->context_key_equal (key_a->fontmap,
 										key_a->context_key,
 										key_b->context_key);
       else
-	return TRUE;
+        return key_a->context_key == key_b->context_key;
     }
   else
     return FALSE;
 }
 
 static guint
-fontset_hash_key_hash (const FontsetHashKey *key)
+pango_fc_fontset_key_hash (const PangoFcFontsetKey *key)
 {
     guint32 hash = FNV1_32_INIT;
 
+    /* We do a bytewise hash on the doubles */
+    hash = hash_bytes_fnv ((unsigned char *)(&key->matrix), sizeof (double) * 4, hash);
+    hash = hash_bytes_fnv ((unsigned char *)(&key->resolution), sizeof (double), hash);
+
+    hash ^= key->pixelsize;
+
     if (key->context_key)
       hash ^= PANGO_FC_FONT_MAP_GET_CLASS (key->fontmap)->context_key_hash (key->fontmap,
 									    key->context_key);
 
-    /* 1237 is just an abitrary prime */
     return (hash ^
 	    GPOINTER_TO_UINT (key->language) ^
-	    (key->scaled_size * 1237) ^
 	    pango_font_description_hash (key->desc));
 }
 
 static void
-fontset_hash_key_free (FontsetHashKey *key)
+pango_fc_fontset_key_free (PangoFcFontsetKey *key)
 {
   pango_font_description_free (key->desc);
 
@@ -303,18 +310,20 @@
     PANGO_FC_FONT_MAP_GET_CLASS (key->fontmap)->context_key_free (key->fontmap,
 								  key->context_key);
 
-  g_slice_free (FontsetHashKey, key);
+  g_slice_free (PangoFcFontsetKey, key);
 }
 
-static FontsetHashKey *
-fontset_hash_key_copy (FontsetHashKey *old)
+static PangoFcFontsetKey *
+pango_fc_fontset_key_copy (PangoFcFontsetKey *old)
 {
-  FontsetHashKey *key = g_slice_new (FontsetHashKey);
+  PangoFcFontsetKey *key = g_slice_new (PangoFcFontsetKey);
 
   key->fontmap = old->fontmap;
   key->language = old->language;
   key->desc = pango_font_description_copy (old->desc);
-  key->scaled_size = old->scaled_size;
+  key->matrix = old->matrix;
+  key->pixelsize = old->pixelsize;
+  key->resolution = old->resolution;
   if (old->context_key)
     key->context_key = PANGO_FC_FONT_MAP_GET_CLASS (key->fontmap)->context_key_copy (key->fontmap,
 										     old->context_key);
@@ -324,6 +333,103 @@
   return key;
 }
 
+/**
+ * pango_fc_fontset_key_get_language:
+ * @key: the fontset key
+ *
+ * Gets the language member of @key.
+ *
+ * Returns: the language
+ *
+ * Since: 1.24
+ **/
+const PangoLanguage *
+pango_fc_fontset_key_get_language    (const PangoFcFontsetKey *key)
+{
+  return key->language;
+}
+
+/**
+ * pango_fc_fontset_key_get_description:
+ * @key: the fontset key
+ *
+ * Gets the font description of @key.
+ *
+ * Returns: the font description, which is owned by @key and should not be modified.
+ *
+ * Since: 1.24
+ **/
+const PangoFontDescription *
+pango_fc_fontset_key_get_description (const PangoFcFontsetKey *key)
+{
+  return key->desc;
+}
+
+/**
+ * pango_fc_fontset_key_get_matrix:
+ * @key: the fontset key
+ *
+ * Gets the matrix member of @key.
+ *
+ * Returns: the matrix, which is owned by @key and should not be modified.
+ *
+ * Since: 1.24
+ **/
+const PangoMatrix *
+pango_fc_fontset_key_get_matrix      (const PangoFcFontsetKey *key)
+{
+  return &key->matrix;
+}
+
+/**
+ * pango_fc_fontset_key_get_absolute_size:
+ * @key: the fontset key
+ *
+ * Gets the absolute font size of @key in Pango units.  This is adjusted
+ * for both resolution and transformation matrix.
+ *
+ * Returns: the pixel size of @key.
+ *
+ * Since: 1.24
+ **/
+double
+pango_fc_fontset_key_get_absolute_size   (const PangoFcFontsetKey *key)
+{
+  return key->pixelsize;
+}
+
+/**
+ * pango_fc_fontset_key_get_resolution:
+ * @key: the fontset key
+ *
+ * Gets the resolution of @key
+ *
+ * Returns: the resolution of @key
+ *
+ * Since: 1.24
+ **/
+double
+pango_fc_fontset_key_get_resolution  (const PangoFcFontsetKey *key)
+{
+  return key->resolution;
+}
+
+/**
+ * pango_fc_fontset_key_get_context_key:
+ * @key: the font key
+ *
+ * Gets the context key member of @key.
+ *
+ * Returns: the context key, which is owned by @key and should not be modified.
+ *
+ * Since: 1.24
+ **/
+gpointer
+pango_fc_fontset_key_get_context_key (const PangoFcFontsetKey *key)
+{
+  return key->context_key;
+}
+
 /*
  * PangoFcFontKey
  */
@@ -351,10 +457,8 @@
 {
     guint32 hash = FNV1_32_INIT;
 
-    /* We do a bytewise hash on the context matrix */
-    hash = hash_bytes_fnv ((unsigned char *)(&key->matrix),
-			   sizeof(double) * 4,
-			   hash);
+    /* We do a bytewise hash on the doubles */
+    hash = hash_bytes_fnv ((unsigned char *)(&key->matrix), sizeof (double) * 4, hash);
 
     if (key->context_key)
       hash ^= PANGO_FC_FONT_MAP_GET_CLASS (key->fontmap)->context_key_hash (key->fontmap,
@@ -502,9 +606,9 @@
 					   (GEqualFunc)pango_fc_font_key_equal,
 					   (GDestroyNotify)pango_fc_font_key_free,
 					   NULL);
-  priv->fontset_hash = g_hash_table_new_full ((GHashFunc)fontset_hash_key_hash,
-					      (GEqualFunc)fontset_hash_key_equal,
-					      (GDestroyNotify)fontset_hash_key_free,
+  priv->fontset_hash = g_hash_table_new_full ((GHashFunc)pango_fc_fontset_key_hash,
+					      (GEqualFunc)pango_fc_fontset_key_equal,
+					      (GDestroyNotify)pango_fc_fontset_key_free,
 					      (GDestroyNotify)pango_fc_pattern_set_free);
 
   priv->coverage_hash = g_hash_table_new_full ((GHashFunc)pango_fc_coverage_key_hash,
@@ -635,8 +739,8 @@
   PangoFcFontKey *key;
 
   key = _pango_fc_font_get_font_key (fcfont);
-
-  g_hash_table_remove (priv->font_hash, key);
+  if (key)
+    g_hash_table_remove (priv->font_hash, key);
   fcfont->fontmap = NULL;
   _pango_fc_font_set_font_key (fcfont, NULL);
 }
@@ -824,7 +928,7 @@
 static FcPattern *
 pango_fc_make_pattern (const  PangoFontDescription *description,
 		       PangoLanguage               *language,
-		       double                       pixel_size,
+		       int                          pixel_size,
 		       double                       dpi)
 {
   FcPattern *pattern;
@@ -868,8 +972,8 @@
 			    FC_VERTICAL_LAYOUT,  FcTypeBool, vertical,
 #endif
 			    FC_DPI, FcTypeDouble, dpi,
-			    FC_SIZE,  FcTypeDouble,  pixel_size * (72. / dpi),
-			    FC_PIXEL_SIZE,  FcTypeDouble,  pixel_size,
+			    FC_SIZE,  FcTypeDouble,  pixel_size * (72. / 1024. / dpi),
+			    FC_PIXEL_SIZE,  FcTypeDouble,  pixel_size / 1024.,
 			    NULL);
 
   families = g_strsplit (pango_font_description_get_family (description), ",", -1);
@@ -934,7 +1038,8 @@
 
       if (pango_matrix)
 	{
-	  FcMatrix fc_matrix;
+	  FcMatrix fc_matrix, *fc_matrix_val;
+	  int i;
 
 	  /* Fontconfig has the Y axis pointing up, Pango, down.
 	   */
@@ -944,6 +1049,11 @@
 	  fc_matrix.yy = pango_matrix->yy;
 
 	  pattern = FcPatternDuplicate (match);
+
+	  for (i = 0; FcPatternGetMatrix (pattern, FC_MATRIX, i, &fc_matrix_val) == FcResultMatch; i++)
+	    FcMatrixMultiply (&fc_matrix, &fc_matrix, fc_matrix_val);
+
+	  FcPatternDel (pattern, FC_MATRIX);
 	  FcPatternAddMatrix (pattern, FC_MATRIX, &fc_matrix);
 	}
       else
@@ -1010,11 +1120,11 @@
 
 static void
 pango_fc_default_substitute (PangoFcFontMap    *fontmap,
-			     PangoFcFontKey    *fontkey,
+			     PangoFcFontsetKey *fontsetkey,
 			     FcPattern         *pattern)
 {
-  if (PANGO_FC_FONT_MAP_GET_CLASS (fontmap)->font_key_substitute)
-    PANGO_FC_FONT_MAP_GET_CLASS (fontmap)->font_key_substitute (fontmap, fontkey, pattern);
+  if (PANGO_FC_FONT_MAP_GET_CLASS (fontmap)->fontset_key_substitute)
+    PANGO_FC_FONT_MAP_GET_CLASS (fontmap)->fontset_key_substitute (fontmap, fontsetkey, pattern);
   else if (PANGO_FC_FONT_MAP_GET_CLASS (fontmap)->default_substitute)
     PANGO_FC_FONT_MAP_GET_CLASS (fontmap)->default_substitute (fontmap, pattern);
 }
@@ -1067,6 +1177,15 @@
   return .5 + pango_matrix_get_font_scale_factor (pango_context_get_matrix (context)) * size;
 }
 
+static FcPattern *
+pango_fc_fontset_key_make_pattern (PangoFcFontsetKey *key)
+{
+  return pango_fc_make_pattern (key->desc,
+				key->language,
+				key->pixelsize,
+				key->resolution);
+}
+
 static PangoFcPatternSet *
 pango_fc_font_map_get_patterns (PangoFontMap               *fontmap,
 				PangoContext               *context,
@@ -1080,13 +1199,15 @@
   int f;
   PangoFcPatternSet *patterns;
   FcFontSet *font_patterns;
-  FontsetHashKey key;
+  PangoFcFontsetKey key;
 
   if (!language && context)
     language = pango_context_get_language (context);
 
   key.fontmap = fcfontmap;
-  key.scaled_size = get_scaled_size (fcfontmap, context, desc);
+  get_context_matrix (context, &key.matrix);
+  key.pixelsize = get_scaled_size (fcfontmap, context, desc);
+  key.resolution = pango_fc_font_map_get_resolution (fcfontmap, context);
   key.language = language;
   key.desc = pango_font_description_copy_static (desc);
   pango_font_description_unset_fields (key.desc, PANGO_FONT_MASK_SIZE);
@@ -1100,14 +1221,9 @@
 
   if (patterns == NULL)
     {
-      PangoFcFontKey fontkey;
-
-      pattern = pango_fc_make_pattern (desc, language,
-				       key.scaled_size / 1024.,
-				       pango_fc_font_map_get_resolution (fcfontmap, context));
+      pattern = pango_fc_fontset_key_make_pattern (&key);
 
-      pango_fc_font_key_init (&fontkey, fcfontmap, context, pattern);
-      pango_fc_default_substitute (fcfontmap, &fontkey, pattern);
+      pango_fc_default_substitute (fcfontmap, &key, pattern);
 
       font_patterns = FcFontSort (NULL, pattern, FcTrue, NULL, &res);
 
@@ -1151,7 +1267,7 @@
 
       FcFontSetDestroy (font_patterns);
 
-      patterns->key = fontset_hash_key_copy (&key);
+      patterns->key = pango_fc_fontset_key_copy (&key);
       g_hash_table_insert (priv->fontset_hash,
 			   patterns->key,
 			   patterns);

Modified: trunk/pango/pangofc-fontmap.h
==============================================================================
--- trunk/pango/pangofc-fontmap.h	(original)
+++ trunk/pango/pangofc-fontmap.h	Wed Jan 28 22:08:10 2009
@@ -30,14 +30,31 @@
 G_BEGIN_DECLS
 
 /**
+ * PangoFcFontsetKey:
+ *
+ * An opaque structure containing all the information needed for
+ * loading a fontset with the PangoFc fontmap.
+ *
+ * Since: 1.24
+ **/
+typedef struct _PangoFcFontsetKey  PangoFcFontsetKey;
+
+const PangoLanguage        *pango_fc_fontset_key_get_language      (const PangoFcFontsetKey *key);
+const PangoFontDescription *pango_fc_fontset_key_get_description   (const PangoFcFontsetKey *key);
+const PangoMatrix          *pango_fc_fontset_key_get_matrix        (const PangoFcFontsetKey *key);
+double                      pango_fc_fontset_key_get_absolute_size (const PangoFcFontsetKey *key);
+double                      pango_fc_fontset_key_get_resolution    (const PangoFcFontsetKey *key);
+gpointer                    pango_fc_fontset_key_get_context_key   (const PangoFcFontsetKey *key);
+
+/**
  * PangoFcFontKey:
  *
  * An opaque structure containing all the information needed for
- * loading a font #PangoFcFont.
+ * loading a font with the PangoFc fontmap.
  *
  * Since: 1.24
  **/
-typedef struct _PangoFcFontKey        PangoFcFontKey;
+typedef struct _PangoFcFontKey     PangoFcFontKey;
 
 const FcPattern   *pango_fc_font_key_get_pattern     (const PangoFcFontKey *key);
 const PangoMatrix *pango_fc_font_key_get_matrix      (const PangoFcFontKey *key);
@@ -105,7 +122,7 @@
  *  @context_key_copy.
  * @context_key_hash: Gets a hash value for a context key
  * @context_key_equal: Compares two context keys for equality.
- * @font_key_substitute: Substitutes in default values for
+ * @fontset_key_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.
  *  (Since: 1.24)
@@ -126,7 +143,7 @@
   PangoFontMapClass parent_class;
 
   /*< public >*/
-  /* Deprecated in favor of font_key_substitute */
+  /* Deprecated in favor of fontset_key_substitute */
   void         (*default_substitute) (PangoFcFontMap   *fontmap,
 				      FcPattern        *pattern);
   /* Deprecated in favor of create_font */
@@ -148,8 +165,8 @@
 				      gconstpointer               key_a,
 				      gconstpointer               key_b);
 
-  void         (*font_key_substitute)(PangoFcFontMap             *fontmap,
-				      PangoFcFontKey             *fontkey,
+  void         (*fontset_key_substitute)(PangoFcFontMap             *fontmap,
+				      PangoFcFontsetKey          *fontsetkey,
 				      FcPattern                  *pattern);
   PangoFcFont  *(*create_font)       (PangoFcFontMap             *fontmap,
 				      PangoFcFontKey             *fontkey);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]