diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-02-17 00:45:24 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-03-11 13:17:36 -0500 |
commit | 3733c1634b0f9a531d2f26d337274fc608b68875 (patch) | |
tree | 0c65d4831f9fc1bd4a06a6e0b67945c561cb17f8 | |
parent | a927c729003daf8fddc61807a553b921b9e10945 (diff) | |
download | pango-3733c1634b0f9a531d2f26d337274fc608b68875.tar.gz |
docs: Convert rendering section to pango_rendering.md
-rw-r--r-- | docs/meson.build | 1 | ||||
-rw-r--r-- | docs/pango.toml.in | 3 | ||||
-rw-r--r-- | docs/pango_rendering.md | 35 | ||||
-rw-r--r-- | pango/pango-context.c | 12 |
4 files changed, 39 insertions, 12 deletions
diff --git a/docs/meson.build b/docs/meson.build index aa68b59b..bdea5e50 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -1,6 +1,7 @@ gidocgen = find_program('gi-docgen', required: get_option('gtk_doc')) pango_content_files = [ + 'pango_rendering.md', 'pango-name.png', 'layout.png', 'pipeline.png', diff --git a/docs/pango.toml.in b/docs/pango.toml.in index 986bfc8b..2a0dbcc0 100644 --- a/docs/pango.toml.in +++ b/docs/pango.toml.in @@ -54,6 +54,9 @@ name = "basic" base_url = "https://gitlab.gnome.org/GNOME/pango/-/blob/master/" [extra] +content_files = [ + "pango_rendering.md", +] content_images = [ "pango-name.png", diff --git a/docs/pango_rendering.md b/docs/pango_rendering.md new file mode 100644 index 00000000..2fd61e93 --- /dev/null +++ b/docs/pango_rendering.md @@ -0,0 +1,35 @@ +--- +Title: The Rendering Pipeline +--- + +# The Rendering Pipeline + +The Pango rendering pipeline takes a string of Unicode characters, converts them +it into glyphs, and renders them on some output medium. This section describes the +various stages of this pipeline and the APIs that implement them. + +![Pango Rendering Pipeline](pipeline.png) + +Itemization +: breaks a piece of text into segments with consistent direction and shaping + properies. Among other things, this determines which font to use for each + character. Use pango_itemize() or pango_itemize_with_base_dir() to itemize text. + +Shaping +: converts characters into glyphs. Use pango_shape(), pango_shape_full() or + pango_shape_with_flags() to shape text. + +Line Breaking +: determines where line breaks should be inserted into a sequence of glyphs. + The function pango_break() determines possible line breaks. The actual line + breaking is done by [class@Pango.Layout]. + +Justification +: adjusts inter-word spacing to form lines of even length. This is done by + [class@Pango.Layout]. + +Rendering +: takes a string of positioned glyphs, and renders them onto a surface. This is + accomplished by a [class@Pango.Renderer] object. The functions + pango_cairo_show_glyph_string() and pango_cairo_show_layout() use a + [class@Pango.Renderer] to draw text onto a cairo surface. diff --git a/pango/pango-context.c b/pango/pango-context.c index fbeb4894..47c6474b 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -19,18 +19,6 @@ * Boston, MA 02111-1307, USA. */ -/** - * SECTION:main - * @title:Rendering - * @short_description:Functions to run the rendering pipeline - * - * The Pango rendering pipeline takes a string of - * Unicode characters and converts it into glyphs. - * The functions described in this section accomplish - * various steps of this process. - * - * ![](pipeline.png) - */ #include "config.h" #include <string.h> #include <stdlib.h> |