diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-12-20 17:18:51 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-12-20 17:18:51 +0000 |
commit | 3a2116e4bc00807b2b353fc953fcc92aa24c67ea (patch) | |
tree | 59e3025d6ff0d821f4bfbe2c83a2ddb153eebff9 /docs | |
parent | 63cd593c34fd384b21722f751c66ed48d722033d (diff) | |
download | pango-3a2116e4bc00807b2b353fc953fcc92aa24c67ea.tar.gz |
Some unit fixups (#96335)
Fri Dec 20 11:59:22 2002 Owen Taylor <otaylor@redhat.com>
Some unit fixups (#96335)
* pango/pango-layout.c pango/pango-mapping.c:
Fix occurrences of "in thousandths of a device
unit" to say "in #PangoGlyphUnit" which will
give a link to the PangoGlyphUnit docs.
* docs/tmpl/text-attributes.sgml: Change 1000 to PANGO_SCALE.
* docs/tmpl/glyphs.sgml: Fix docs for PangoGlyphUnit,
fix mention of value of PANGO_SCALE from 1000 to 1024.
* pango/pango-layout.c (pango_layout_line_get_x_ranges):
Fix the docs for @ranges so it doesn't sound like the
coordinates are in pixels.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/tmpl/glyphs.sgml | 9 | ||||
-rw-r--r-- | docs/tmpl/text-attributes.sgml | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/docs/tmpl/glyphs.sgml b/docs/tmpl/glyphs.sgml index 4700e713..49ad1cc7 100644 --- a/docs/tmpl/glyphs.sgml +++ b/docs/tmpl/glyphs.sgml @@ -23,7 +23,7 @@ The PANGO_SCALE macro represents the scale between dimensions used for Pango distances and device units. (The definition of device units is dependent on the output device; it will typically be pixels for a screen, and points for a printer.) PANGO_SCALE is currently -1000, but this may be changed in the future. +1024, but this may be changed in the future. </para> <para> When setting font sizes, device units are always considered to be @@ -168,7 +168,12 @@ information for a single glyph. Distances are in <!-- ##### TYPEDEF PangoGlyphUnit ##### --> <para> The #PangoGlyphUnit type is used to store dimensions within -Pango. Dimensions are stored in 1/64ths of a point. +Pango. Dimensions are stored in 1/PANGO_SCALE of a device unit. +(A device unit might be a pixel for screen display, or +a point on a printer.) PANGO_SCALE is currently 1024, and +is unlikely to change, but you should not depend on its +exact value. The PANGO_PIXELS() macro can be used to convert +from glyph units into device units with correct rounding. </para> diff --git a/docs/tmpl/text-attributes.sgml b/docs/tmpl/text-attributes.sgml index 5371ebf6..c908e7fd 100644 --- a/docs/tmpl/text-attributes.sgml +++ b/docs/tmpl/text-attributes.sgml @@ -34,7 +34,7 @@ attribute is listed in parentheses after the description. @PANGO_ATTR_WEIGHT: font weight (#PangoAttrInt) @PANGO_ATTR_VARIANT: font variant (normal or small caps) (#PangoAttrInt) @PANGO_ATTR_STRETCH: font stretch (#PangoAttrInt) -@PANGO_ATTR_SIZE: font size in 1000th's of a point (#PangoAttrInt) +@PANGO_ATTR_SIZE: font size in points divided by PANGO_SCALE (#PangoAttrInt) @PANGO_ATTR_FONT_DESC: font description (#PangoAttrFontDesc) @PANGO_ATTR_FOREGROUND: foreground color (#PangoAttrColor) @PANGO_ATTR_BACKGROUND: background color (#PangoAttrColor) |