Name
Engines -- language-specific and rendering-system-specific processing.
Description
Pango utilizes a module architecture in which the language-specific
and render-system-specific components are provided by loadable
modules. Each loadable module supplies one or more
engines. Each engine
has an associated engine type and
render type. These two types are represented by
strings.
Each dynamically-loaded module exports several functions which provide
the public API. These functions are script_engine_list(),
script_engine_load() and script_engine_unload(). The latter two
functions are used for loading and unloading modules, while the first
function is used when building a catalog of all available modules.
Details
struct PangoEngineInfo
struct PangoEngineInfo
{
gchar *id;
gchar *engine_type;
gchar *render_type;
PangoEngineRange *ranges;
gint n_ranges;
}; |
The PangoEngineInfo structure contains information about a particular
engine. It contains the following fields:
struct PangoEngineRange
struct PangoEngineRange
{
guint32 start;
guint32 end;
gchar *langs;
}; |
The PangoEngineRange structure contains
information about a range of Unicode code
points. It contains the following fields:
struct PangoEngine
struct PangoEngine
{
gchar *id;
gchar *type;
gint length;
}; |
The PangoEngine structure contains basic
information common to all script engines. It
contains the following fields:
struct PangoEngineLang
struct PangoEngineLang
{
PangoEngine engine;
void (*script_break) (const char *text,
int len,
PangoAnalysis *analysis,
PangoLogAttr *attrs);
}; |
The PangoEngineLang structure extents the
basic PangoEngine structure to engines that
deal with the rendering-system independent part
of of the rendering pipeline. It contains the following fields:
struct PangoEngineShape
struct PangoEngineShape
{
PangoEngine engine;
void (*script_shape) (PangoFont *font,
const char *text,
int length,
PangoAnalysis *analysis,
PangoGlyphString *glyphs);
PangoCoverage *(*get_coverage) (PangoFont *font,
const char *lang);
}; |
The PangoEngineShape structure extents the
basic PangoEngine structure to engines that
deal with the rendering-system dependent part
of of the rendering pipeline. It contains the following fields:
PANGO_ENGINE_TYPE_LANG
#define PANGO_ENGINE_TYPE_LANG "PangoEngineLang" |
A string constant defining the engine type
for language engines.
These engines have a engine structure of
type PangoEngineLang.
PANGO_ENGINE_TYPE_SHAPE
#define PANGO_ENGINE_TYPE_SHAPE "PangoEngineShape" |
A string constant defining the engine type
for shaping engines.
These engines have a engine structure of
type PangoEngineShape.
PANGO_RENDER_TYPE_NONE
#define PANGO_RENDER_TYPE_NONE "PangoRenderNone" |
A string constant defining the render type
for engines that are not rendering-system
specific.
script_engine_list ()
Function to be provided by a module to list the engines that the
module supplies. The function stores a pointer to an array
of PangoEngineInfo structures and the length of that array in
the given location.
script_engine_load ()
Function to be provided by a module to load a particular engine.
script_engine_unload ()
Function to be provided by a module to unload an engine loaded
with script_engine_load().