diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-03-10 16:57:19 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-03-10 16:57:19 +0000 |
commit | df19b2f5a156b717186f8cbc6b1ad39d2401ab90 (patch) | |
tree | adcbef84798b47a7aad12a55221989cbd8ec5dc0 /docs | |
parent | c01dbb8d33281a5cdea16525904ff28ca61620fd (diff) | |
download | pango-df19b2f5a156b717186f8cbc6b1ad39d2401ab90.tar.gz |
Release pango-0.8
Thu Mar 9 19:55:21 2000 Owen Taylor <otaylor@redhat.com>
* Release pango-0.8
* docs/TEXT/coding-style: Added some notes about coding style
within Pango.
* modules/*.[ch]: New version from Karl Koehler adding support
for vowels marks, better ligatures.
* docs/tmpl/*: Doc updates
* libpango/pango-layout.[ch] libpango/pangox/.[ch]: Add functions
for handling paragraphs as 2-D objects, not simple lists of lines,
to make things easier for people using pango-layout.
* examples/viewer.c: Simplify using the now 2-D layout-capabable
PangoLayout.
* libpango/fonts.c (pango_font_{get_coverage,find_shaper}): Allow
NULL language tag.
* libpango/modules.c (_pango_find_map): Fix for allowing
NULL language tag.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/Makefile.am | 3 | ||||
-rw-r--r-- | docs/TEXT/coding-style | 115 | ||||
-rw-r--r-- | docs/layout.eps | 231 | ||||
-rw-r--r-- | docs/layout.fig | 75 | ||||
-rw-r--r-- | docs/layout.gif | bin | 0 -> 5572 bytes | |||
-rw-r--r-- | docs/pango-sections.txt | 33 | ||||
-rw-r--r-- | docs/tmpl/glyphs.sgml | 40 | ||||
-rw-r--r-- | docs/tmpl/layout.sgml | 193 | ||||
-rw-r--r-- | docs/tmpl/main.sgml | 28 | ||||
-rw-r--r-- | docs/tmpl/pango-unused.sgml | 85 | ||||
-rw-r--r-- | docs/tmpl/x-rendering.sgml | 38 |
11 files changed, 743 insertions, 98 deletions
diff --git a/docs/Makefile.am b/docs/Makefile.am index 255916d5..8144ba54 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -23,6 +23,7 @@ sgml: html: if ! test -d html ; then mkdir html ; fi -cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + cp layout.gif html clean-local: rm -f *~ *.bak *.hierarchy *.signals *.args *-unused.txt @@ -34,7 +35,7 @@ maintainer-clean-local: clean endif -EXTRA_DIST=pango-sections.txt pango-docs.sgml +EXTRA_DIST=pango-sections.txt pango-docs.sgml layout.fig layout.eps layout.fig dist-hook: mkdir $(distdir)/tmpl diff --git a/docs/TEXT/coding-style b/docs/TEXT/coding-style new file mode 100644 index 00000000..04526c9c --- /dev/null +++ b/docs/TEXT/coding-style @@ -0,0 +1,115 @@ +Formatting +========== + +All parts of Pango other than modules should use the following formatting +style; for modules, it is up to the discretion of the module +author / maintainer, though they are encouraged to follow the following. + +The Pango formatting style is basically the GNU style of formatting +(see http://www.gnu.org/prep/standards.html), with a few additions. +In brief overview: + + - Two character indents are used; braces go on a separate line, and + get a separate indentation level, so the total indent for an + enclosed block is 4 characters. + + if (x < foo (y, z)) + haha = bar[4] + 5; + else + { + while (z) + { + haha += foo (z, z); + z--; + } + return abc (haha); + } + + - Spaces should be present between function name and argument block, + and after commas. + + foo (z, z) + + - In pointer types, the '*' is grouped with the variable name, + not with the base type. + + int *a; + + NOT: 'int* a'. + + In cases where there is no variable name, for instance, return + values, there should be a single space between the base type + and the '*'. + + - function and variable names are lower_case_with_underscores + type names are StudlyCaps, macro names are UPPER_CASE_WITH_UNDERSCORES + + +Documentation comments +====================== + +All public API functions should have inline documentation headers +in the gtk-doc / gnome-doc style. For instance: + +/** + * pango_layout_get_line: + * @layout: a #PangoLayout + * @line: the index of a line, which must be between 0 and + * pango_layout_get_line_count(layout) - 1, inclusive. + * + * Retrieves a particular line from a #PangoLayout + * + * Return value: the requested #PangoLayoutLine, or %NULL if the + * index is out of range. This layout line can + * be ref'ed and retained, but will become invalid + * if changes are made to the #PangoLayout. + **/ +PangoLayoutLine * +pango_layout_get_line (PangoLayout *layout, + int line) +[...] + +An Emacs lisp file is distributed with gnome-libs which automates +inserting these comments + +Choosing Function Names +======================= + +- Don't abbreviate in unexpected ways: + + pango_layout_get_line_count () + + Not: + + pango_layout_ln_cnt () + +- function that retrieve a value in a side-effect free fashion, should + include "get" in the name. + + int pango_layout_get_line_count (PangoLayout *layout) + + not + + pango_layout_line_count () + + +- functions that set a single parameter in a side-effect free fashion + should include "set" in the name, for instance: + + void pango_layout_set_width (PangoLayout *layout, + int width); + +Other comments +============== + +- Avoid unsigned values for all but flags fields. This is because + the way C handles unsigned values generates bugs like crazy: + + If width is unsigned and 10, then: + + int new_width = MAX (width - 15, 1); + + produces 4294967291, not 1. + + + diff --git a/docs/layout.eps b/docs/layout.eps new file mode 100644 index 00000000..42c897ab --- /dev/null +++ b/docs/layout.eps @@ -0,0 +1,231 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: layout.eps +%%Creator: fig2dev Version 3.2 Patchlevel 1 +%%CreationDate: Thu Mar 9 16:51:04 2000 +%%For: otaylor@fresnel.labs.redhat.com (Owen Taylor,,547-0012 x249) +%%Orientation: Portrait +%%BoundingBox: 0 0 629 233 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def +/col32 {0.443 0.459 0.443 srgb} bind def + +end +save +-5.0 253.0 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def +%%EndProlog + +$F2psBegin +10 setmiterlimit +n -1000 5215 m -1000 -1000 l 11561 -1000 l 11561 5215 l cp clip + 0.06000 0.06000 sc +% Polyline +15.000 slw +gs clippath +10200 3405 m 10350 3450 l 10200 3495 l 10380 3495 l 10380 3405 l cp +6300 3495 m 6150 3450 l 6300 3405 l 6120 3405 l 6120 3495 l cp +clip +n 6150 3450 m 10350 3450 l gs col-1 s gr gr + +% arrowhead +7.500 slw +n 6300 3495 m 6150 3450 l 6300 3405 l 6300 3450 l 6300 3495 l cp gs 0.00 setgray ef gr col-1 s +% arrowhead +n 10200 3405 m 10350 3450 l 10200 3495 l 10200 3450 l 10200 3405 l cp gs 0.00 setgray ef gr col-1 s +% Polyline +n 1200 675 m 1200 3600 l gs col-1 s gr +% Polyline +15.000 slw +gs clippath +5250 3405 m 5400 3450 l 5250 3495 l 5430 3495 l 5430 3405 l cp +1350 3495 m 1200 3450 l 1350 3405 l 1170 3405 l 1170 3495 l cp +clip +n 1200 3450 m 5400 3450 l gs col-1 s gr gr + +% arrowhead +7.500 slw +n 1350 3495 m 1200 3450 l 1350 3405 l 1350 3450 l 1350 3495 l cp gs 0.00 setgray ef gr col-1 s +% arrowhead +n 5250 3405 m 5400 3450 l 5250 3495 l 5250 3450 l 5250 3405 l cp gs 0.00 setgray ef gr col-1 s +% Polyline +n 1050 2175 m 1200 2175 l gs col-1 s gr +% Polyline +15.000 slw +n 1125 2025 m 1125 2175 l gs col-1 s gr +% Polyline +7.500 slw +n 6150 975 m 6150 3600 l gs col-1 s gr +% Polyline +n 5400 975 m 5400 3600 l gs col-1 s gr +% Polyline +n 1800 975 m 1800 675 l gs col-1 s gr +% Polyline +15.000 slw +gs clippath +1650 780 m 1800 825 l 1650 870 l 1830 870 l 1830 780 l cp +1350 870 m 1200 825 l 1350 780 l 1170 780 l 1170 870 l cp +clip +n 1200 825 m 1800 825 l gs col-1 s gr gr + +% arrowhead +7.500 slw +n 1350 870 m 1200 825 l 1350 780 l 1350 825 l 1350 870 l cp gs 0.00 setgray ef gr col-1 s +% arrowhead +n 1650 780 m 1800 825 l 1650 870 l 1650 825 l 1650 780 l cp gs 0.00 setgray ef gr col-1 s +% Polyline +n 9750 975 m 9750 675 l gs col-1 s gr +% Polyline +15.000 slw +gs clippath +10200 780 m 10350 825 l 10200 870 l 10380 870 l 10380 780 l cp +9900 870 m 9750 825 l 9900 780 l 9720 780 l 9720 870 l cp +clip +n 9750 825 m 10350 825 l gs col-1 s gr gr + +% arrowhead +7.500 slw +n 9900 870 m 9750 825 l 9900 780 l 9900 825 l 9900 870 l cp gs 0.00 setgray ef gr col-1 s +% arrowhead +n 10200 780 m 10350 825 l 10200 870 l 10200 825 l 10200 780 l cp gs 0.00 setgray ef gr col-1 s +% Polyline +n 10350 675 m 10350 3600 l gs col-1 s gr +% Polyline +15.000 slw +n 4950 1425 m 1800 1425 l 1800 975 l 4950 975 l cp gs col32 s gr +% Polyline +n 4575 2025 m 1200 2025 l 1200 1575 l 4575 1575 l cp gs col32 s gr +% Polyline +n 5250 2625 m 1200 2625 l 1200 2175 l 5250 2175 l cp gs col32 s gr +% Polyline +n 2400 3225 m 1200 3225 l 1200 2775 l 2400 2775 l cp gs col32 s gr +% Polyline +n 9750 1425 m 6600 1425 l 6600 975 l 9750 975 l cp gs col32 s gr +% Polyline +n 10350 2025 m 6975 2025 l 6975 1575 l 10350 1575 l cp gs col32 s gr +% Polyline +n 10350 2625 m 6300 2625 l 6300 2175 l 10350 2175 l cp gs col32 s gr +% Polyline +n 10350 3225 m 9150 3225 l 9150 2775 l 10350 2775 l cp gs col32 s gr +% Polyline +7.500 slw +n 1200 2025 m 1050 2025 l gs col-1 s gr +/Times-Roman ff 360.00 scf sf +1200 2475 m +gs 1 -1 sc (demonstrate PangoLayout's) col0 sh gr +/Times-Roman ff 360.00 scf sf +1200 3075 m +gs 1 -1 sc (features.) col0 sh gr +/Times-Roman ff 360.00 scf sf +1200 1875 m +gs 1 -1 sc (should wrap suitably to) col0 sh gr +/Helvetica ff 240.00 scf sf +525 2175 m +gs 1 -1 sc (spacing) dup sw pop 2 div neg 0 rm col-1 sh gr +/Times-Roman ff 360.00 scf sf +1800 1275 m +gs 1 -1 sc (Here is some text that) col0 sh gr +/Times-Roman ff 360.00 scf sf +9150 3075 m +gs 1 -1 sc (features.) col0 sh gr +/Times-Roman ff 360.00 scf sf +6600 1275 m +gs 1 -1 sc (Here is some text that) col0 sh gr +/Helvetica ff 240.00 scf sf +1875 3825 m +gs 1 -1 sc (width) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 240.00 scf sf +6825 3825 m +gs 1 -1 sc (width) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 240.00 scf sf +10050 525 m +gs 1 -1 sc (indent) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 240.00 scf sf +1575 525 m +gs 1 -1 sc (indent) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 300.00 scf sf +9225 4125 m +gs 1 -1 sc (Right Aligned) dup sw pop 2 div neg 0 rm col-1 sh gr +/Helvetica ff 300.00 scf sf +4350 4125 m +gs 1 -1 sc (Left Aligned) dup sw pop 2 div neg 0 rm col-1 sh gr +/Times-Roman ff 360.00 scf sf +6975 1875 m +gs 1 -1 sc (should wrap suitably to) col0 sh gr +/Times-Roman ff 360.00 scf sf +6300 2475 m +gs 1 -1 sc (demonstrate PangoLayout's) col0 sh gr +$F2psEnd +rs diff --git a/docs/layout.fig b/docs/layout.fig new file mode 100644 index 00000000..7e43560b --- /dev/null +++ b/docs/layout.fig @@ -0,0 +1,75 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +0 32 #717571 +2 1 0 2 -1 7 100 0 -1 0.000 0 0 -1 1 1 2 + 1 1 1.00 90.00 150.00 + 1 1 1.00 90.00 150.00 + 6150 3450 10350 3450 +2 1 0 1 -1 7 100 0 -1 0.000 0 0 -1 0 0 2 + 1200 675 1200 3600 +2 1 0 2 -1 7 100 0 -1 0.000 0 0 -1 1 1 2 + 1 1 1.00 90.00 150.00 + 1 1 1.00 90.00 150.00 + 1200 3450 5400 3450 +2 1 0 1 -1 7 100 0 -1 0.000 0 0 -1 0 0 2 + 1050 2175 1200 2175 +2 1 0 2 -1 7 100 0 -1 0.000 0 0 -1 0 0 2 + 1125 2025 1125 2175 +2 1 0 1 -1 7 100 0 -1 0.000 0 0 -1 0 0 2 + 6150 975 6150 3600 +2 1 0 1 -1 7 100 0 -1 0.000 0 0 -1 0 0 2 + 5400 975 5400 3600 +2 1 0 1 -1 7 100 0 -1 0.000 0 0 -1 0 0 2 + 1800 975 1800 675 +2 1 0 2 -1 7 100 0 -1 0.000 0 0 -1 1 1 2 + 1 1 1.00 90.00 150.00 + 1 1 1.00 90.00 150.00 + 1200 825 1800 825 +2 1 0 1 -1 7 100 0 -1 0.000 0 0 -1 0 0 2 + 9750 975 9750 675 +2 1 0 2 -1 7 100 0 -1 0.000 0 0 -1 1 1 2 + 1 1 1.00 90.00 150.00 + 1 1 1.00 90.00 150.00 + 9750 825 10350 825 +2 1 0 1 -1 7 100 0 -1 0.000 0 0 -1 0 0 2 + 10350 675 10350 3600 +2 2 0 2 32 7 100 0 -1 0.000 0 0 -1 0 0 5 + 4950 1425 1800 1425 1800 975 4950 975 4950 1425 +2 2 0 2 32 7 100 0 -1 0.000 0 0 -1 0 0 5 + 4575 2025 1200 2025 1200 1575 4575 1575 4575 2025 +2 2 0 2 32 7 100 0 -1 0.000 0 0 -1 0 0 5 + 5250 2625 1200 2625 1200 2175 5250 2175 5250 2625 +2 2 0 2 32 7 100 0 -1 0.000 0 0 -1 0 0 5 + 2400 3225 1200 3225 1200 2775 2400 2775 2400 3225 +2 2 0 2 32 7 100 0 -1 0.000 0 0 -1 0 0 5 + 9750 1425 6600 1425 6600 975 9750 975 9750 1425 +2 2 0 2 32 7 100 0 -1 0.000 0 0 -1 0 0 5 + 10350 2025 6975 2025 6975 1575 10350 1575 10350 2025 +2 2 0 2 32 7 100 0 -1 0.000 0 0 -1 0 0 5 + 10350 2625 6300 2625 6300 2175 10350 2175 10350 2625 +2 2 0 2 32 7 100 0 -1 0.000 0 0 -1 0 0 5 + 10350 3225 9150 3225 9150 2775 10350 2775 10350 3225 +2 1 0 1 -1 7 100 0 -1 0.000 0 0 -1 0 0 2 + 1200 2025 1050 2025 +4 0 0 100 0 0 24 0.0000 4 330 4155 1200 2475 demonstrate PangoLayout's\001 +4 0 0 100 0 0 24 0.0000 4 255 1260 1200 3075 features.\001 +4 0 0 100 0 0 24 0.0000 4 330 3405 1200 1875 should wrap suitably to\001 +4 1 -1 100 0 16 16 0.0000 4 240 855 525 2175 spacing\001 +4 0 0 100 0 0 24 0.0000 4 255 3270 1800 1275 Here is some text that\001 +4 0 0 100 0 0 24 0.0000 4 255 1260 9150 3075 features.\001 +4 0 0 100 0 0 24 0.0000 4 255 3270 6600 1275 Here is some text that\001 +4 1 -1 100 0 16 16 0.0000 4 180 540 1875 3825 width\001 +4 1 -1 100 0 16 16 0.0000 4 180 540 6825 3825 width\001 +4 1 -1 100 0 16 16 0.0000 4 180 645 10050 525 indent\001 +4 1 -1 100 0 16 16 0.0000 4 180 645 1575 525 indent\001 +4 1 -1 100 0 16 20 0.0000 4 300 1770 9225 4125 Right Aligned\001 +4 1 -1 100 0 16 20 0.0000 4 300 1590 4350 4125 Left Aligned\001 +4 0 0 100 0 0 24 0.0000 4 330 3405 6975 1875 should wrap suitably to\001 +4 0 0 100 0 0 24 0.0000 4 330 4155 6300 2475 demonstrate PangoLayout's\001 diff --git a/docs/layout.gif b/docs/layout.gif Binary files differnew file mode 100644 index 00000000..96bde1f2 --- /dev/null +++ b/docs/layout.gif diff --git a/docs/pango-sections.txt b/docs/pango-sections.txt index 57809132..9c606fa5 100644 --- a/docs/pango-sections.txt +++ b/docs/pango-sections.txt @@ -29,9 +29,6 @@ PangoLogAttr <SUBSECTION> pango_shape pango_justify -<SUBSECTION> -pango_cp_to_x -pango_x_to_cp </SECTION> <SECTION> @@ -52,6 +49,9 @@ pango_glyph_string_new pango_glyph_string_set_size pango_glyph_string_free pango_glyph_string_extents +pango_glyph_string_index_to_x +pango_glyph_string_x_to_index +pango_glyph_string_get_logical_widths </SECTION> <SECTION> @@ -153,8 +153,6 @@ pango_attr_iterator_destroy <TITLE>Layout Objects</TITLE> <FILE>layout</FILE> PangoLayout -PangoLayoutLine -PangoLayoutRun pango_layout_new pango_layout_ref pango_layout_unref @@ -162,17 +160,32 @@ pango_layout_unref pango_layout_set_text pango_layout_set_attributes pango_layout_set_width -pango_layout_set_first_line_width +pango_layout_get_width +pango_layout_set_indent +pango_layout_get_indent pango_layout_set_justify +pango_layout_get_justify +pango_layout_set_alignment +pango_layout_get_alignment +PangoAlignment + +pango_layout_xy_to_index +pango_layout_index_to_pos -pango_layout_cp_to_line_x +pango_layout_get_extents pango_layout_get_line_count pango_layout_get_line +pango_layout_get_lines + +<SUBSECTION> +PangoLayoutLine +PangoLayoutRun pango_layout_line_ref pango_layout_line_unref -pango_layout_line_x_to_cp pango_layout_line_get_extents +pango_layout_line_index_to_x +pango_layout_line_x_to_index </SECTION> <SECTION> @@ -197,8 +210,8 @@ script_engine_unload PANGO_RENDER_TYPE_X pango_x_get_context pango_x_render -pango_x_extents -pango_x_glyph_extents +pango_x_render_layout_line +pango_x_render_layout </SECTION> <SECTION> diff --git a/docs/tmpl/glyphs.sgml b/docs/tmpl/glyphs.sgml index ad3fad44..d98587a5 100644 --- a/docs/tmpl/glyphs.sgml +++ b/docs/tmpl/glyphs.sgml @@ -256,3 +256,43 @@ accessible fields @logical_rect: +<!-- ##### FUNCTION pango_glyph_string_index_to_x ##### --> +<para> + +</para> + +@glyphs: +@text: +@length: +@analysis: +@index: +@trailing: +@x_pos: + + +<!-- ##### FUNCTION pango_glyph_string_x_to_index ##### --> +<para> + +</para> + +@glyphs: +@text: +@length: +@analysis: +@x_pos: +@index: +@trailing: + + +<!-- ##### FUNCTION pango_glyph_string_get_logical_widths ##### --> +<para> + +</para> + +@glyphs: +@text: +@length: +@embedding_level: +@logical_widths: + + diff --git a/docs/tmpl/layout.sgml b/docs/tmpl/layout.sgml index aa44fd98..7593c90f 100644 --- a/docs/tmpl/layout.sgml +++ b/docs/tmpl/layout.sgml @@ -2,7 +2,7 @@ Layout Objects <!-- ##### SECTION Short_Description ##### --> -Layout driver objects for entire paragraphs. +Highlevel layout driver objects <!-- ##### SECTION Long_Description ##### --> <para> @@ -23,44 +23,36 @@ at once. <para> The #PangoLayout structure represents and entire paragraph of text. It is initialized with a #PangoContext, UTF-8 string -and set of attirbutes for that string. Once that is done, the -set of formatted lines can be extracted from the object. +and set of attributes for that string. Once that is done, the +set of formatted lines can be extracted from the object, +the layout can be rendered, and conversion between logical +character positions within the layout's text, and the physical +position of the resulting glyphs can be made. </para> - -<!-- ##### STRUCT PangoLayoutLine ##### --> -<para> -The #PangoLayoutLine structure represents one of the lines resulting -from laying out a paragraph via #PangoLayout. #PangoLayoutLine -structures are obtained by calling pango_layout_get_line() and -are only valid until the text, attributes, or settings of the -parent #PangoLayout are modified. -</para> <para> -Routines for rendering PangoLayout objects are provided in -code specific to each rendering system. +There are also a number of parameters to adjust the formatting +of a #PangoLayout, which are illustrated in <xref linkend="parameters">. +It is possible, as well, to ignore the 2-D setup, and simply +treat the results of a #PangoLayout as a list of lines. </para> -@layout: the parent layout for this line. -@n_chars: the total number of characters in the line. -@length: the length of the line in bytes. -@runs: a list containing the runs of the line in visual order. +<figure id="parameters"> +<title>Adjustable parameters for a PangoLayout</title> +<graphic fileref="layout.gif" format="gif"></graphic> +</figure> -<!-- ##### STRUCT PangoLayoutRun ##### --> <para> -The #PangoLayoutRun structure represents a single run within -a #PangoLayoutLine. +The #PangoLayout structure is opaque, and has no user-visible +fields. </para> -@item: a #PangoItem structure that provides information - about the segment of text in this run. -@glyphs: the glyphs obtained by shaping the text for this item. - <!-- ##### FUNCTION pango_layout_new ##### --> <para> </para> +@context: @Returns: @@ -85,6 +77,7 @@ a #PangoLayoutLine. </para> +@layout: @text: @length: @@ -107,13 +100,31 @@ a #PangoLayoutLine. @width: -<!-- ##### FUNCTION pango_layout_set_first_line_width ##### --> +<!-- ##### FUNCTION pango_layout_get_width ##### --> <para> </para> @layout: -@width: +@Returns: + + +<!-- ##### FUNCTION pango_layout_set_indent ##### --> +<para> + +</para> + +@layout: +@indent: + + +<!-- ##### FUNCTION pango_layout_get_indent ##### --> +<para> + +</para> + +@layout: +@Returns: <!-- ##### FUNCTION pango_layout_set_justify ##### --> @@ -125,16 +136,76 @@ a #PangoLayoutLine. @justify: -<!-- ##### FUNCTION pango_layout_cp_to_line_x ##### --> +<!-- ##### FUNCTION pango_layout_get_justify ##### --> +<para> + +</para> + +@layout: +@Returns: + + +<!-- ##### FUNCTION pango_layout_set_alignment ##### --> +<para> + +</para> + +@layout: +@alignment: + + +<!-- ##### FUNCTION pango_layout_get_alignment ##### --> <para> </para> @layout: -@char_pos: +@Returns: + + +<!-- ##### ENUM PangoAlignment ##### --> +<para> +describes how to align the lines of a #PangoLayout within the +available space. If the #PangoLayout is set to justify +using pango_layout_set_justify(), then this only has an effect +for partial lines. +</para> + +@PANGO_ALIGN_LEFT: Put all available space on the right +@PANGO_ALIGN_CENTER: Center the line within the available space +@PANGO_ALIGN_RIGHT: Put all available space on the left + +<!-- ##### FUNCTION pango_layout_xy_to_index ##### --> +<para> + +</para> + +@layout: +@x: +@y: +@index: @trailing: -@line: -@x_pos: +@Returns: + + +<!-- ##### FUNCTION pango_layout_index_to_pos ##### --> +<para> + +</para> + +@layout: +@index: +@pos: + + +<!-- ##### FUNCTION pango_layout_get_extents ##### --> +<para> + +</para> + +@layout: +@ink_rect: +@logical_rect: <!-- ##### FUNCTION pango_layout_get_line_count ##### --> @@ -156,6 +227,42 @@ a #PangoLayoutLine. @Returns: +<!-- ##### FUNCTION pango_layout_get_lines ##### --> +<para> + +</para> + +@layout: +@Returns: + + +<!-- ##### STRUCT PangoLayoutLine ##### --> +<para> +The #PangoLayoutLine structure represents one of the lines resulting +from laying out a paragraph via #PangoLayout. #PangoLayoutLine +structures are obtained by calling pango_layout_get_line() and +are only valid until the text, attributes, or settings of the +parent #PangoLayout are modified. +</para> +<para> +Routines for rendering PangoLayout objects are provided in +code specific to each rendering system. +</para> + +@layout: the parent layout for this line. +@length: the length of the line in bytes. +@runs: a list containing the runs of the line in visual order. + +<!-- ##### STRUCT PangoLayoutRun ##### --> +<para> +The #PangoLayoutRun structure represents a single run within +a #PangoLayoutLine. +</para> + +@item: a #PangoItem structure that provides information + about the segment of text in this run. +@glyphs: the glyphs obtained by shaping the text for this item. + <!-- ##### FUNCTION pango_layout_line_ref ##### --> <para> @@ -172,24 +279,36 @@ a #PangoLayoutLine. @line: -<!-- ##### FUNCTION pango_layout_line_x_to_cp ##### --> +<!-- ##### FUNCTION pango_layout_line_get_extents ##### --> +<para> + +</para> + +@line: +@ink_rect: +@logical_rect: + + +<!-- ##### FUNCTION pango_layout_line_index_to_x ##### --> <para> </para> @line: -@x_pos: -@char_pos: +@index: @trailing: +@x_pos: -<!-- ##### FUNCTION pango_layout_line_get_extents ##### --> +<!-- ##### FUNCTION pango_layout_line_x_to_index ##### --> <para> </para> @line: -@ink_rect: -@logical_rect: +@x_pos: +@index: +@trailing: +@Returns: diff --git a/docs/tmpl/main.sgml b/docs/tmpl/main.sgml index 748419c4..b8e8617e 100644 --- a/docs/tmpl/main.sgml +++ b/docs/tmpl/main.sgml @@ -346,31 +346,3 @@ about the attributes of a single character. @min_kashida_width: -<!-- ##### FUNCTION pango_cp_to_x ##### --> -<para> - -</para> - -@text: -@length: -@analysis: -@glyphs: -@char_pos: -@trailing: -@x_pos: - - -<!-- ##### FUNCTION pango_x_to_cp ##### --> -<para> - -</para> - -@text: -@length: -@analysis: -@glyphs: -@x_pos: -@char_pos: -@trailing: - - diff --git a/docs/tmpl/pango-unused.sgml b/docs/tmpl/pango-unused.sgml index 376bf35b..6c16aa07 100644 --- a/docs/tmpl/pango-unused.sgml +++ b/docs/tmpl/pango-unused.sgml @@ -5,6 +5,27 @@ @font: +<!-- ##### FUNCTION pango_layout_line_x_to_cp ##### --> +<para> + +</para> + +@line: +@x_pos: +@char_pos: +@trailing: + +<!-- ##### FUNCTION pango_layout_cp_to_line_x ##### --> +<para> + +</para> + +@layout: +@char_pos: +@trailing: +@line: +@x_pos: + <!-- ##### FUNCTION pango_cfont_ref ##### --> <para> @@ -27,6 +48,34 @@ indices. @context: @Returns: +<!-- ##### FUNCTION pango_x_glyph_extents ##### --> +<para> + +</para> + +@font: +@glyph: +@lbearing: +@rbearing: +@width: +@ascent: +@descent: +@logical_ascent: +@logical_descent: + +<!-- ##### FUNCTION pango_cp_to_x ##### --> +<para> + +</para> + +@text: +@length: +@analysis: +@glyphs: +@char_pos: +@trailing: +@x_pos: + <!-- ##### FUNCTION pango_x_find_cfont ##### --> <para> @@ -78,6 +127,19 @@ indices. @xlfd: @Returns: +<!-- ##### FUNCTION pango_x_to_cp ##### --> +<para> + +</para> + +@text: +@length: +@analysis: +@glyphs: +@x_pos: +@char_pos: +@trailing: + <!-- ##### SECTION ./tmpl/pango-x.sgml:Title ##### --> X Rendering @@ -116,6 +178,14 @@ the X Window system. @Returns: +<!-- ##### FUNCTION pango_layout_set_first_line_width ##### --> +<para> + +</para> + +@layout: +@width: + <!-- ##### SECTION ./tmpl/pango-x.sgml:Long_Description ##### --> <para> @@ -220,3 +290,18 @@ that may be accessed by derived classes: @klass: +<!-- ##### FUNCTION pango_x_extents ##### --> +<para> + +</para> + +@font: +@glyphs: +@lbearing: +@rbearing: +@width: +@ascent: +@descent: +@logical_ascent: +@logical_descent: + diff --git a/docs/tmpl/x-rendering.sgml b/docs/tmpl/x-rendering.sgml index 3c4d10d7..82f0beea 100644 --- a/docs/tmpl/x-rendering.sgml +++ b/docs/tmpl/x-rendering.sgml @@ -2,11 +2,11 @@ X Rendering <!-- ##### SECTION Short_Description ##### --> -Functions for measuring glyphs and rendering X fonts. +Functions for Rendering Pango objects on X displays. <!-- ##### SECTION Long_Description ##### --> <para> -The functions in thjis system are used to take the output +The functions in this system are used to take the output of the shaping modules and render that on the screen. </para> @@ -47,35 +47,29 @@ X Window System. @y: -<!-- ##### FUNCTION pango_x_extents ##### --> +<!-- ##### FUNCTION pango_x_render_layout_line ##### --> <para> </para> -@font: -@glyphs: -@lbearing: -@rbearing: -@width: -@ascent: -@descent: -@logical_ascent: -@logical_descent: +@display: +@drawable: +@gc: +@line: +@x: +@y: -<!-- ##### FUNCTION pango_x_glyph_extents ##### --> +<!-- ##### FUNCTION pango_x_render_layout ##### --> <para> </para> -@font: -@glyph: -@lbearing: -@rbearing: -@width: -@ascent: -@descent: -@logical_ascent: -@logical_descent: +@display: +@drawable: +@gc: +@layout: +@x: +@y: |