Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::Pango Namespace Reference

C++ framework for the Pango text handling library. More...

Compounds

Rendering Methods

Item methods

Typedefs

Enumerations


Detailed Description

C++ framework for the Pango text handling library.

Pango is a library for internationalized text handling. It centers around the Pango::Layout object, representing a paragraph of text. Pango provides the engine for Gtk::TextView, Gtk::Label, Gtk::Entry and other widgets that display text.


Typedef Documentation

typedef PangoGlyph Inti::Pango::Glyph
 

Glyph is a convenient typedef for PangoGlyph.

Glyph structure represents a single glyph in the output form of a glyph string.

typedef PangoGlyphUnit Inti::Pango::GlyphUnit
 

GlyphUnit is a convenient typedef for PangoGlyphUnit.

The GlyphUnit type is used to store dimensions within 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.


Enumeration Type Documentation

enum Inti::Pango::Alignment
 

Describes how to align the lines of a Layout 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.

Enumeration values:
ALIGN_LEFT  Put all available space on the right.
ALIGN_CENTER  Center the line within the available space.
ALIGN_RIGHT  Put all available space on the left.

enum Inti::Pango::AttrType
 

Distinguishes between different types of attributes.

Along with the predefined values, it is possible to allocate additional values for custom attributes using pango_attr_register_type(). The predefined values are given below. The type of class used to store the attribute is listed in parentheses after the description.

Enumeration values:
ATTR_INVALID  Invalid.
ATTR_LANGUAGE  Language (AttrLanguage).
ATTR_FAMILY  Font family name list (AttrString).
ATTR_STYLE  Font slant style (AttrInt).
ATTR_WEIGHT  Font weight (AttrInt).
ATTR_VARIANT  Font variant (normal or small caps) (AttrInt).
ATTR_STRETCH  Font stretch (AttrInt).
ATTR_SIZE  Font size in points divided by PANGO_SCALE (AttrInt).
ATTR_FONT_DESC  Font description (AttrFontDesc).
ATTR_FOREGROUND  Foreground color (AttrColor).
ATTR_BACKGROUND  Background color (AttrColor).
ATTR_UNDERLINE  Whether the text has an underline (AttrInt).
ATTR_STRIKETHROUGH  Whether the text is struck-through (AttrInt).
ATTR_RISE  Baseline displacement (AttrInt).
ATTR_SHAPE  Shape (AttrShape).
ATTR_SCALE  Font size scale factor (AttrScale).

enum Inti::Pango::CoverageLevel
 

Used to indicate how well a font can represent a particular ISO 10646 character point for a particular script.

Enumeration values:
COVERAGE_NONE  The character is not representable with the font.
COVERAGE_FALLBACK  The character is represented in a way that may be comprehensible but is not the correct graphical form; for instance, a Hangul character represented as a a sequence of Jamos, or a Latin transliteration of a Cyrillic word.
COVERAGE_APPROXIMATE  The character is represented as basically the correct graphical form, but with a stylistic variant inappropriate for the current script.
COVERAGE_EXACT  The character is represented as the correct graphical form.

enum Inti::Pango::Direction
 

The Direction type represents the direction of writing for text.

Enumeration values:
DIRECTION_LTR  The text is written left-to-right.
DIRECTION_RTL  The text is written right-to-left.
DIRECTION_TTB_LTR  The text is written vertically top-to-bottom, with the rows ordered from left to right.
DIRECTION_TTB_RTL  The text is written vertically top-to-bottom, with the rows ordered from right to left.

enum Inti::Pango::FontMask
 

The bit flags in a FontMask correspond to fields in a FontDescription that have been set.

Enumeration values:
FONT_MASK_FAMILY  The font family is specified.
FONT_MASK_STYLE  The font style is specified.
FONT_MASK_VARIANT  T font variant is specified.
FONT_MASK_WEIGHT  The font weight is specified.
FONT_MASK_STRETCH  The font stretch is specified.
FONT_MASK_SIZE  The font size is specified.

enum Inti::Pango::Stretch
 

Specifies the width of the font relative to other designs within a family.

Enumeration values:
STRETCH_UTLRA_CONDENSED  Ultra condensed width.
STRETCH_EXTRA_CONDENSED  Extra condensed width.
STRETCH_CONDENSED  Condensed width.
STRETCH_SEMI_CONDENSED  Semi condensed width.
STRETCH_NORMAL  Normal width.
STRETCH_SEMI_EXPANDED  Semi expanded width.
STRETCH_EXPANDED  Expanded width.
STRETCH_EXTRA_EXPANDED  Extra expanded width.
STRETCH_ULTRA_EXPANDED  Ultra expanded width.

