summaryrefslogtreecommitdiff
path: root/pango/pango-context.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-07-08 19:30:45 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-07-08 19:30:45 +0000
commit7fe9544383b46f8c68671d8b41ad3f55c76bb515 (patch)
tree2bcc7b0d289a11da069843f0bc13d7cc72d09aab /pango/pango-context.c
parent39833750298d6c102f05331f41fe6bd33c5ffb9a (diff)
downloadpango-7fe9544383b46f8c68671d8b41ad3f55c76bb515.tar.gz
Add pango_context_get_font_map()
Thu Jul 8 15:25:29 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-context.[ch]: Add pango_context_get_font_map() * pango/pango-fonts.c pango/pango-fontset.c pango/pango-context.c: Some s/PangoMetrics/PangoFontMetrics/ in docs. * pango/pango-context.c: Fix problem with unsetting the matrix for a context. * pango/pango-types.h: Switch to a much more efficient implementation of PANGO_SCALE.
Diffstat (limited to 'pango/pango-context.c')
-rw-r--r--pango/pango-context.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c
index 5f0ec379..7565103e 100644
--- a/pango/pango-context.c
+++ b/pango/pango-context.c
@@ -178,6 +178,8 @@ pango_context_set_matrix (PangoContext *context,
pango_matrix_free (context->matrix);
if (matrix)
context->matrix = pango_matrix_copy (matrix);
+ else
+ context->matrix = NULL;
}
/**
@@ -226,6 +228,23 @@ pango_context_set_font_map (PangoContext *context,
}
/**
+ * pango_context_get_font_map:
+ * @context: a #PangoContext
+ *
+ * Gets the #PangoFontmap used to look up fonts for this context.
+ *
+ * Return value: the font map for the #PangoContext. This value
+ * is owned by Pango and should not be unreferenced.
+ **/
+PangoFontMap *
+pango_context_get_font_map (PangoContext *context)
+{
+ g_return_val_if_fail (PANGO_IS_CONTEXT (context), NULL);
+
+ return context->font_map;
+}
+
+/**
* pango_context_list_families:
* @context: a #PangoContext
* @families: location to store a pointer to an array of PangoFontFamily *.
@@ -1231,7 +1250,7 @@ pango_itemize (PangoContext *context,
* be a composite of the metrics for the fonts loaded for the
* individual families.
*
- * Returns: a #PangoMetrics object. The caller must call pango_font_metrics_unref()
+ * Returns: a #PangoFontMetrics object. The caller must call pango_font_metrics_unref()
* when finished using the object.
**/
PangoFontMetrics *