summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.c
diff options
context:
space:
mode:
authorNoah Levitt <nlevitt@columbia.edu>2004-02-29 20:31:45 +0000
committerNoah Levitt <nlevitt@src.gnome.org>2004-02-29 20:31:45 +0000
commitb1a7956a523e80a793461cc11d8d15c6b51b4dcc (patch)
treec6ae0547ec375c8e752ea3436ed2c701b7e69ddb /pango/pango-attributes.c
parent935375cc934cfa11dc08de4005b9d99c5c31d436 (diff)
downloadpango-b1a7956a523e80a793461cc11d8d15c6b51b4dcc.tar.gz
New attribute to turn font fallback on or off. (#105553)
2003-02-29 Noah Levitt <nlevitt@columbia.edu> * docs/pango_markup.sgml: * docs/tmpl/text-attributes.sgml: * pango/pango-attributes.c: * pango/pango-attributes.h: * pango/pango-context.c: * pango/pango-markup.c: New attribute to turn font fallback on or off. (#105553)
Diffstat (limited to 'pango/pango-attributes.c')
-rw-r--r--pango/pango-attributes.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index e2441ac9..57017cb8 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -643,6 +643,33 @@ pango_attr_scale_new (double scale_factor)
return pango_attr_float_new (&klass, scale_factor);
}
+/**
+ * pango_attr_fallback_new:
+ * @enable_fallback: %TRUE if we should fall back on other fonts
+ * for characters the active font is missing.
+ *
+ * Create a new font fallback attribute.
+ *
+ * If fallback is disabled, characters will only be used from the
+ * closest matching font on the system. No fallback will be done to
+ * other fonts on the system that might contain the characters in the
+ * text.
+ *
+ * Return value: the new #PangoAttribute.
+ **/
+PangoAttribute *
+pango_attr_fallback_new (gboolean enable_fallback)
+{
+ static const PangoAttrClass klass = {
+ PANGO_ATTR_FALLBACK,
+ pango_attr_int_copy,
+ pango_attr_int_destroy,
+ pango_attr_int_equal,
+ };
+
+ return pango_attr_int_new (&klass, (int)enable_fallback);
+}
+
static PangoAttribute *
pango_attr_shape_copy (const PangoAttribute *attr)
{