enum Inti::Pango::Style
 

Specifies the various slant styles possible for a font.

Enumeration values:
STYLE_NORMAL  The font is upright.
STYLE_OBLIQUE  The font is slanted, but in a roman style.
STYLE_ITALIC  The font is slanted in an italic style.

enum Inti::Pango::TabAlign
 

Specifies where a tab stop appears relative to the text.

Currently there is only TAB_LEFT, but TAB_RIGHT, TAB_CENTER and TAB_NUMERIC may be supported in the future.

Enumeration values:
TAB_LEFT  The tab stop appears to the left of the text.

enum Inti::Pango::Underline
 

Underline is used to specify whether text should be underlined, and if so, the type of underlining.

Enumeration values:
UNDERLINE_NONE  No underline should be drawn.
UNDERLINE_SINGLE  A single underline should be drawn.
UNDERLINE_DOUBLE  A double underline should be drawn.
UNDERLINE_LOW  A single underline should be drawn at a position beneath the ink extents of the text being underlined; this should be used only for underlining single characters, such as for keyboard accelerators; UNDERLINE_SINGLE should be used for extended portions of text.

enum Inti::Pango::Variant
 

Specifies the capitalization variant of the font.

Enumeration values:
VARIANT_NORMAL  A normal font.
VARIANT_SMALL_CAPS  A font with the lower case characters replaced by smaller variants of the capital characters.

enum Inti::Pango::Weight
 

Specifies the weight (boldness) of a font.

This is a numerical value ranging from 100 to 900, but there are some predefined values:

Enumeration values:
WEIGHT_ULTALIGHT  The ultralight weight (= 200).
WEIGHT_LIGHT  The light weight (=300).
WEIGHT_NORMAL  The default weight (= 400).
WEIGHT_BOLD  The bold weight (= 700).
WEIGHT_ULTRABOLD  The ultrabold weight (= 800).
WEIGHT_HEAVY  The heavy weight (= 900).

enum Inti::Pango::WrapMode
 

Enumeration values:
WRAP_WORD  Wrap lines at word boundaries.
WRAP_CHAR  Wrap lines at character boundaries.
WRAP_WORD_CHAR  Wrap lines at word boundaries, but fall back to character boundaries if there is not enought space for a full word.


Function Documentation

void break_text const String &  text,
const Analysis &  analysis,
std::vector< LogAttr > &  attrs
 

Determines possible line, word, and character breaks for a string of Unicode text.

Parameters:
text The text to process.
analysis An Analysis structure from Pango::Context::itemize().
attrs A vector of LogAttr to store the character information in.

void find_paragraph_boundary const String &  text,
int *  paragraph_delimiter_index,
int *  next_paragraph_start
 

Locates a paragraph boundary in text.

Parameters:
text The UTF-8 text.
paragraph_delimiter_index The return location for index of delimiter.
next_paragraph_start The return location for start of next paragraph.

A boundary is caused by delimiter characters, such as a newline, carriage return, carriage return-newline pair, or Unicode paragraph separator character. The index of the run of delimiters is returned in paragraph_delimiter_index. The index of the start of the paragraph (index after all delimiters) is stored in next_paragraph_start. If no delimiters are found, both paragraph_delimiter_index and next_paragraph_start are filled with the length of text (an index one off the end).

void get_log_attrs const String &  text,
PangoLanguage *  language,
std::vector< LogAttr > &  attrs,
int  level = -1
 

Computes a LogAttr for each character in text.

Parameters:
text The text to process.
language The language tag.
attrs A vector of LogAttr with one LogAttr per character in text, plus one extra, to be filled in.
level The embedding level, or -1 if unknown.

The log_attrs vector must have one LogAttr for each position in text; if text contains N characters, it has N+1 positions, including the last position at the end of the text. text should be an entire paragraph; logical attributes can't be computed without context (for example you need to see spaces on either side of a word to know the word is a word).

std::vector<Pointer<Item> > reorder_items const std::vector< Pointer< Item > > &  logical_items  ) 
 

From a list of items in logical order and the associated directional levels, produce a list in visual order (the original list is unmodified).

Parameters:
logical_items A vector of Pointer<Item> in logical order.
Returns:
A vector of Pointer<Item> in visual order.

Please mail otaylor@redhat.com if you use this method. It is not a particularly convenient interface, and the code is duplicated elsewhere in Pango for that reason.
Main Page - Footer


Generated on Sun Sep 14 20:08:23 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002