[pango/layout-docs: 2/2] docs: More details




commit 7bf8488061b9c4d744b2d01bd58da53c6f2d8c6a
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Aug 8 14:50:04 2021 -0400

    docs: More details
    
    Add some visualizations of gravity.

 docs/m-east.png       | Bin 0 -> 8380 bytes
 docs/m-north.png      | Bin 0 -> 8495 bytes
 docs/m-south.png      | Bin 0 -> 8295 bytes
 docs/m-west.png       | Bin 0 -> 7943 bytes
 docs/pango.toml.in    |   5 +++++
 docs/pango_bidi.md    |   3 +++
 docs/vertical.png     | Bin 0 -> 3467 bytes
 pango/pango-gravity.h |   8 ++++----
 8 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/docs/m-east.png b/docs/m-east.png
new file mode 100644
index 00000000..1264c6f6
Binary files /dev/null and b/docs/m-east.png differ
diff --git a/docs/m-north.png b/docs/m-north.png
new file mode 100644
index 00000000..88dbb68c
Binary files /dev/null and b/docs/m-north.png differ
diff --git a/docs/m-south.png b/docs/m-south.png
new file mode 100644
index 00000000..227c9dcb
Binary files /dev/null and b/docs/m-south.png differ
diff --git a/docs/m-west.png b/docs/m-west.png
new file mode 100644
index 00000000..8ed4c84c
Binary files /dev/null and b/docs/m-west.png differ
diff --git a/docs/pango.toml.in b/docs/pango.toml.in
index 0b1cef06..6a52cf32 100644
--- a/docs/pango.toml.in
+++ b/docs/pango.toml.in
@@ -78,4 +78,9 @@ content_images = [
   "align-left-justify.png",
   "align-center-justify.png",
   "align-right-justify.png",
+  "vertical.png",
+  "m-south.png",
+  "m-west.png",
+  "m-north.png",
+  "m-east.png",
 ]
diff --git a/docs/pango_bidi.md b/docs/pango_bidi.md
index 0e8612d1..1f77c1e0 100644
--- a/docs/pango_bidi.md
+++ b/docs/pango_bidi.md
@@ -29,6 +29,9 @@ in place. This has the huge advantage that most algorithms working on a
 in the X direction and stack in the Y direction holds even for vertical text
 layouts.
 
+Here is an example for some English text rendered with gravity west, rotated
+90 degrees: ![vertical english](vertical.png)
+
 Applications should only need to set base gravity on [class@Pango.Context] in use,
 and let Pango decide the gravity assigned to each run of text. This automatically
 handles text with mixed scripts. A very common use is to set the context base
diff --git a/docs/vertical.png b/docs/vertical.png
new file mode 100644
index 00000000..0fd8d29c
Binary files /dev/null and b/docs/vertical.png differ
diff --git a/pango/pango-gravity.h b/pango/pango-gravity.h
index 178b018f..96875047 100644
--- a/pango/pango-gravity.h
+++ b/pango/pango-gravity.h
@@ -28,10 +28,10 @@ G_BEGIN_DECLS
 
 /**
  * PangoGravity:
- * @PANGO_GRAVITY_SOUTH: Glyphs stand upright (default)
- * @PANGO_GRAVITY_EAST: Glyphs are rotated 90 degrees clockwise
- * @PANGO_GRAVITY_NORTH: Glyphs are upside-down
- * @PANGO_GRAVITY_WEST: Glyphs are rotated 90 degrees counter-clockwise
+ * @PANGO_GRAVITY_SOUTH: Glyphs stand upright (default) <img align="right" valign="center" src="m-south.png">
+ * @PANGO_GRAVITY_EAST: Glyphs are rotated 90 degrees clockwise. <img align="right" valign="center" 
src="m-east.png">
+ * @PANGO_GRAVITY_NORTH: Glyphs are upside-down. <img align="right" valign="cener" src="m-north.png">
+ * @PANGO_GRAVITY_WEST: Glyphs are rotated 90 degrees counter-clockwise. <img align="right" valign="center" 
src="m-west.png">
  * @PANGO_GRAVITY_AUTO: Gravity is resolved from the context matrix
  *
  * `PangoGravity` represents the orientation of glyphs in a segment


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