Back to index

lightning-sunbird  0.9+nobinonly
Classes | Typedefs | Functions
pango-glyph.h File Reference
#include "pango-types.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  _PangoliteGlyphInfo
struct  _PangoliteGlyphString


typedef struct _PangoliteGlyphInfo
typedef struct _PangoliteGlyphString
typedef gint32 PangoliteGlyphUnit


PangoliteGlyphString * pangolite_glyph_string_new (void)
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.
void pangolite_shape (const gunichar2 *text, gint length, PangoliteAnalysis *analysis, PangoliteGlyphString *glyphs)
 pangolite_shape: : the text to process : the length (in bytes) of : #PangoliteAnalysis structure from PangoliteItemize : glyph string in which to store results

Class Documentation

struct _PangoliteGlyphInfo

Definition at line 59 of file pango-glyph.h.

Class Members
PangoliteGlyph glyph
gint is_cluster_start
struct _PangoliteGlyphString

Definition at line 68 of file pango-glyph.h.

Class Members
PangoliteGlyphInfo * glyphs
gint * log_clusters
gint num_glyphs
gint space

Typedef Documentation

typedef struct _PangoliteGlyphInfo

Definition at line 50 of file pango-glyph.h.

typedef struct _PangoliteGlyphString

Definition at line 51 of file pango-glyph.h.

typedef gint32 PangoliteGlyphUnit

Definition at line 54 of file pango-glyph.h.

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.


Here is the caller graph for this function:

PangoliteGlyphString* pangolite_glyph_string_new ( void  )


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;
      string->space *= 2;
    if (string->space < 0)
      g_error("%s: glyph string length overflows maximum integer 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:

void pangolite_shape ( const gunichar2 text,
gint  length,
PangoliteAnalysis *  analysis,
PangoliteGlyphString *  glyphs 

pangolite_shape: : the text to process : the length (in bytes) of : #PangoliteAnalysis structure from PangoliteItemize : glyph string in which to store results

Given a segment of text and the corresponding

PangoliteAnalysis structure returned from pangolite_itemize(),

convert the characters into glyphs. You may also pass in only a substring of the item from pangolite_itemize().

Definition at line 56 of file shape.c.

  if (analysis->shape_engine)
    analysis->shape_engine->script_shape(analysis->fontCharset, text, length, 
                                         analysis, glyphs);
  else {
    pangolite_glyph_string_set_size (glyphs, 1);
    glyphs->glyphs[0].glyph = 0;
    glyphs->log_clusters[0] = 0;
  g_assert (glyphs->num_glyphs > 0);

Here is the call graph for this function: