| Pango Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> | 
| #define PANGO_ZERO_WIDTH_NON_JOINER #define PANGO_ZERO_WIDTH_JOINER struct PangoIndicScript; void pango_indic_shift_vowels (PangoIndicScript *script, gunichar *chars, gunichar *end); void pango_indic_compact (PangoIndicScript *script, int *num, gunichar *chars, int *cluster); void pango_indic_convert_vowels (PangoIndicScript *script, gboolean in_middle, int *num, gunichar *chars, gboolean has_standalone_vowels); void pango_indic_split_out_characters (PangoIndicScript *script, const gchar *text, int n_chars, gunichar **wc, int *n_glyph, PangoGlyphString *glyphs); | 
| #define PANGO_ZERO_WIDTH_NON_JOINER 0x200c | 
The Unicode character 'ZERO WIDTH NON-JOINER', 0x200c.
| #define PANGO_ZERO_WIDTH_JOINER 0x200d | 
The Unicode character 'ZERO WIDTH JOINER', 0x200d.
| struct PangoIndicScript {
  /* Compulsory */
  gchar *name;
  /* Compulsory */
  gboolean (*is_prefixing_vowel)  (gunichar  what);
  /* Compulsory */
  gboolean (*is_vowel_sign)       (gunichar  what);
  /* Optional */
  gunichar (*vowel_sign_to_matra) (gunichar  what);
  /* Optional */
  gboolean (*is_vowel_half)       (gunichar  what);
  
  /* Optional */
  gboolean (*vowel_split)         (gunichar  what, 
                                   gunichar *prefix, 
                                   gunichar *suffix);
}; | 
| void pango_indic_shift_vowels (PangoIndicScript *script, gunichar *chars, gunichar *end); | 
This causes the any vowels in chars which are left-joining vowels to move to the start of chars.
It determines whether the vowels are left-joining by calling is_prefixing_vowel from script.
| script : | A PangoIndicScript | 
| chars : | Array of gunichar | 
| end : | Pointer to just after the end of chars | 
| void pango_indic_compact (PangoIndicScript *script, int *num, gunichar *chars, int *cluster); | 
This eliminates any blank space in the chars array, updated clusters and num also. (Blank space is defines as U+0000)
| script : | A PangoIndicScript | 
| num : | The number of glyphs | 
| chars : | An array of glyphs/characters | 
| cluster : | The cluster array. | 
| void pango_indic_convert_vowels (PangoIndicScript *script, gboolean in_middle, int *num, gunichar *chars, gboolean has_standalone_vowels); | 
This converts the second two vowel signs in a row in a string, to either a vowel letter or spacing forms of the combining vowel.
| script : | A PangoIndicScript | 
| in_middle : | Whether vowels should be converted | 
| num : | The number of elements in chars. | 
| chars : | An array of glyphs/characters | 
| has_standalone_vowels : | Whether the font has standalone vowels. | 
| void        pango_indic_split_out_characters
                                            (PangoIndicScript *script,
                                             const gchar *text,
                                             int n_chars,
                                             gunichar **wc,
                                             int *n_glyph,
                                             PangoGlyphString *glyphs); | 
This splits out the string text into characters. It will split out two-part vowels using script->vowel_split if this function is available.
*n_chars is allocated with g_new, you must free it.
| script : | A PangoIndicScript | 
| text : | A UTF-8 string | 
| n_chars : | The number of UTF-8 sequences in text | 
| wc : | Pointer to array of gunichar (output param) | 
| n_glyph : | Pointer to number of elements in wc. (output param) | 
| glyphs : | A PangoGlyphString. |