summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-09-01 15:07:19 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-09-01 15:07:19 +0000
commit6b7d85480653f83c5f5605bf99582d04d721fbb5 (patch)
treee8371e41e500a45949ce4c78850b49bd4e2cc407 /pango/pango-attributes.c
parentc1009a25f561f94bb71f78fe9353ed6c4238e3a7 (diff)
parenta6ffe09f3dacab145abdf4da8025b6040fb69bb0 (diff)
downloadpango-6b7d85480653f83c5f5605bf99582d04d721fbb5.tar.gz
Merge branch 'matthiasc/for-main' into 'main'
Add docs for new attributes See merge request GNOME/pango!467
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 65af8f3b..a87c661e 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -931,9 +931,19 @@ pango_attr_rise_new (int rise)
*
* Create a new baseline displacement attribute.
*
+ * The effect of this attribute is to shift the baseline of a run,
+ * relative to the run of preceding run.
+ *
+ * <picture>
+ * <source srcset="baseline-shift-dark.png" media="(prefers-color-scheme: dark)">
+ * <img alt="Baseline Shift" src="baseline-shift-light.png">
+ * </picture>
+
* Return value: (transfer full): the newly allocated
* `PangoAttribute`, which should be freed with
* [method@Pango.Attribute.destroy]
+ *
+ * Since: 1.50
*/
PangoAttribute *
pango_attr_baseline_shift_new (int rise)
@@ -948,6 +958,23 @@ pango_attr_baseline_shift_new (int rise)
return pango_attr_int_new (&klass, (int)rise);
}
+/**
+ * pango_attr_font_scale_new:
+ * @scale: a `PangoFontScale` value, which indicates font size change relative
+ * to the size of the previous run.
+ *
+ *
+ * Create a new font scale attribute.
+ *
+ * The effect of this attribute is to change the font size of a run,
+ * relative to the size of preceding run.
+ *
+ * Return value: (transfer full): the newly allocated
+ * `PangoAttribute`, which should be freed with
+ * [method@Pango.Attribute.destroy]
+ *
+ * Since: 1.50
+ */
PangoAttribute *
pango_attr_font_scale_new (PangoFontScale scale)
{