Back to index

lightning-sunbird  0.9+nobinonly
Functions
glyphstring.c File Reference
#include <glib.h>
#include "pango-glyph.h"

Go to the source code of this file.

Functions

PangoliteGlyphString * pangolite_glyph_string_new (void)
 pangolite_glyph_string_new:
void pangolite_glyph_string_set_size (PangoliteGlyphString *string, gint new_len)
 pangolite_glyph_string_set_size: : a PangoliteGlyphString.
void pangolite_glyph_string_free (PangoliteGlyphString *string)
 pangolite_glyph_string_free: : a PangoliteGlyphString.

Function Documentation

void pangolite_glyph_string_free ( PangoliteGlyphString *  string)

pangolite_glyph_string_free: : a PangoliteGlyphString.

Free a glyph string and associated storage.

Definition at line 100 of file glyphstring.c.

{
  g_free(string->glyphs);
  g_free(string->log_clusters);
  g_free(string);
}

Here is the caller graph for this function:

PangoliteGlyphString* pangolite_glyph_string_new ( void  )

pangolite_glyph_string_new:

Create a new PangoliteGlyphString.

Returns the new PangoliteGlyphString

Definition at line 52 of file glyphstring.c.

{
  PangoliteGlyphString *string = g_new(PangoliteGlyphString, 1);
  
  string->num_glyphs = 0;
  string->space = 0;
  string->glyphs = NULL;
  string->log_clusters = NULL;
  return string;
}

Here is the caller graph for this function:

void pangolite_glyph_string_set_size ( PangoliteGlyphString *  string,
gint  new_len 
)

pangolite_glyph_string_set_size: : a PangoliteGlyphString.

: the new length of the string.

Resize a glyph string to the given length.

Definition at line 71 of file glyphstring.c.

{
  g_return_if_fail (new_len >= 0);

  while (new_len > string->space) {
    if (string->space == 0)
      string->space = 1;
    else
      string->space *= 2;
    
    if (string->space < 0)
      g_error("%s: glyph string length overflows maximum integer size", 
              "pangolite_glyph_string_set_size");
  }
  
  string->glyphs = g_realloc(string->glyphs, 
                             string->space * sizeof(PangoliteGlyphInfo));
  string->log_clusters = g_realloc(string->log_clusters, 
                                   string->space * sizeof (gint));
  string->num_glyphs = new_len;
}

Here is the caller graph for this function: