<HTML ><HEAD ><TITLE >Engines</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Pango Reference Manual" HREF="index.html"><LINK REL="UP" TITLE="Low Level Functionality" HREF="lowlevel.html"><LINK REL="PREVIOUS" TITLE="Coverage Maps" HREF="pango-coverage-maps.html"><LINK REL="NEXT" TITLE="Indic Engine Support" HREF="pango-indic-engine-support.html"></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0" ><TR ><TH COLSPAN="4" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="5" >Pango Reference Manual</FONT ></TH ></TR ><TR ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left" ><A HREF="pango-coverage-maps.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="index.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Home</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="lowlevel.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="pango-indic-engine-support.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ></TABLE ></DIV ><H1 ><A NAME="PANGO-ENGINES" ></A >Engines</H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN10413" ></A ><H2 >Name</H2 >Engines -- language-specific and rendering-system-specific processing.</DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN10416" ></A ><H2 >Synopsis</H2 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="SYNOPSIS" > struct <A HREF="pango-engines.html#PANGOENGINEINFO" >PangoEngineInfo</A >; struct <A HREF="pango-engines.html#PANGOENGINERANGE" >PangoEngineRange</A >; struct <A HREF="pango-engines.html#PANGOENGINE" >PangoEngine</A >; struct <A HREF="pango-engines.html#PANGOENGINELANG" >PangoEngineLang</A >; struct <A HREF="pango-engines.html#PANGOENGINESHAPE" >PangoEngineShape</A >; #define <A HREF="pango-engines.html#PANGO-ENGINE-TYPE-LANG-CAPS" >PANGO_ENGINE_TYPE_LANG</A > #define <A HREF="pango-engines.html#PANGO-ENGINE-TYPE-SHAPE-CAPS" >PANGO_ENGINE_TYPE_SHAPE</A > #define <A HREF="pango-engines.html#PANGO-RENDER-TYPE-NONE-CAPS" >PANGO_RENDER_TYPE_NONE</A > void <A HREF="pango-engines.html#SCRIPT-ENGINE-LIST" >script_engine_list</A > (<A HREF="pango-engines.html#PANGOENGINEINFO" >PangoEngineInfo</A > **engines, int *n_engines); <A HREF="pango-engines.html#PANGOENGINE" >PangoEngine</A >* <A HREF="pango-engines.html#SCRIPT-ENGINE-LOAD" >script_engine_load</A > (const char *id); void <A HREF="pango-engines.html#SCRIPT-ENGINE-UNLOAD" >script_engine_unload</A > (<A HREF="pango-engines.html#PANGOENGINE" >PangoEngine</A > *engine);</PRE ></TD ></TR ></TABLE ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN10433" ></A ><H2 >Description</H2 ><P >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 <I CLASS="FIRSTTERM" >engines</I >. Each <I CLASS="FIRSTTERM" >engine</I > has an associated <I CLASS="FIRSTTERM" >engine type</I > and <I CLASS="FIRSTTERM" >render type</I >. These two types are represented by strings.</P ><P >Each dynamically-loaded module exports several functions which provide the public API. These functions are <A HREF="pango-engines.html#SCRIPT-ENGINE-LIST" >script_engine_list</A >(), <A HREF="pango-engines.html#SCRIPT-ENGINE-LOAD" >script_engine_load</A >() and <A HREF="pango-engines.html#SCRIPT-ENGINE-UNLOAD" >script_engine_unload</A >(). 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.</P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN10444" ></A ><H2 >Details</H2 ><DIV CLASS="REFSECT2" ><A NAME="AEN10446" ></A ><H3 ><A NAME="PANGOENGINEINFO" ></A >struct PangoEngineInfo</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >struct PangoEngineInfo { gchar *id; gchar *engine_type; gchar *render_type; PangoEngineRange *ranges; gint n_ranges; };</PRE ></TD ></TR ></TABLE ><P >The <A HREF="pango-engines.html#PANGOENGINEINFO" >PangoEngineInfo</A > structure contains information about a particular engine. It contains the following fields: <DIV CLASS="INFORMALTABLE" ><A NAME="AEN10452" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFF0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" >gchar *id;</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a unique string ID for the engine.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" >gchar *engine_type;</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a string identifying the engine type.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" >gchar *render type;</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a string identifying the render type.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" ><A HREF="pango-engines.html#PANGOENGINERANGE" >PangoEngineRange</A > *ranges;</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a pointer to an array of <A HREF="pango-engines.html#PANGOENGINERANGE" >PangoEngineRange</A > structures. Each structure contains information about a range of Unicode code points that this engine handles.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" >gint n_ranges;</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the number of elements in <TT CLASS="STRUCTFIELD" ><I >ranges</I ></TT >.</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN10475" ></A ><H3 ><A NAME="PANGOENGINERANGE" ></A >struct PangoEngineRange</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >struct PangoEngineRange { guint32 start; guint32 end; gchar *langs; };</PRE ></TD ></TR ></TABLE ><P >The PangoEngineRange structure contains information about a range of Unicode code points. It contains the following fields: <DIV CLASS="INFORMALTABLE" ><A NAME="AEN10480" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFF0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" >guint32 start;</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the first code point in the range.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" >guint32 end;</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the last code point for the range.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" >gchar *langs;</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >A semicolon separated list of languages that this engine handles for this range. This may be empty, in which case the engine is saying that it is a fallback choice for all languages for this range, but should not be used if another engine indicates that it is specific for the language for a given code point. An entry in this list of "*" indicates that this engine is specific to all languages for this range.</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN10494" ></A ><H3 ><A NAME="PANGOENGINE" ></A >struct PangoEngine</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >struct PangoEngine { gchar *id; gchar *type; gint length; };</PRE ></TD ></TR ></TABLE ><P >The <A HREF="pango-engines.html#PANGOENGINE" >PangoEngine</A > structure contains basic information common to all script engines. It contains the following fields: <DIV CLASS="INFORMALTABLE" ><A NAME="AEN10500" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFF0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" >gchar *id;</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a unique string ID for this language engine.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" >gchar *type;</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The "type" of the engine. (Is this engine type or render type??).</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" >gint length;</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the length of the entire structure in bytes. This is provided so that new functions can be added at the end of subtypes of <A HREF="pango-engines.html#PANGOENGINE" >PangoEngine</A > without breaking older modules.</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN10515" ></A ><H3 ><A NAME="PANGOENGINELANG" ></A >struct PangoEngineLang</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >struct PangoEngineLang { PangoEngine engine; void (*script_break) (const char *text, int len, PangoAnalysis *analysis, PangoLogAttr *attrs, int attrs_len); };</PRE ></TD ></TR ></TABLE ><P >The <A HREF="pango-engines.html#PANGOENGINELANG" >PangoEngineLang</A > structure extends the basic <A HREF="pango-engines.html#PANGOENGINE" >PangoEngine</A > structure to engines that deal with the rendering-system independent part of of the rendering pipeline. It contains the following fields: <DIV CLASS="INFORMALTABLE" ><A NAME="AEN10522" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFF0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" ><A HREF="pango-engines.html#PANGOENGINE" >PangoEngine</A > engine;</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >A nested structure containing basic engine data.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" >void (*script_break) (...);</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >A function that provides an implementation for <A HREF="pango-text-processing.html#PANGO-BREAK" >pango_break</A >().</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN10535" ></A ><H3 ><A NAME="PANGOENGINESHAPE" ></A >struct PangoEngineShape</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >struct PangoEngineShape { PangoEngine engine; void (*script_shape) (PangoFont *font, const char *text, int length, PangoAnalysis *analysis, PangoGlyphString *glyphs); PangoCoverage *(*get_coverage) (PangoFont *font, PangoLanguage *language); };</PRE ></TD ></TR ></TABLE ><P >The <A HREF="pango-engines.html#PANGOENGINESHAPE" >PangoEngineShape</A > structure extends the basic <A HREF="pango-engines.html#PANGOENGINE" >PangoEngine</A > structure to engines that deal with the rendering-system dependent part of of the rendering pipeline. It contains the following fields: <DIV CLASS="INFORMALTABLE" ><A NAME="AEN10542" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFF0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" ><A HREF="pango-engines.html#PANGOENGINE" >PangoEngine</A > engine;</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >A nested structure containing basic engine data.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="LEFT" VALIGN="TOP" > void (*script_shape) (...);</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >A function that provides an implementation for pango_shape.</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN10554" ></A ><H3 ><A NAME="PANGO-ENGINE-TYPE-LANG-CAPS" ></A >PANGO_ENGINE_TYPE_LANG</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >#define PANGO_ENGINE_TYPE_LANG "PangoEngineLang"</PRE ></TD ></TR ></TABLE ><P >A string constant defining the engine type for <I CLASS="FIRSTTERM" >language engines</I >. These engines have a engine structure of type <A HREF="pango-engines.html#PANGOENGINELANG" >PangoEngineLang</A >.</P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN10561" ></A ><H3 ><A NAME="PANGO-ENGINE-TYPE-SHAPE-CAPS" ></A >PANGO_ENGINE_TYPE_SHAPE</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >#define PANGO_ENGINE_TYPE_SHAPE "PangoEngineShape"</PRE ></TD ></TR ></TABLE ><P >A string constant defining the engine type for <I CLASS="FIRSTTERM" >shaping engines</I >. These engines have a engine structure of type <A HREF="pango-engines.html#PANGOENGINESHAPE" >PangoEngineShape</A >.</P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN10568" ></A ><H3 ><A NAME="PANGO-RENDER-TYPE-NONE-CAPS" ></A >PANGO_RENDER_TYPE_NONE</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >#define PANGO_RENDER_TYPE_NONE "PangoRenderNone"</PRE ></TD ></TR ></TABLE ><P >A string constant defining the render type for engines that are not rendering-system specific.</P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN10573" ></A ><H3 ><A NAME="SCRIPT-ENGINE-LIST" ></A >script_engine_list ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void script_engine_list (<A HREF="pango-engines.html#PANGOENGINEINFO" >PangoEngineInfo</A > **engines, int *n_engines);</PRE ></TD ></TR ></TABLE ><P >Function to be provided by a module to list the engines that the module supplies. The function stores a pointer to an array of <A HREF="pango-engines.html#PANGOENGINEINFO" >PangoEngineInfo</A > structures and the length of that array in the given location.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN10580" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >engines</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >location to store a pointer to an array of engines.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >n_engines</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >location to store the number of elements in <TT CLASS="PARAMETER" ><I >engines</I ></TT >. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN10594" ></A ><H3 ><A NAME="SCRIPT-ENGINE-LOAD" ></A >script_engine_load ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><A HREF="pango-engines.html#PANGOENGINE" >PangoEngine</A >* script_engine_load (const char *id);</PRE ></TD ></TR ></TABLE ><P >Function to be provided by a module to load a particular engine.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN10600" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >id</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the ID from the <A HREF="pango-engines.html#PANGOENGINEINFO" >PangoEngineInfo</A > structure of the module to load.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><SPAN CLASS="emphasis" ><I CLASS="EMPHASIS" >Returns</I ></SPAN > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the newly created script engine. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN10614" ></A ><H3 ><A NAME="SCRIPT-ENGINE-UNLOAD" ></A >script_engine_unload ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void script_engine_unload (<A HREF="pango-engines.html#PANGOENGINE" >PangoEngine</A > *engine);</PRE ></TD ></TR ></TABLE ><P >Function to be provided by a module to unload an engine loaded with <A HREF="pango-engines.html#SCRIPT-ENGINE-LOAD" >script_engine_load</A >().</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN10621" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >engine</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the engine to unload. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><BR CLEAR="all"><BR><TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0" ><TR ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left" ><A HREF="pango-coverage-maps.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="index.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Home</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="lowlevel.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="pango-indic-engine-support.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ><TR ><TD COLSPAN="2" ALIGN="left" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Coverage Maps</B ></FONT ></TD ><TD COLSPAN="2" ALIGN="right" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Indic Engine Support</B ></FONT ></TD ></TR ></TABLE ></DIV ></BODY ></HTML >