diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-08 14:50:04 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-08 14:51:49 -0400 |
commit | 7bf8488061b9c4d744b2d01bd58da53c6f2d8c6a (patch) | |
tree | 31359a318aece9dc17487fbe3d232dd4c4ce7370 | |
parent | 2fc159927c7b36be2d59edd991ecbdb558705284 (diff) | |
download | pango-7bf8488061b9c4d744b2d01bd58da53c6f2d8c6a.tar.gz |
docs: More details
Add some visualizations of gravity.
-rw-r--r-- | docs/m-east.png | bin | 0 -> 8380 bytes | |||
-rw-r--r-- | docs/m-north.png | bin | 0 -> 8495 bytes | |||
-rw-r--r-- | docs/m-south.png | bin | 0 -> 8295 bytes | |||
-rw-r--r-- | docs/m-west.png | bin | 0 -> 7943 bytes | |||
-rw-r--r-- | docs/pango.toml.in | 5 | ||||
-rw-r--r-- | docs/pango_bidi.md | 3 | ||||
-rw-r--r-- | docs/vertical.png | bin | 0 -> 3467 bytes | |||
-rw-r--r-- | pango/pango-gravity.h | 8 |
8 files changed, 12 insertions, 4 deletions
diff --git a/docs/m-east.png b/docs/m-east.png Binary files differnew file mode 100644 index 00000000..1264c6f6 --- /dev/null +++ b/docs/m-east.png diff --git a/docs/m-north.png b/docs/m-north.png Binary files differnew file mode 100644 index 00000000..88dbb68c --- /dev/null +++ b/docs/m-north.png diff --git a/docs/m-south.png b/docs/m-south.png Binary files differnew file mode 100644 index 00000000..227c9dcb --- /dev/null +++ b/docs/m-south.png diff --git a/docs/m-west.png b/docs/m-west.png Binary files differnew file mode 100644 index 00000000..8ed4c84c --- /dev/null +++ b/docs/m-west.png 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 Binary files differnew file mode 100644 index 00000000..0fd8d29c --- /dev/null +++ b/docs/vertical.png 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 |