summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--docs/layout-dark.pngbin0 -> 26365 bytes
-rw-r--r--docs/layout-light.pngbin0 -> 24670 bytes
-rw-r--r--docs/meson.build6
-rw-r--r--docs/pango.toml.in5
-rw-r--r--docs/split-cursor-dark.pngbin0 -> 10603 bytes
-rw-r--r--docs/split-cursor-light.pngbin0 -> 10248 bytes
-rw-r--r--docs/split-cursor.pngbin0 -> 10944 bytes
-rw-r--r--pango/pango-layout.c26
9 files changed, 32 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index c6d781f4..1f52b5d2 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ Overview of changes
* markup: Allow specifying size and rise in points (#67)
* markup: Allow specifying size as percentage (#23)
* Rewrite pango_layout_move_cursor_visually (#157, #585, #587)
+* Add a line-height attribute and make logical
+ line extents respect it
Overview of changes in 1.48.7
=============================
diff --git a/docs/layout-dark.png b/docs/layout-dark.png
new file mode 100644
index 00000000..279b7eaf
--- /dev/null
+++ b/docs/layout-dark.png
Binary files differ
diff --git a/docs/layout-light.png b/docs/layout-light.png
new file mode 100644
index 00000000..0a0d4e2a
--- /dev/null
+++ b/docs/layout-light.png
Binary files differ
diff --git a/docs/meson.build b/docs/meson.build
index 21230ddd..6bdfc1f7 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -6,7 +6,8 @@ pango_content_files = [
'pango_fonts.md',
'pango_bidi.md',
'pango-name.png',
- 'layout.png',
+ 'layout-light.png',
+ 'layout-dark.png',
'pipeline-light.png',
'pipeline-dark.png',
'rects1.png',
@@ -30,6 +31,9 @@ pango_content_files = [
'bidi-input-dark.png',
'bidi-annotate-light.png',
'bidi-annotate-dark.png',
+ 'split-cursor.png',
+ 'split-cursor-light.png',
+ 'split-cursor-dark.png'
]
doc_conf = configuration_data()
diff --git a/docs/pango.toml.in b/docs/pango.toml.in
index 95143360..f5e58194 100644
--- a/docs/pango.toml.in
+++ b/docs/pango.toml.in
@@ -66,7 +66,8 @@ content_files = [
content_images = [
"pango-name.png",
- "layout.png",
+ "layout-light.png",
+ "layout-dark.png",
"pipeline-light.png",
"pipeline-dark.png",
"rects1.png",
@@ -89,4 +90,6 @@ content_images = [
"bidi-input-dark.png",
"bidi-annotate-light.png",
"bidi-annotate-dark.png",
+ "split-cursor-light.png",
+ "split-cursor-dark.png",
]
diff --git a/docs/split-cursor-dark.png b/docs/split-cursor-dark.png
new file mode 100644
index 00000000..141d818c
--- /dev/null
+++ b/docs/split-cursor-dark.png
Binary files differ
diff --git a/docs/split-cursor-light.png b/docs/split-cursor-light.png
new file mode 100644
index 00000000..2ace0c18
--- /dev/null
+++ b/docs/split-cursor-light.png
Binary files differ
diff --git a/docs/split-cursor.png b/docs/split-cursor.png
new file mode 100644
index 00000000..b2be8021
--- /dev/null
+++ b/docs/split-cursor.png
Binary files differ
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 2a3cb5a2..fa13ad59 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -43,7 +43,10 @@
* `PangoLayout`. The following image shows adjustable parameters
* (on the left) and font metrics (on the right):
*
- * ![Pango Layout Parameters](layout.png)
+ * <picture>
+ * <source srcset="layout-dark.png" media="(prefers-color-scheme: dark)">
+ * <img alt="Pango Layout Parameters" src="layout-light.png">
+ * </picture>
*
* The following images demonstrate the effect of alignment and
* justification on the layout of text:
@@ -1998,9 +2001,8 @@ pango_layout_line_get_cursors (PangoLayoutLine *line,
* of a run.
*
* Motion here is in cursor positions, not in characters, so a single
- * call to [method@Pango.Layout.move_cursor_visually] may move the cursor
- * over multiple characters when multiple characters combine to form a
- * single grapheme.
+ * call to this function may move the cursor over multiple characters
+ * when multiple characters combine to form a single grapheme.
*/
void
pango_layout_move_cursor_visually (PangoLayout *layout,
@@ -2429,11 +2431,25 @@ pango_layout_get_direction (PangoLayout *layout,
* Given an index within a layout, determines the positions that of the
* strong and weak cursors if the insertion point is at that index.
*
- * The position of each cursor is stored as a zero-width rectangle.
+ * The position of each cursor is stored as a zero-width rectangle
+ * with the height of the run extents.
+ *
* The strong cursor location is the location where characters of the
* directionality equal to the base direction of the layout are inserted.
* The weak cursor location is the location where characters of the
* directionality opposite to the base direction of the layout are inserted.
+ *
+ * The following example shows text with both a strong and a weak cursor.
+ *
+ * <picture>
+ * <source srcset="split-cursor-dark.png" media="(prefers-color-scheme: dark)">
+ * <img alt="strong and weak cursors" src="split-cursor-light.png">
+ * </picture>
+ *
+ * The strong cursor has a little arrow pointing to the right, the weak
+ * cursor to the left. Typing a 'c' in this situation will insert the
+ * character after the 'b', and typing another Hebrew character, like 'ג',
+ * will insert it at the end.
*/
void
pango_layout_get_cursor_pos (PangoLayout *layout,