## Pango Extras Pango Extras |

## Functions

void | go_create_std_tags_for_buffer ()
void | go_load_pango_attributes_into_buffer ()
void | go_pango_attr_list_erase ()
gboolean | go_pango_attr_list_is_empty ()
void | go_pango_attr_list_open_hole ()
void | go_pango_attr_list_unset ()
PangoAttrType | go_pango_attr_subscript_get_attr_type ()
PangoAttribute * | go_pango_attr_subscript_new ()
PangoAttrType | go_pango_attr_superscript_get_attr_type ()
PangoAttribute * | go_pango_attr_superscript_new ()
char * | go_pango_attrs_to_markup ()
PangoAttrList * | go_pango_translate_attributes ()
void | go_pango_translate_layout ()

## Description

## Functions

### go_create_std_tags_for_buffer ()

    void
    go_create_std_tags_for_buffer (GtkTextBuffer *buffer);

Creates standard tags for `buffer` based on Pango attributes.

#### Parameters

buffer | GtkTextBuffer |

### go_load_pango_attributes_into_buffer ()

    void
    go_load_pango_attributes_into_buffer (PangoAttrList *markup,
                                          GtkTextBuffer *buffer,
                                          gchar const *str);

Applies attributes from `markup` to `buffer` .

#### Parameters

markup | PangoAttrList |
buffer | GtkTextBuffer |
str | text corresponding to `markup` |

### go_pango_attr_list_erase ()

    void
    go_pango_attr_list_erase (PangoAttrList *attrs,
                              guint pos,
                              guint len);

This function erases a segment of attributes. This is what to call after deleting a segment from the text described by the attributes.

#### Parameters

attrs | An attribute list |
pos | a text position in bytes |
len | length of segment in bytes |

### go_pango_attr_list_is_empty ()

    gboolean
    go_pango_attr_list_is_empty (const PangoAttrList *attrs);

Checks if `attrs` is `NULL` or contains no attributes.

#### Parameters

attrs | PangoAttrList. | [nullable]

#### Returns

`TRUE` if `attrs` is empty.

### go_pango_attr_list_open_hole ()

    void
    go_pango_attr_list_open_hole (PangoAttrList *tape,
                                  guint pos,
                                  guint len);

This function opens up a blank segment of attributes. This is what to call after inserting a segment into the text described by the attributes.

#### Parameters

tape | An attribute list |
pos | a text position in bytes |
len | length of segment in bytes |

### go_pango_attr_list_unset ()

    void
    go_pango_attr_list_unset (PangoAttrList *list,
                              gint start,
                              gint end,
                              PangoAttrType type);

See http://bugzilla.gnome.org/show_bug.cgi?id=163679

#### Parameters

list | PangoAttrList |
start | starting character index |
end | last character index |
type | PangoAttrType |

### go_pango_attr_subscript_get_attr_type ()

    PangoAttrType
    go_pango_attr_subscript_get_attr_type (void);

#### Returns

the PangoAttrType for subscript attributes.

### go_pango_attr_subscript_new ()

    PangoAttribute *
    go_pango_attr_subscript_new (gboolean val);

[skip]

#### Parameters

val | `TRUE` if the characters must be lowered. |

#### Returns

a subscript attribute.

[transfer full]

### go_pango_attr_superscript_get_attr_type ()

    PangoAttrType
    go_pango_attr_superscript_get_attr_type
                                   (void);

#### Returns

the PangoAttrType for superscript attributes.

### go_pango_attr_superscript_new ()

    PangoAttribute *
    go_pango_attr_superscript_new (gboolean val);

[skip]

#### Parameters

val | `TRUE` if the characters must be raised. |

#### Returns

a superscript attribute.

[transfer full]

### go_pango_attrs_to_markup ()

    char *
    go_pango_attrs_to_markup (PangoAttrList *attrs,
                              char const *text);

### go_pango_translate_attributes ()

    PangoAttrList *
    go_pango_translate_attributes (PangoAttrList *attrs);

Translates superscript and subscript attributes into scale and rise attributes that Pango can handle.

#### Parameters

attrs | PangoAttrList. | [nullable]

#### Returns

a new PangoAttrList or `attrs` .

[transfer full][nullable]

### go_pango_translate_layout ()

    void
    go_pango_translate_layout (PangoLayout *layout);

Translates superscript and subscript attributes in `layout` into scale and rise attributes.

#### Parameters

layout | PangoLayout |