summaryrefslogtreecommitdiff
path: root/pango/glyphstring.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-26 11:26:25 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-26 11:26:25 -0400
commitcf6b3e1e84fe35f9b4f15f02a3a28e6f15312b96 (patch)
treedb689868eaf5ab534f24cfafce8bb1a985e6e821 /pango/glyphstring.c
parent08b30abe550890b2ec5228959f8c88a51891cf10 (diff)
downloadpango-cf6b3e1e84fe35f9b4f15f02a3a28e6f15312b96.tar.gz
doc: Update pango_glyph_string_index_to_x
What the docs were saying is no longer strictly true, now that we are using font metrics. Update them, and add an illustration.
Diffstat (limited to 'pango/glyphstring.c')
-rw-r--r--pango/glyphstring.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/pango/glyphstring.c b/pango/glyphstring.c
index eb65875b..8d4aa604 100644
--- a/pango/glyphstring.c
+++ b/pango/glyphstring.c
@@ -370,8 +370,15 @@ pango_glyph_string_get_logical_widths (PangoGlyphString *glyphs,
* Converts from character position to x position.
*
* The X position is measured from the left edge of the run.
- * Character positions are computed by dividing up each cluster
- * into equal portions.
+ * Character positions are obtained using font metrics for ligatures
+ * where available, and computed by dividing up each cluster
+ * into equal portions, otherwise.
+ *
+ * <picture>
+ * <source srcset="glyphstring-positions-dark.png" media="(prefers-color-scheme: dark)">
+ * <img alt="Glyph positions" src="glyphstring-positions-light.png">
+ * </picture>
+
*/
void
pango_glyph_string_index_to_x (PangoGlyphString *glyphs,