[pango/matthiasc/for-main: 13/13] docs: Add another illustration




commit c98409c7715124bd8eb5f738e8954cb21766b8f2
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Aug 26 10:56:37 2021 -0400

    docs: Add another illustration
    
    Show cursor positions.

 docs/cursor-positions-dark.png  | Bin 0 -> 17922 bytes
 docs/cursor-positions-light.png | Bin 0 -> 13075 bytes
 docs/cursor-positions.svg       | 128 ++++++++++++++++++++++++++++++++++++++++
 docs/meson.build                |   2 +
 docs/pango.toml.in              |   2 +
 pango/pango-layout.c            |   7 ++-
 6 files changed, 138 insertions(+), 1 deletion(-)
---
diff --git a/docs/cursor-positions-dark.png b/docs/cursor-positions-dark.png
new file mode 100644
index 00000000..55c28c90
Binary files /dev/null and b/docs/cursor-positions-dark.png differ
diff --git a/docs/cursor-positions-light.png b/docs/cursor-positions-light.png
new file mode 100644
index 00000000..6dfeb615
Binary files /dev/null and b/docs/cursor-positions-light.png differ
diff --git a/docs/cursor-positions.svg b/docs/cursor-positions.svg
new file mode 100644
index 00000000..29d8ebfe
--- /dev/null
+++ b/docs/cursor-positions.svg
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   width="157.43533"
+   height="125.20525"
+   viewBox="0 0 41.654763 33.127223"
+   version="1.1"
+   id="svg108440"
+   inkscape:version="1.1 (c68e22c387, 2021-05-23)"
+   sodipodi:docname="cursor-positions.svg"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:svg="http://www.w3.org/2000/svg";>
+  <sodipodi:namedview
+     id="namedview108442"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:document-units="mm"
+     showgrid="false"
+     fit-margin-top="20"
+     fit-margin-left="20"
+     fit-margin-right="20"
+     fit-margin-bottom="20"
+     units="px"
+     inkscape:zoom="2.7652076"
+     inkscape:cx="78.655938"
+     inkscape:cy="92.578943"
+     inkscape:window-width="1920"
+     inkscape:window-height="1011"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="layer1" />
+  <defs
+     id="defs108437">
+    <inkscape:path-effect
+       effect="spiro"
+       id="path-effect107880"
+       is_visible="true"
+       lpeversion="1" />
+  </defs>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-84.232541,-131.93639)">
+    <path
+       
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 116.95272,137.25576 -4.81554,22.48849"
+       id="path20191-7-4-2-7"
+       sodipodi:nodetypes="cc"
+       inkscape:original-d="m 116.95272,137.25576 c -1.62784,6.52652 -3.18717,15.9625 -4.81554,22.48849"
+       inkscape:path-effect="#path-effect107880" />
+    <rect
+       
style="vector-effect:non-scaling-stroke;fill:none;fill-opacity:0.374651;stroke:#000000;stroke-width:0.00070229;stroke-linejoin:round;-inkscape-stroke:hairline"
+       id="rect26849-7-6-3-0"
+       width="19.828447"
+       height="15.754494"
+       x="99.418243"
+       y="139.43288" />
+    <rect
+       
style="vector-effect:non-scaling-stroke;fill:none;fill-opacity:0.374651;stroke:#000000;stroke-width:0.000704165;stroke-linejoin:round;-inkscape-stroke:hairline"
+       id="rect26849-7-6-0-2-4"
+       width="9.6999998"
+       height="15.754"
+       x="89.718689"
+       y="139.4332" />
+    <g
+       aria-label="w"
+       transform="matrix(0.26458333,0,0,0.26458333,102.08224,89.7287)"
+       id="text4642-7-1-8"
+       style="font-size:85.3333px;line-height:1.25;font-family:'Source Serif 4 
Display';-inkscape-font-specification:'Source Serif 4 Display, 
Normal';letter-spacing:0px;word-spacing:0px;white-space:pre;shape-inside:url(#rect4644)">
+      <path
+         d="m 1.2424688,246.68612 0.3413332,0.34133 2.1333324,-0.34133 c 7.3386636,-8.448 
14.0799946,-20.90666 17.2373266,-28.92799 0.341333,8.10666 0.767999,18.43199 1.194666,28.92799 l 
0.341333,0.34133 2.047999,-0.34133 c 8.191997,-8.448 15.01866,-18.00533 18.090659,-25.25866 1.024,-2.38933 
3.754665,-7.08266 3.754665,-11.09333 0,-0.85333 -0.170666,-1.536 -0.341333,-2.21866 -0.597333,-0.59734 
-1.450666,-1.024 -2.645332,-1.024 -1.791999,0 -3.327999,1.024 -3.327999,4.43733 0,1.28 0.08533,3.072 
1.024,6.99733 l 0.256,1.10933 c -0.170667,0.42667 -0.341333,0.768 -0.512,1.19467 -3.071999,7.168 
-8.27733,14.07999 -13.567994,20.39466 -0.426667,-11.008 -0.853333,-22.01599 -1.365333,-33.10932 H 22.74646 c 
-4.437332,12.11733 -10.410662,23.80799 -16.5546599,32.85332 -0.085333,-9.472 -0.6826664,-20.13866 
-1.706666,-27.30666 -0.6826664,-4.608 -2.0479991,-6.57066 -5.37599775,-6.57066 -3.92533165,0 
-6.31466405,3.41333 -9.04532955,9.89866 l 1.0239996,0.768 c 3.0719987,-4.94933 4.4373314,-6.31466 5.88
 79975,-6.31466 1.1093329,0 1.8773326,0.85333 2.38933235,4.52266 1.10933287,8.61866 1.62133265,17.83466 
