|  |  |  | Pango Reference Manual |  | 
|---|
| OpenType Font HandlingOpenType Font Handling — Obtaining information from OpenType tables | 
typedef PangoOTTag; PangoOTInfo; PangoOTBuffer; PangoOTGlyph; PangoOTRuleset; enum PangoOTTableType; PangoOTInfo* pango_ot_info_get (FT_Face face);gboolean pango_ot_info_find_script (PangoOTInfo *info, PangoOTTableType table_type, PangoOTTag script_tag,guint *script_index);gboolean pango_ot_info_find_language (PangoOTInfo *info, PangoOTTableType table_type,guint script_index, PangoOTTag language_tag,guint *language_index,guint *required_feature_index);gboolean pango_ot_info_find_feature (PangoOTInfo *info, PangoOTTableType table_type, PangoOTTag feature_tag,guint script_index,guint language_index,guint *feature_index); PangoOTTag* pango_ot_info_list_scripts (PangoOTInfo *info, PangoOTTableType table_type); PangoOTTag* pango_ot_info_list_languages (PangoOTInfo *info, PangoOTTableType table_type,guint script_index, PangoOTTag language_tag); PangoOTTag* pango_ot_info_list_features (PangoOTInfo *info, PangoOTTableType table_type, PangoOTTag tag,guint script_index,guint language_index); PangoOTBuffer* pango_ot_buffer_new (PangoFcFont *font);void pango_ot_buffer_destroy (PangoOTBuffer *buffer);void pango_ot_buffer_clear (PangoOTBuffer *buffer);void pango_ot_buffer_add_glyph (PangoOTBuffer *buffer,guint glyph_index,guint properties,guint cluster);void pango_ot_buffer_set_rtl (PangoOTBuffer *buffer,gboolean rtl);void pango_ot_buffer_set_zero_width_marks (PangoOTBuffer *buffer,gboolean zero_width_marks);void pango_ot_buffer_get_glyphs (PangoOTBuffer *buffer, PangoOTGlyph **glyphs,int *n_glyphs);void pango_ot_buffer_output (PangoOTBuffer *buffer, PangoGlyphString *glyphs); PangoOTRuleset* pango_ot_ruleset_new (PangoOTInfo *info);void pango_ot_ruleset_add_feature (PangoOTRuleset *ruleset, PangoOTTableType table_type,guint feature_index,gulong property_bit);void pango_ot_ruleset_substitute (PangoOTRuleset *ruleset, PangoOTBuffer *buffer);void pango_ot_ruleset_position (PangoOTRuleset *ruleset, PangoOTBuffer *buffer);
typedef guint32 PangoOTTag;
The PangoOTTag typedef is used to represent TrueType and OpenType
four letter tags inside Pango. Use the FT_MAKE_TAG()freetype/freetype.h to 
create PangoOTTags manually.
typedef struct _PangoOTInfo PangoOTInfo;
The PangoOTInfo struct contains the various 
tables associated with an OpenType font. It contains only private fields and
should only be accessed via the pango_ot_info_* functions
which are documented below. To obtain a PangoOTInfo,
use pango_ot_info_new()
typedef struct {
  guint    glyph;
  guint    properties;
  guint    cluster;
  gushort  component;
  gushort  ligID;
  gushort  property_cache;    /* Internal */
} PangoOTGlyph;
typedef struct _PangoOTRuleset PangoOTRuleset;
The pango_ot_ruleset_new(), features are addded
to it with pango_ot_ruleset_add_feature(), then it is
applied to a PangoGlyphString with pango_ot_ruleset_shape()
typedef enum 
{
  PANGO_OT_TABLE_GSUB,
  PANGO_OT_TABLE_GPOS
} PangoOTTableType;
The PangoOTTableType enumeration values are used to
identify the various OpenType tables in the
pango_ot_info_* functions.
| PANGO_OT_TABLE_GSUB | The GSUB table. | 
| PANGO_OT_TABLE_GPOS | The GPOS table. | 
PangoOTInfo* pango_ot_info_get (FT_Face face);
Returns the PangoOTInfo structure for the given FreeType font.
| face: | a | 
| Returns : | the PangoOTInfo for face. This object will
  have the same lifetime asface. | 
Since 1.2
gboolean pango_ot_info_find_script (PangoOTInfo *info, PangoOTTableType table_type, PangoOTTag script_tag,guint *script_index);
Finds the index of a script.
| info: | a PangoOTInfo. | 
| table_type: | the table type to obtain information about. | 
| script_tag: | the tag of the script to find. | 
| script_index: | location to store the index of the script, or NULL. | 
| Returns : | TRUEif the script was found. | 
gboolean pango_ot_info_find_language (PangoOTInfo *info, PangoOTTableType table_type,guint script_index, PangoOTTag language_tag,guint *language_index,guint *required_feature_index);
Finds the index of a language and its required feature index.
| info: | a PangoOTInfo. | 
| table_type: | the table type to obtain information about. | 
| script_index: | the index of the script whose languages are searched. | 
| language_tag: | the tag of the language to find. | 
| language_index: | location to store the index of the language, or NULL. | 
| required_feature_index: | location to store the required feature index of 
   the language, or NULL. | 
