diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-08 15:52:38 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-08 15:52:38 -0400 |
commit | cb27301a0ed591de6fe2121b0451e8f8e1226576 (patch) | |
tree | 11aad4138b9636ad147c659f714d0255f283ca6d /docs/pango_bidi.md | |
parent | f412687ca16bb8eeb09a94b6416959914fb3c035 (diff) | |
download | pango-cb27301a0ed591de6fe2121b0451e8f8e1226576.tar.gz |
docs: Improve image placement
Move the vertical text example up, in the bidi docs.
Diffstat (limited to 'docs/pango_bidi.md')
-rw-r--r-- | docs/pango_bidi.md | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/docs/pango_bidi.md b/docs/pango_bidi.md index 1f77c1e0..dcb5ddf1 100644 --- a/docs/pango_bidi.md +++ b/docs/pango_bidi.md @@ -20,17 +20,16 @@ Pango is not only capable of vertical text layout, it can handle mixed vertical and non-vertical text correctly. This section describes the types used for setting vertical text parameters. -The way this is implemented is through the concept of *gravity*. Gravity of -normal Latin text is south. A gravity value of east means that glyphs will be -rotated ninety degrees counterclockwise. So, to render vertical text one needs + <img alt="gravity west, rotated 90 degrees" align="right" valign="top" src="vertical.png"> +The way this is implemented is through the concept of *gravity*. Gravity tells glyphs which way is down, so the gravity of normal Latin text is south. A gravity value of east means that glyphs will be rotated ninety degrees +counterclockwise. So, to render vertical text one needs to set the gravity and rotate the layout using the matrix machinery already in place. This has the huge advantage that most algorithms working on a [class@Pango.Layout] do not need any change as the assumption that lines run 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) +Here is an example for some English text rendered with gravity west, rotated 90 degrees: 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 |