summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-10-29 08:05:07 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-10-29 08:05:07 -0400
commit46fc53896c67eaca25da0876ea7ee8160410fdd8 (patch)
tree5d7da21240e252d98571d1e292c58b4ebdaedc36 /pango
parentc09f70381d473fa4ac9e622ef42cc0479a095dc1 (diff)
downloadpango-46fc53896c67eaca25da0876ea7ee8160410fdd8.tar.gz
Flesh out some doc comments
Add some missing details about new enumerations and run baselines.
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-attributes.h9
-rw-r--r--pango/pango-layout.c10
2 files changed, 16 insertions, 3 deletions
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index 982987f8..51b9b077 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -232,6 +232,7 @@ typedef enum {
/**
* PangoBaselineShift:
+ * @PANGO_BASELINE_SHIFT_NONE: Leave the baseline unchanged
* @PANGO_BASELINE_SHIFT_SUPERSCRIPT: Shift the baseline to the superscript position,
* relative to the previous run
* @PANGO_BASELINE_SHIFT_SUBSCRIPT: Shift the baseline to the subscript position,
@@ -249,8 +250,12 @@ typedef enum {
/**
* PangoFontScale:
- * @PANGO_FONT_SCALE_SUPERSCRIPT:
- * @PANGO_FONT_SCALE_SUBSCRIPT:
+ * @PANGO_FONT_SCALE_NONE: Leave the font size unchanged
+ * @PANGO_FONT_SCALE_SUPERSCRIPT: Change the font to a size suitable for superscripts
+ * @PANGO_FONT_SCALE_SUBSCRIPT: Change the font to a size suitable for subscripts
+ *
+ * An enumeration that affects font sizes for superscript
+ * and subscript positioning.
*
* Since: 1.50
*/
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index f91b91d3..ba81adf6 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -7510,9 +7510,17 @@ pango_layout_iter_get_baseline (PangoLayoutIter *iter)
}
/**
- * pango_layout_iter_get_run_baseline
+ * pango_layout_iter_get_run_baseline:
* @iter: a `PangoLayoutIter`
*
+ * Gets the Y position of the current run's baseline, in layout
+ * coordinates.
+ *
+ * Layout coordinates have the origin at the top left of the entire layout.
+ *
+ * The run baseline can be different from the line baseline, for
+ * example due to superscript or subscript positioning.
+ *
* Since: 1.50
*/
int