summaryrefslogtreecommitdiff
path: root/src/cairo-scaled-font-subsets-private.h
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2008-12-03 23:56:01 +1030
committerAdrian Johnson <ajohnson@redneon.com>2009-01-22 23:12:14 +1100
commit2ed08f7801a2af27e35afcf57f00f4bf5d48384a (patch)
tree31baaac92c80c65c28aa356f9084f1fc30e7f55f /src/cairo-scaled-font-subsets-private.h
parent1deb1e451022b9dd5aa6ecb0b580b006047b630e (diff)
downloadcairo-2ed08f7801a2af27e35afcf57f00f4bf5d48384a.tar.gz
Factor out duplicate code in truetype and cff subsetting
The code for reading the font name from the name table has been moved to a new function: _cairo_truetype_read_font_name().
Diffstat (limited to 'src/cairo-scaled-font-subsets-private.h')
-rw-r--r--src/cairo-scaled-font-subsets-private.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/cairo-scaled-font-subsets-private.h b/src/cairo-scaled-font-subsets-private.h
index 88dedb59b..a78b82bc3 100644
--- a/src/cairo-scaled-font-subsets-private.h
+++ b/src/cairo-scaled-font-subsets-private.h
@@ -635,6 +635,24 @@ _cairo_truetype_index_to_ucs4 (cairo_scaled_font_t *scaled_font,
unsigned long index,
uint32_t *ucs4);
+/**
+ * _cairo_truetype_read_font_name:
+ * @scaled_font: the #cairo_scaled_font_t
+ * @font_name: returns the font name or NULL if the name could not be found.
+ *
+ * If possible (depending on the format of the underlying
+ * #cairo_scaled_font_t and the font backend in use) read the
+ * font name from a TrueType/OpenType font.
+ *
+ * Return value: %CAIRO_STATUS_SUCCESS if successful,
+ * %CAIRO_INT_STATUS_UNSUPPORTED if the font is not TrueType/OpenType
+ * or the name table is not present. Possible errors include
+ * %CAIRO_STATUS_NO_MEMORY.
+ **/
+cairo_private cairo_int_status_t
+_cairo_truetype_read_font_name (cairo_scaled_font_t *scaled_font,
+ char **font_name);
+
#endif /* CAIRO_HAS_FONT_SUBSET */
#endif /* CAIRO_SCALED_FONT_SUBSETS_PRIVATE_H */