Functions
PANGO_OT_TAG_MAKE()
#define PANGO_OT_TAG_MAKE(c1,c2,c3,c4) ((PangoOTTag) FT_MAKE_TAG (c1, c2, c3, c4))
PANGO_OT_TAG_MAKE is deprecated and should not be used in newly-written code.
Creates a PangoOTTag from four characters. This is similar and
compatible with the FT_MAKE_TAG() macro from FreeType.
PANGO_OT_TAG_MAKE_FROM_STRING()
#define PANGO_OT_TAG_MAKE_FROM_STRING(s)
PANGO_OT_TAG_MAKE_FROM_STRING is deprecated and should not be used in newly-written code.
Creates a PangoOTTag from a string. The string should be at least
four characters long (pad with space characters if needed), and need
not be nul-terminated. This is a convenience wrapper around
PANGO_OT_TAG_MAKE(), but cannot be used in certain situations, for
example, as a switch expression, as it dereferences pointers.
pango_ot_info_get ()
PangoOTInfo *
pango_ot_info_get (FT_Face face);
pango_ot_info_get is deprecated and should not be used in newly-written code.
Returns the PangoOTInfo structure for the given FreeType font face.
Returns
the PangoOTInfo for face
. This object
will have the same lifetime as face
.
[transfer none]
Since: 1.2
pango_ot_info_find_script ()
gboolean
pango_ot_info_find_script (PangoOTInfo *info,
PangoOTTableType table_type,
PangoOTTag script_tag,
guint *script_index);
pango_ot_info_find_script is deprecated and should not be used in newly-written code.
Finds the index of a script. If not found, tries to find the 'DFLT'
and then 'dflt' scripts and return the index of that in script_index
.
If none of those is found either, PANGO_OT_NO_SCRIPT is placed in
script_index
.
All other functions taking an input script_index parameter know
how to handle PANGO_OT_NO_SCRIPT, so one can ignore the return
value of this function completely and proceed, to enjoy the automatic
fallback to the 'DFLT'/'dflt' script.
Returns
TRUE if the script was found.
pango_ot_info_find_language ()
gboolean
pango_ot_info_find_language (PangoOTInfo *info,
PangoOTTableType table_type,
guint script_index,
PangoOTTag language_tag,
guint *language_index,
guint *required_feature_index);
pango_ot_info_find_language is deprecated and should not be used in newly-written code.
Finds the index of a language and its required feature index.
If the language is not found, sets language_index
to
PANGO_OT_DEFAULT_LANGUAGE and the required feature of the default language
system is returned in required_feature_index. For best compatibility with
some fonts, also searches the language system tag 'dflt' before falling
back to the default language system, but that is transparent to the user.
The user can simply ignore the return value of this function to
automatically fall back to the default language system.
Returns
TRUE if the language was found.
pango_ot_info_find_feature ()
gboolean
pango_ot_info_find_feature (PangoOTInfo *info,
PangoOTTableType table_type,
PangoOTTag feature_tag,
guint script_index,
guint language_index,
guint *feature_index);
pango_ot_info_find_feature is deprecated and should not be used in newly-written code.
Finds the index of a feature. If the feature is not found, sets
feature_index
to PANGO_OT_NO_FEATURE, which is safe to pass to
pango_ot_ruleset_add_feature() and similar functions.
In the future, this may set feature_index
to an special value that if used
in pango_ot_ruleset_add_feature() will ask Pango to synthesize the
requested feature based on Unicode properties and data. However, this
function will still return FALSE in those cases. So, users may want to
ignore the return value of this function in certain cases.
Returns
TRUE if the feature was found.
pango_ot_info_list_scripts ()
PangoOTTag *
pango_ot_info_list_scripts (PangoOTInfo *info,
PangoOTTableType table_type);
pango_ot_info_list_scripts is deprecated and should not be used in newly-written code.
Obtains the list of available scripts.
Returns
a newly-allocated zero-terminated array containing the tags of the
available scripts. Should be freed using g_free().
pango_ot_info_list_languages ()
PangoOTTag *
pango_ot_info_list_languages (PangoOTInfo *info,
PangoOTTableType table_type,
guint script_index,
PangoOTTag language_tag);
pango_ot_info_list_languages is deprecated and should not be used in newly-written code.
Obtains the list of available languages for a given script.
Returns
a newly-allocated zero-terminated array containing the tags of the
available languages. Should be freed using g_free().
pango_ot_info_list_features ()
PangoOTTag *
pango_ot_info_list_features (PangoOTInfo *info,
PangoOTTableType table_type,
PangoOTTag tag,
guint script_index,
guint language_index);
pango_ot_info_list_features is deprecated and should not be used in newly-written code.
Obtains the list of features for the given language of the given script.
Returns
a newly-allocated zero-terminated array containing the tags of the
available features. Should be freed using g_free().
pango_ot_buffer_new ()
PangoOTBuffer *
pango_ot_buffer_new (PangoFcFont *font);
pango_ot_buffer_new is deprecated and should not be used in newly-written code.
Creates a new PangoOTBuffer for the given OpenType font.
Since: 1.4
pango_ot_buffer_destroy ()
void
pango_ot_buffer_destroy (PangoOTBuffer *buffer);
pango_ot_buffer_destroy is deprecated and should not be used in newly-written code.
Destroys a PangoOTBuffer and free all associated memory.
Since: 1.4
pango_ot_buffer_clear ()
void
pango_ot_buffer_clear (PangoOTBuffer *buffer);
pango_ot_buffer_clear is deprecated and should not be used in newly-written code.
Empties a PangoOTBuffer, make it ready to add glyphs to.
Since: 1.4
pango_ot_buffer_add_glyph ()
void
pango_ot_buffer_add_glyph (PangoOTBuffer *buffer,
guint glyph,
guint properties,
guint cluster);
pango_ot_buffer_add_glyph is deprecated and should not be used in newly-written code.
Appends a glyph to a PangoOTBuffer, with properties
identifying which
features should be applied on this glyph. See pango_ot_ruleset_add_feature().
Since: 1.4
pango_ot_buffer_set_rtl ()
void
pango_ot_buffer_set_rtl (PangoOTBuffer *buffer,
gboolean rtl);
pango_ot_buffer_set_rtl is deprecated and should not be used in newly-written code.
Sets whether glyphs will be rendered right-to-left. This setting
is needed for proper horizontal positioning of right-to-left scripts.
Since: 1.4
pango_ot_buffer_set_zero_width_marks ()
void
pango_ot_buffer_set_zero_width_marks (PangoOTBuffer *buffer,
gboolean zero_width_marks);
pango_ot_buffer_set_zero_width_marks is deprecated and should not be used in newly-written code.
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.
Since: 1.6
pango_ot_buffer_get_glyphs ()
void
pango_ot_buffer_get_glyphs (const PangoOTBuffer *buffer,
PangoOTGlyph **glyphs,
int *n_glyphs);
pango_ot_buffer_get_glyphs is deprecated and should not be used in newly-written code.
Gets the glyph array contained in a PangoOTBuffer. The glyphs are
owned by the buffer and should not be freed, and are only valid as long
as buffer is not modified.
Since: 1.4
pango_ot_buffer_output ()
void
pango_ot_buffer_output (const PangoOTBuffer *buffer,
PangoGlyphString *glyphs);
pango_ot_buffer_output is deprecated and should not be used in newly-written code.
Exports the glyphs in a PangoOTBuffer into a PangoGlyphString. This is
typically used after the OpenType layout processing is over, to convert the
resulting glyphs into a generic Pango glyph string.
Since: 1.4
pango_ot_ruleset_get_for_description ()
const PangoOTRuleset *
pango_ot_ruleset_get_for_description (PangoOTInfo *info,
const PangoOTRulesetDescription *desc);
pango_ot_ruleset_get_for_description is deprecated and should not be used in newly-written code.
Returns a ruleset for the given OpenType info and ruleset
description. Rulesets are created on demand using
pango_ot_ruleset_new_from_description().
The returned ruleset should not be modified or destroyed.
The static feature map members of desc
should be alive as
long as info
is.
Returns
the PangoOTRuleset for desc
. This object will have
the same lifetime as info
.
Since: 1.18
pango_ot_ruleset_new ()
PangoOTRuleset *
pango_ot_ruleset_new (PangoOTInfo *info);
pango_ot_ruleset_new is deprecated and should not be used in newly-written code.
Creates a new PangoOTRuleset for the given OpenType info.
pango_ot_ruleset_new_for ()
PangoOTRuleset *
pango_ot_ruleset_new_for (PangoOTInfo *info,
PangoScript script,
PangoLanguage *language);
pango_ot_ruleset_new_for is deprecated and should not be used in newly-written code.
Creates a new PangoOTRuleset for the given OpenType info, script, and
language.
This function is part of a convenience scheme that highly simplifies
using a PangoOTRuleset to represent features for a specific pair of script
and language. So one can use this function passing in the script and
language of interest, and later try to add features to the ruleset by just
specifying the feature name or tag, without having to deal with finding
script, language, or feature indices manually.
In excess to what pango_ot_ruleset_new() does, this function will:
Because of the way return values of pango_ot_info_find_script() and
pango_ot_info_find_language() are ignored, this function automatically
finds and uses the 'DFLT' script and the default language-system.
Since: 1.18
pango_ot_ruleset_new_from_description ()
PangoOTRuleset *
pango_ot_ruleset_new_from_description (PangoOTInfo *info,
const PangoOTRulesetDescription *desc);
pango_ot_ruleset_new_from_description is deprecated and should not be used in newly-written code.
Creates a new PangoOTRuleset for the given OpenType infor and
matching the given ruleset description.
This is a convenience function that calls pango_ot_ruleset_new_for() and
adds the static GSUB/GPOS features to the resulting ruleset, followed by
adding other features to both GSUB and GPOS.
The static feature map members of desc
should be alive as
long as info
is.
Since: 1.18
pango_ot_ruleset_add_feature ()
void
pango_ot_ruleset_add_feature (PangoOTRuleset *ruleset,
PangoOTTableType table_type,
guint feature_index,
gulong property_bit);
pango_ot_ruleset_add_feature is deprecated and should not be used in newly-written code.
Adds a feature to the ruleset.
pango_ot_ruleset_get_feature_count ()
guint
pango_ot_ruleset_get_feature_count (const PangoOTRuleset *ruleset,
guint *n_gsub_features,
guint *n_gpos_features);
pango_ot_ruleset_get_feature_count is deprecated and should not be used in newly-written code.
Gets the number of GSUB and GPOS features in the ruleset.
Returns
Total number of features in the ruleset
.
Since: 1.18
pango_ot_ruleset_substitute ()
void
pango_ot_ruleset_substitute (const PangoOTRuleset *ruleset,
PangoOTBuffer *buffer);
pango_ot_ruleset_substitute is deprecated and should not be used in newly-written code.
Performs the OpenType GSUB substitution on buffer
using the features
in ruleset
Since: 1.4
pango_ot_ruleset_position ()
void
pango_ot_ruleset_position (const PangoOTRuleset *ruleset,
PangoOTBuffer *buffer);
pango_ot_ruleset_position is deprecated and should not be used in newly-written code.
Performs the OpenType GPOS positioning on buffer
using the features
in ruleset
Since: 1.4
pango_ot_ruleset_description_equal ()
gboolean
pango_ot_ruleset_description_equal (const PangoOTRulesetDescription *desc1,
const PangoOTRulesetDescription *desc2);
pango_ot_ruleset_description_equal is deprecated and should not be used in newly-written code.
Compares two ruleset descriptions for equality.
Two ruleset descriptions are considered equal if the rulesets
they describe are provably identical. This means that their
script, language, and all feature sets should be equal. For static feature
sets, the array addresses are compared directly, while for other
features, the list of features is compared one by one.
(Two ruleset descriptions may result in identical rulesets
being created, but still compare FALSE.)
Returns
TRUE if two ruleset descriptions are identical,
FALSE otherwise.
Since: 1.18
pango_ot_tag_from_language ()
PangoOTTag
pango_ot_tag_from_language (PangoLanguage *language);
pango_ot_tag_from_language is deprecated and should not be used in newly-written code.
Finds the OpenType language-system tag best describing language
.
Since: 1.18
pango_ot_tag_to_language ()
PangoLanguage *
pango_ot_tag_to_language (PangoOTTag language_tag);
pango_ot_tag_to_language is deprecated and should not be used in newly-written code.
Finds a PangoLanguage corresponding to language_tag
.
Since: 1.18
Types and Values
PangoOTTag
typedef guint32 PangoOTTag;
PangoOTTag is deprecated and should not be used in newly-written code.
The PangoOTTag typedef is used to represent TrueType and OpenType
four letter tags inside Pango. Use PANGO_OT_TAG_MAKE()
or PANGO_OT_TAG_MAKE_FROM_STRING() macros to create PangoOTTags manually.
PangoOTInfo
typedef struct _PangoOTInfo PangoOTInfo;
PangoOTInfo is deprecated and should not be used in newly-written code.
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_get().
PangoOTBuffer
typedef struct _PangoOTBuffer PangoOTBuffer;
PangoOTBuffer is deprecated and should not be used in newly-written code.
The PangoOTBuffer structure is used to store strings of glyphs associated
with a PangoFcFont, suitable for OpenType layout processing. It contains
only private fields and should only be accessed via the
pango_ot_buffer_* functions which are documented below.
To obtain a PangoOTBuffer, use pango_ot_buffer_new().
struct PangoOTGlyph
struct PangoOTGlyph {
guint32 glyph;
guint properties;
guint cluster;
gushort component;
gushort ligID;
guint internal;
};
PangoOTGlyph is deprecated and should not be used in newly-written code.
The PangoOTGlyph structure represents a single glyph together with
information used for OpenType layout processing of the glyph.
It contains the following fields.
PangoOTRuleset
typedef struct _PangoOTRuleset PangoOTRuleset;
PangoOTRuleset is deprecated and should not be used in newly-written code.
The PangoOTRuleset structure holds a
set of features selected from the tables in an OpenType font.
(A feature is an operation such as adjusting glyph positioning
that should be applied to a text feature such as a certain
type of accent.) A PangoOTRuleset
is created with pango_ot_ruleset_new(), features are added
to it with pango_ot_ruleset_add_feature(), then it is
applied to a PangoGlyphString with pango_ot_ruleset_shape().
struct PangoOTRulesetDescription
struct PangoOTRulesetDescription {
PangoScript script;
PangoLanguage *language;
const PangoOTFeatureMap *static_gsub_features;
guint n_static_gsub_features;
const PangoOTFeatureMap *static_gpos_features;
guint n_static_gpos_features;
const PangoOTFeatureMap *other_features;
guint n_other_features;
};
PangoOTRulesetDescription is deprecated and should not be used in newly-written code.
The PangoOTRuleset structure holds all the information needed
to build a complete PangoOTRuleset from an OpenType font.
The main use of this struct is to act as the key for a per-font
hash of rulesets. The user populates a ruleset description and
gets the ruleset using pango_ot_ruleset_get_for_description()
or create a new one using pango_ot_ruleset_new_from_description().
Since: 1.18
enum PangoOTTableType
PangoOTTableType is deprecated and should not be used in newly-written code.
The PangoOTTableType enumeration values are used to
identify the various OpenType tables in the
pango_ot_info_* functions.
struct PangoOTFeatureMap
struct PangoOTFeatureMap {
char feature_name[5];
gulong property_bit;
};
PangoOTFeatureMap is deprecated and should not be used in newly-written code.
The PangoOTFeatureMap typedef is used to represent an OpenType
feature with the property bit associated with it. The feature tag is
represented as a char array instead of a PangoOTTag for convenience.
Since: 1.18
PANGO_OT_ALL_GLYPHS
#define PANGO_OT_ALL_GLYPHS ((guint) 0xFFFF)
PANGO_OT_ALL_GLYPHS is deprecated and should not be used in newly-written code.
This is used as the property bit in pango_ot_ruleset_add_feature() when a
feature should be applied to all glyphs.
Since: 1.16
PANGO_OT_NO_FEATURE
#define PANGO_OT_NO_FEATURE ((guint) 0xFFFF)
PANGO_OT_NO_FEATURE is deprecated and should not be used in newly-written code.
This is used as a feature index that represent no feature, that is, should be
skipped. It may be returned as feature index by pango_ot_info_find_feature()
if the feature is not found, and pango_ot_ruleset_add_feature() function
automatically skips this value, so no special handling is required by the user.
Since: 1.18
PANGO_OT_NO_SCRIPT
#define PANGO_OT_NO_SCRIPT ((guint) 0xFFFF)
PANGO_OT_NO_SCRIPT is deprecated and should not be used in newly-written code.
This is used as a script index that represent no script, that is, when the
requested script was not found, and a default ('DFLT') script was not found
either. It may be returned as script index by pango_ot_info_find_script()
if the script or a default script are not found, all other functions
taking a script index essentially return if the input script index is
this value, so no special handling is required by the user.
Since: 1.18
PANGO_OT_TAG_DEFAULT_LANGUAGE
#define PANGO_OT_TAG_DEFAULT_LANGUAGE PANGO_OT_TAG_MAKE ('d', 'f', 'l', 't')
PANGO_OT_TAG_DEFAULT_LANGUAGE is deprecated and should not be used in newly-written code.
This is a PangoOTTag representing a special language tag 'dflt'. It is
returned as language tag by pango_ot_tag_from_language() if the requested
language is not found. It is safe to pass this value to
pango_ot_info_find_language() as that function falls back to returning default
language-system if the requested language tag is not found.
Since: 1.18
PANGO_OT_TAG_DEFAULT_SCRIPT
#define PANGO_OT_TAG_DEFAULT_SCRIPT PANGO_OT_TAG_MAKE ('D', 'F', 'L', 'T')
PANGO_OT_TAG_DEFAULT_SCRIPT is deprecated and should not be used in newly-written code.
This is a PangoOTTag representing the special script tag 'DFLT'. It is
returned as script tag by pango_ot_tag_from_script() if the requested script
is not found.
Since: 1.18