1.87733255,30.71999 z"
+         id="path32016-5-5-0" />
+    </g>
+    <g
+       aria-label="i"
+       id="text23394-6-9-4"
+       style="font-size:22.5778px;line-height:1.25;font-family:'Source Serif 4 
Display';-inkscape-font-specification:'Source Serif 4 Display, 
Normal';letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
+       transform="translate(70.522174,4.18534)">
+      <path
+         d="m 44.502481,150.0899 c 0,0.67734 0.587023,0.99343 1.12889,0.99343 1.399824,0 3.360056,-0.89409 
4.059967,-2.04556 l 0.382126,-0.45413 c -0.790223,0.90312 -3.268047,1.34822 -3.697025,1.34822 -0.2032,0 
-0.406401,-0.15805 -0.406401,-0.42898 0,-0.22578 0.09031,-0.63218 0.180623,-1.10631 l 1.648179,-7.87965 
-0.2032,-0.18063 -4.247235,1.53975 0.504014,0.24314 2.275639,-0.20244 -1.444979,6.79592 c -0.158045,0.79022 
-0.180623,1.10631 -0.180623,1.37724 z m 3.138315,-12.21459 c 0.677334,0 1.309512,-0.58702 1.309512,-1.39982 
0,-0.58702 -0.383823,-0.99342 -0.970845,-0.99342 -0.677334,0 -1.286935,0.63217 -1.286935,1.44498 0,0.56444 
0.4064,0.94826 0.948268,0.94826 z"
+         id="path32019-9-9-2"
+         sodipodi:nodetypes="ssccsscccccccsssssss" />
+    </g>
+    <circle
+       
style="vector-effect:non-scaling-stroke;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.000763294;stroke-linejoin:round;-inkscape-stroke:hairline"
+       id="path35788-2-1-9"
+       cx="99.418243"
+       cy="155.12804"
+       r="0.25" />
+    <circle
+       
style="vector-effect:non-scaling-stroke;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.000763296;stroke-linejoin:round;-inkscape-stroke:hairline"
+       id="path35788-4-82-4-6"
+       cx="114.6311"
+       cy="155.12804"
+       r="0.25" />
+    <circle
+       
style="vector-effect:non-scaling-stroke;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.000763296;stroke-linejoin:round;-inkscape-stroke:hairline"
+       id="path35788-4-8-9-9-1"
+       cx="119.30667"
+       cy="155.12804"
+       r="0.25" />
+    <circle
+       
style="vector-effect:non-scaling-stroke;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.000763296;stroke-linejoin:round;-inkscape-stroke:hairline"
+       id="path35788-4-8-1-9-1-0"
+       cx="89.774208"
+       cy="155.12804"
+       r="0.25" />
+    <text
+       xml:space="preserve"
+       
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:22.5778px;line-height:1.25;font-family:'Source
 Serif 4 Display';-inkscape-font-specification:'Source Serif 4 Display, 
Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
+       x="89.688126"
+       y="154.92982"
+       id="text84375-0-4"><tspan
+         sodipodi:role="line"
+         id="tspan86335-7-2"
+         x="89.688126"
+         y="154.92982">o</tspan></text>
+  </g>
+</svg>
diff --git a/docs/meson.build b/docs/meson.build
index c64f0620..8ef1a0fb 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -38,6 +38,8 @@ pango_content_files = [
   'fontmetrics-dark.png',
   'caret-metrics-light.png',
   'caret-metrics-dark.png',
+  'cursor-positions-light.png',
+  'cursor-positions-dark.png',
 ]
 
 doc_conf = configuration_data()
diff --git a/docs/pango.toml.in b/docs/pango.toml.in
index 7c722a2b..1bcdd4a7 100644
--- a/docs/pango.toml.in
+++ b/docs/pango.toml.in
@@ -96,4 +96,6 @@ content_images = [
   "fontmetrics-dark.png",
   "caret-metrics-light.png",
   "caret-metrics-dark.png",
+  "cursor-positions-light.png",
+  "cursor-positions-dark.png",
 ]
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 6b14a5dd..f88581f1 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -2541,6 +2541,11 @@ pango_layout_get_direction (PangoLayout *layout,
  * The position of each cursor is stored as a zero-width rectangle
  * with the height of the run extents.
  *
+ * <picture>
+ *   <source srcset="cursor-positions-dark.png" media="(prefers-color-scheme: dark)">
+ *   <img alt="Cursor positions" src="cursor-positions-light.png">
+ * </picture>
+ *
  * 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
@@ -2550,7 +2555,7 @@ pango_layout_get_direction (PangoLayout *layout,
  *
  * <picture>
  *   <source srcset="split-cursor-dark.png" media="(prefers-color-scheme: dark)">
- *   <img alt="strong and weak cursors" src="split-cursor-light.png">
+ *   <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


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