[pango/line-height-attribute] Add more details to docs



commit ed1fe1b08396edec23103b0f2ce9bc319c849301
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Aug 7 23:29:00 2021 -0400

    Add more details to docs
    
    Mention which extents are affected by line-height.

 pango/pango-attributes.c | 15 +++++++++++++--
 pango/pango-layout.c     |  5 ++++-
 2 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 4ecc039a..fdb37f56 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -1345,7 +1345,13 @@ pango_attr_overline_color_new (guint16 red,
  * pango_attr_line_height_new:
  * @factor: the scaling factor to apply to the logical height
  *
- * Modify the height of logical extents by a factor.
+ * Modify the height of logical line extents by a factor.
+ *
+ * This affects the values returned by
+ * [method@Pango.LayoutLine.get_extents],
+ * [method@Pango.LayoutLine.get_pixel_extents] and
+ * [method@Pango.LayoutIter.get_line_extents].
+ *
  *
  * Since: 1.50
  */
@@ -1366,7 +1372,12 @@ pango_attr_line_height_new (double factor)
  * pango_attr_line_height_new_absolute:
  * @height: the line height, in %PANGO_SCALE-ths of a point
  *
- * Override the height of logical extents to be @height.
+ * Override the height of logical line extents to be @height.
+ *
+ * This affects the values returned by
+ * [method@Pango.LayoutLine.get_extents],
+ * [method@Pango.LayoutLine.get_pixel_extents] and
+ * [method@Pango.LayoutIter.get_line_extents].
  *
  * Since: 1.50
  */
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 8b3a2f2a..95ad4c50 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -585,9 +585,12 @@ pango_layout_get_indent (PangoLayout *layout)
  * The default value is 0.
  *
  * Note: Since 1.44, Pango is using the line height (as determined
- * by the font) for placing lines when the line height factor is set
+ * by the font) for placing lines when the line spacing factor is set
  * to a non-zero value with [method@Pango.Layout.set_line_spacing].
  * In that case, the @spacing set with this function is ignored.
+ *
+ * Note: for semantics that are closer to the CSS line-height
+ * property, see [func@Pango.attr_line_height_new].
  */
 void
 pango_layout_set_spacing (PangoLayout *layout,


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