Text Attributes
Font and other attributes for annotating text
pangoParseMarkup(markup.text, accel.marker, .errwarn = TRUE)pangoAttrTypeRegister(name)pangoAttrTypeGetName(type)pangoAttributeInit(attr, klass)pangoAttributeCopy(object)pangoAttributeEqual(object, attr2)pangoAttrLanguageNew(language)pangoAttrFamilyNew(family)pangoAttrStyleNew(style)pangoAttrVariantNew(variant)pangoAttrStretchNew(stretch)pangoAttrWeightNew(weight)pangoAttrSizeNew(size)pangoAttrSizeNewAbsolute(size)pangoAttrFontDescNew(desc)pangoAttrForegroundNew(red, green, blue)pangoAttrBackgroundNew(red, green, blue)pangoAttrStrikethroughNew(strikethrough)pangoAttrStrikethroughColorNew(red, green, blue)pangoAttrUnderlineNew(underline)pangoAttrUnderlineColorNew(red, green, blue)pangoAttrShapeNew(ink.rect, logical.rect)pangoAttrShapeNewWithData(ink.rect, logical.rect, data)pangoAttrScaleNew(scale.factor)pangoAttrRiseNew(rise)pangoAttrLetterSpacingNew(letter.spacing)pangoAttrFallbackNew(fallback)pangoAttrGravityNew(gravity)pangoAttrGravityHintNew(hint)pangoColorParse(spec)pangoColorCopy(object)pangoColorFree(object)pangoColorToString(object)pangoAttrListNew()pangoAttrListCopy(object)pangoAttrListInsert(object, attr)pangoAttrListInsertBefore(object, attr)pangoAttrListChange(object, attr)pangoAttrListSplice(object, other, pos, len)pangoAttrListFilter(object, func, data)pangoAttrListGetIterator(object)pangoAttrIteratorCopy(object)pangoAttrIteratorNext(object)pangoAttrIteratorRange(object)pangoAttrIteratorGet(object, type)pangoAttrIteratorGetFont(object)pangoAttrIteratorGetAttrs(object)
Attributed text is used in a number of places in Pango. It
is used as the input to the itemization process and also when
creating a PangoLayout. The data types and functions in
this section are used to represent and manipulate sets
of attributes applied to a portion of text.
PangoAttrClassThe PangoAttrClass structure stores the type and operations for
a particular type of attribute. The functions in this structure should
not be called directly. Instead, one should use the wrapper functions
provided for PangoAttribute.
type[PangoAttrType] the type ID for this attribute
PangoAttributeThe PangoAttribute structure represents the common portions of all
attributes. Particular types of attributes include this structure
as their initial portion. The common portion of the attribute holds
the range to which the value in the type-specific part of the attribute
applies and should be initialized using pangoAttributeInit.
By default an attribute will have an all-inclusive range of [0,G_MAXUINT].
klass[PangoAttrClass] the class structure holding information about the type of the attribute
startIndex[numeric] the start index of the range (in bytes).
endIndex[numeric] end index of the range (in bytes). The character at this index is not included in the range.
PangoAttrStringThe PangoAttrString structure is used to represent attributes with
a string value.
value[char] the common portion of the attribute
PangoAttrLanguageThe PangoAttrLanguage structure is used to represent attributes that
are languages.
value[PangoLanguage] the common portion of the attribute
PangoAttrColorThe PangoAttrColor structure is used to represent attributes that
are colors.
color[PangoColor] the common portion of the attribute
PangoAttrIntThe PangoAttrInt structure is used to represent attributes with
an integer or enumeration value.
value[integer] the common portion of the attribute
PangoAttrFloatThe PangoAttrFloat structure is used to represent attributes with
a float or double value.
value[numeric] the common portion of the attribute
PangoAttrFontDescThe PangoAttrFontDesc structure is used to store an attribute that
sets all aspects of the font description at once.
desc[PangoFontDescription] the common portion of the attribute
PangoAttrShapeThe PangoAttrShape structure is used to represent attributes which
impose shape restrictions.
inkRect[PangoRectangle] the common portion of the attribute
logicalRect[PangoRectangle] the ink rectangle to restrict to
PangoAttrSizeThe PangoAttrShape structure is used to represent attributes which
set font size.
size[integer] the common portion of the attribute
absolute[numeric] size of font, in units of 1/PANGO_SCALE of a point (for
PANGO_ATTR_SIZE) or of a device uni (for PANGO_ATTR_ABSOLUTE_SIZE)
PangoColorThe PangoColor structure is used to
represent a color in an uncalibrated RGB color-space.
red[integer] The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.
green[integer] The green component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.
blue[integer] The blue component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.
PangoAttrListThe PangoAttrList structure represents a list of attributes
that apply to a section of text. The attributes are, in general,
allowed to overlap in an arbitrary fashion, however, if the
attributes are manipulated only through pangoAttrListChange,
the overlap between properties will meet stricter criteria.
Since the PangoAttrList structure is stored as a linear list,
it is not suitable for storing attributes for large amounts
of text. In general, you should not use a single PangoAttrList
for more than one paragraph of text.
PangoAttrIteratorThe PangoAttrIterator structure is used to represent an
iterator through a PangoAttrList. A new iterator is created
with pangoAttrListGetIterator. Once the iterator
is created, it can be advanced through the style changes
in the text using pangoAttrIteratorNext. At each
style change, the range of the current style segment and the
attributes currently in effect can be queried.
PangoAttrTypeThe PangoAttrType
distinguishes between different types of attributes. Along with the
predefined values, it is possible to allocate additional values
for custom attributes using pangoAttrTypeRegister. The predefined
values are given below. The type of structure used to store the
attribute is listed in parentheses after the description.
invaliddoes not happen
languagelanguage (PangoAttrLanguage)
familyfont family name list (PangoAttrString)
stylefont slant style (PangoAttrInt)
weightfont weight (PangoAttrInt)
variantfont variant (normal or small caps) (PangoAttrInt)
stretchfont stretch (PangoAttrInt)
sizefont size in points scaled by PANGO_SCALE (PangoAttrInt)
font-descfont description (PangoAttrFontDesc)
foregroundforeground color (PangoAttrColor)
backgroundbackground color (PangoAttrColor)
underlinewhether the text has an underline (PangoAttrInt)
strikethroughwhether the text is struck-through (PangoAttrInt)
risebaseline displacement (PangoAttrInt)
shapeshape (PangoAttrShape)
scalefont size scale factor (PangoAttrFloat)
fallbackwhether fallback is enabled (PangoAttrInt)
letter-spacingletter spacing (PangoAttrInt)
underline-colorunderline color (PangoAttrColor)
strikethrough-colorstrikethrough color (PangoAttrColor)
absolute-sizefont size in pixels scaled by PANGO_SCALE (PangoAttrInt)
gravitybase text gravity (PangoAttrInt)
gravity-hintgravity hint (PangoAttrInt)
PangoUnderlinethe PangoUnderline enumeration is used to specify
whether text should be underlined, and if so, the type
of underlining.
noneno underline should be drawn
singlea single underline should be drawn
doublea double underline should be drawn
lowa 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. PANGO_UNDERLINE_SINGLE should
be used for extended portions of text.
PangoAttrDataCopyFunc(data)A copy function passed to attribute new functions that take user data.
data[R object] the user data
Returns: [R object] a new copy of data.
PangoAttrFilterFunc(attribute, data)A predicate function used by pangoAttrListFilter
to filter out a subset of attributes for a list.
attributedata[R object] callback data passed to pangoAttrListFilter
Returns: [logical] TRUE if the attribute should be filtered out
Derived by RGtkGen from GTK+ documentation
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.