| Returns : | TRUEif the language was found. | 
gboolean pango_ot_info_find_feature (PangoOTInfo *info, PangoOTTableType table_type, PangoOTTag feature_tag,guint script_index,guint language_index,guint *feature_index);
Finds the index of a feature.
| info: | a PangoOTInfo. | 
| table_type: | the table type to obtain information about. | 
| feature_tag: | the tag of the feature to find. | 
| script_index: | the index of the script. | 
| language_index: | the index of the language whose features are searched, or 0xffff to use the default language of the script. | 
| feature_index: | location to store the index of the feature, or NULL. | 
| Returns : | TRUEif the feature was found. | 
PangoOTTag* pango_ot_info_list_scripts (PangoOTInfo *info, PangoOTTableType table_type);
Obtains the list of available scripts.
| info: | a PangoOTInfo. | 
| table_type: | the table type to obtain information about. | 
| Returns : | a newly-allocated array containing the tags of the available scripts. | 
PangoOTTag* pango_ot_info_list_languages (PangoOTInfo *info, PangoOTTableType table_type,guint script_index, PangoOTTag language_tag);
Obtains the list of available languages for a given script.
| info: | a PangoOTInfo. | 
| table_type: | the table type to obtain information about. | 
| script_index: | the index of the script to list languages for. | 
| language_tag: | unused parameter. | 
| Returns : | a newly-allocated array containing the tags of the available languages. | 
PangoOTTag* pango_ot_info_list_features (PangoOTInfo *info, PangoOTTableType table_type, PangoOTTag tag,guint script_index,guint language_index);
Obtains the list of features for the given language of the given script.
| info: | a PangoOTInfo. | 
| table_type: | the table type to obtain information about. | 
| tag: | unused parameter. | 
| script_index: | the index of the script to obtain information about. | 
| language_index: | the indes of the language to list features for, or 0xffff, to list features for the default language of the script. | 
| Returns : | a newly-allocated array containing the tags of the available features. | 
PangoOTBuffer* pango_ot_buffer_new (PangoFcFont *font);
| font: | a PangoFcFont | 
| Returns : | the new PangoOTBuffer | 
Since 1.4
void pango_ot_buffer_destroy (PangoOTBuffer *buffer);
| buffer: | a PangoOTBuffer | 
Since 1.4
void pango_ot_buffer_clear (PangoOTBuffer *buffer);
| buffer: | a PangoOTBuffer | 
Since 1.4
void pango_ot_buffer_add_glyph (PangoOTBuffer *buffer,guint glyph_index,guint properties,guint cluster);
| buffer: | a PangoOTBuffer | 
| glyph_index: | |
| properties: | |
| cluster: | 
Since 1.4
void pango_ot_buffer_set_rtl (PangoOTBuffer *buffer,gboolean rtl);
| buffer: | a PangoOTBuffer | 
| rtl: | TRUEfor right-to-left | 
Since 1.4
void pango_ot_buffer_set_zero_width_marks (PangoOTBuffer *buffer,gboolean zero_width_marks);
Sets whether characters with a mark class should be forced to zero width. This setting is needed for proper positioning of Arabic accents, but will produce incorrect results with standard OpenType indic fonts.
| buffer: | a PangoOTBuffer | 
| zero_width_marks: | TRUEif characters with a mark class should
 be forced to zero width. | 
Since 1.6
void pango_ot_buffer_get_glyphs (PangoOTBuffer *buffer, PangoOTGlyph **glyphs,int *n_glyphs);
| buffer: | a PangoOTBuffer | 
| glyphs: | |
| n_glyphs: | 
Since 1.4
void pango_ot_buffer_output (PangoOTBuffer *buffer, PangoGlyphString *glyphs);
| buffer: | a PangoOTBuffer | 
| glyphs: | a PangoGlyphString | 
Since 1.4
PangoOTRuleset* pango_ot_ruleset_new (PangoOTInfo *info);
Creates a new PangoOTRuleset for the given OpenType info.
| info: | a PangoOTInfo. | 
| Returns : | a new PangoOTRuleset. | 
void pango_ot_ruleset_add_feature (PangoOTRuleset *ruleset, PangoOTTableType table_type,guint feature_index,gulong property_bit);
Adds a feature to the ruleset.
| ruleset: | a PangoOTRuleset. | 
| table_type: | the table type to add a feature to. | 
| feature_index: | the index of the feature to add. | 
| property_bit: | the property bit to use for this feature. Used to identify the glyphs that this feature should be applied to. | 
void pango_ot_ruleset_substitute (PangoOTRuleset *ruleset, PangoOTBuffer *buffer);
| ruleset: | a PangoOTRuleset. | 
| buffer: | a PangoOTBuffer. | 
Since 1.4
void pango_ot_ruleset_position (PangoOTRuleset *ruleset, PangoOTBuffer *buffer);
| ruleset: | a PangoOTRuleset. | 
| buffer: | a PangoOTBuffer. | 
Since 1.4
| << PangoFcDecoder | Coverage Maps >> |