⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pango-opentype-font-handling.html

📁 GTK+-2.0源码之pango-1.15.6.tar.gz
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>OpenType Font Handling</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"><link rel="start" href="index.html" title="Pango Reference Manual"><link rel="up" href="lowlevel.html" title="Low Level Functionality"><link rel="prev" href="PangoFcDecoder.html" title="PangoFcDecoder"><link rel="next" href="pango-Coverage-Maps.html" title="Coverage Maps"><meta name="generator" content="GTK-Doc V1.6 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="chapter" href="pango.html" title="Basic Pango Interfaces"><link rel="chapter" href="rendering.html" title="Rendering with Pango"><link rel="chapter" href="lowlevel.html" title="Low Level Functionality"><link rel="chapter" href="tools.html" title="Pango Tools"><link rel="index" href="ix01.html" title="Index"><link rel="index" href="ix02.html" title="Index of deprecated symbols"><link rel="index" href="ix03.html" title="Index of new symbols in 1.2"><link rel="index" href="ix04.html" title="Index of new symbols in 1.4"><link rel="index" href="ix05.html" title="Index of new symbols in 1.6"><link rel="index" href="ix06.html" title="Index of new symbols in 1.8"><link rel="index" href="ix07.html" title="Index of new symbols in 1.10"><link rel="index" href="ix08.html" title="Index of new symbols in 1.12"><link rel="index" href="ix09.html" title="Index of new symbols in 1.14"><link rel="index" href="ix10.html" title="Index of new symbols in 1.16"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="PangoFcDecoder.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="lowlevel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">Pango Reference Manual</th><td><a accesskey="n" href="pango-Coverage-Maps.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr><tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>                  &#160;|&#160;                  <a href="#desc" class="shortcut">Description</a></nobr></td></tr></table><div class="refentry" lang="en"><a name="pango-OpenType-Font-Handling"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle"><a name="top_of_page"></a>OpenType Font Handling</span></h2><p>OpenType Font Handling &#8212; Obtaining information from OpenType tables</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><pre class="synopsis">typedef     <a href="pango-OpenType-Font-Handling.html#PangoOTTag">PangoOTTag</a>;            <a href="pango-OpenType-Font-Handling.html#PangoOTInfo">PangoOTInfo</a>;            <a href="pango-OpenType-Font-Handling.html#PangoOTBuffer">PangoOTBuffer</a>;            <a href="pango-OpenType-Font-Handling.html#PangoOTGlyph">PangoOTGlyph</a>;            <a href="pango-OpenType-Font-Handling.html#PangoOTRuleset">PangoOTRuleset</a>;enum        <a href="pango-OpenType-Font-Handling.html#PangoOTTableType">PangoOTTableType</a>;#define     <a href="pango-OpenType-Font-Handling.html#PANGO-OT-ALL-GLYPHS:CAPS">PANGO_OT_ALL_GLYPHS</a>#define     <a href="pango-OpenType-Font-Handling.html#PANGO-OT-DEFAULT-LANGUAGE:CAPS">PANGO_OT_DEFAULT_LANGUAGE</a><a href="pango-OpenType-Font-Handling.html#PangoOTInfo">PangoOTInfo</a>* <a href="pango-OpenType-Font-Handling.html#pango-ot-info-get">pango_ot_info_get</a>              (FT_Face face);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>    <a href="pango-OpenType-Font-Handling.html#pango-ot-info-find-script">pango_ot_info_find_script</a>       (<a href="pango-OpenType-Font-Handling.html#PangoOTInfo">PangoOTInfo</a> *info,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTTableType">PangoOTTableType</a> table_type,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTTag">PangoOTTag</a> script_tag,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> *script_index);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>    <a href="pango-OpenType-Font-Handling.html#pango-ot-info-find-language">pango_ot_info_find_language</a>     (<a href="pango-OpenType-Font-Handling.html#PangoOTInfo">PangoOTInfo</a> *info,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTTableType">PangoOTTableType</a> table_type,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> script_index,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTTag">PangoOTTag</a> language_tag,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> *language_index,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> *required_feature_index);<ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>    <a href="pango-OpenType-Font-Handling.html#pango-ot-info-find-feature">pango_ot_info_find_feature</a>      (<a href="pango-OpenType-Font-Handling.html#PangoOTInfo">PangoOTInfo</a> *info,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTTableType">PangoOTTableType</a> table_type,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTTag">PangoOTTag</a> feature_tag,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> script_index,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> language_index,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> *feature_index);<a href="pango-OpenType-Font-Handling.html#PangoOTTag">PangoOTTag</a>* <a href="pango-OpenType-Font-Handling.html#pango-ot-info-list-scripts">pango_ot_info_list_scripts</a>      (<a href="pango-OpenType-Font-Handling.html#PangoOTInfo">PangoOTInfo</a> *info,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTTableType">PangoOTTableType</a> table_type);<a href="pango-OpenType-Font-Handling.html#PangoOTTag">PangoOTTag</a>* <a href="pango-OpenType-Font-Handling.html#pango-ot-info-list-languages">pango_ot_info_list_languages</a>    (<a href="pango-OpenType-Font-Handling.html#PangoOTInfo">PangoOTInfo</a> *info,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTTableType">PangoOTTableType</a> table_type,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> script_index,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTTag">PangoOTTag</a> language_tag);<a href="pango-OpenType-Font-Handling.html#PangoOTTag">PangoOTTag</a>* <a href="pango-OpenType-Font-Handling.html#pango-ot-info-list-features">pango_ot_info_list_features</a>     (<a href="pango-OpenType-Font-Handling.html#PangoOTInfo">PangoOTInfo</a> *info,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTTableType">PangoOTTableType</a> table_type,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTTag">PangoOTTag</a> tag,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> script_index,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> language_index);<a href="pango-OpenType-Font-Handling.html#PangoOTBuffer">PangoOTBuffer</a>* <a href="pango-OpenType-Font-Handling.html#pango-ot-buffer-new">pango_ot_buffer_new</a>          (<a href="PangoFcFont.html" title="PangoFcFont">PangoFcFont</a> *font);void        <a href="pango-OpenType-Font-Handling.html#pango-ot-buffer-destroy">pango_ot_buffer_destroy</a>         (<a href="pango-OpenType-Font-Handling.html#PangoOTBuffer">PangoOTBuffer</a> *buffer);void        <a href="pango-OpenType-Font-Handling.html#pango-ot-buffer-clear">pango_ot_buffer_clear</a>           (<a href="pango-OpenType-Font-Handling.html#PangoOTBuffer">PangoOTBuffer</a> *buffer);void        <a href="pango-OpenType-Font-Handling.html#pango-ot-buffer-add-glyph">pango_ot_buffer_add_glyph</a>       (<a href="pango-OpenType-Font-Handling.html#PangoOTBuffer">PangoOTBuffer</a> *buffer,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> glyph,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> properties,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> cluster);void        <a href="pango-OpenType-Font-Handling.html#pango-ot-buffer-set-rtl">pango_ot_buffer_set_rtl</a>         (<a href="pango-OpenType-Font-Handling.html#PangoOTBuffer">PangoOTBuffer</a> *buffer,                                             <ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> rtl);void        <a href="pango-OpenType-Font-Handling.html#pango-ot-buffer-set-zero-width-marks">pango_ot_buffer_set_zero_width_marks</a>                                            (<a href="pango-OpenType-Font-Handling.html#PangoOTBuffer">PangoOTBuffer</a> *buffer,                                             <ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> zero_width_marks);void        <a href="pango-OpenType-Font-Handling.html#pango-ot-buffer-get-glyphs">pango_ot_buffer_get_glyphs</a>      (<a href="pango-OpenType-Font-Handling.html#PangoOTBuffer">PangoOTBuffer</a> *buffer,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTGlyph">PangoOTGlyph</a> **glyphs,                                             int *n_glyphs);void        <a href="pango-OpenType-Font-Handling.html#pango-ot-buffer-output">pango_ot_buffer_output</a>          (<a href="pango-OpenType-Font-Handling.html#PangoOTBuffer">PangoOTBuffer</a> *buffer,                                             <a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *glyphs);<a href="pango-OpenType-Font-Handling.html#PangoOTRuleset">PangoOTRuleset</a>* <a href="pango-OpenType-Font-Handling.html#pango-ot-ruleset-new">pango_ot_ruleset_new</a>        (<a href="pango-OpenType-Font-Handling.html#PangoOTInfo">PangoOTInfo</a> *info);void        <a href="pango-OpenType-Font-Handling.html#pango-ot-ruleset-add-feature">pango_ot_ruleset_add_feature</a>    (<a href="pango-OpenType-Font-Handling.html#PangoOTRuleset">PangoOTRuleset</a> *ruleset,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTTableType">PangoOTTableType</a> table_type,                                             <ahref="../glib/glib-Basic-Types.html#guint">guint</a> feature_index,                                             <ahref="../glib/glib-Basic-Types.html#gulong">gulong</a> property_bit);void        <a href="pango-OpenType-Font-Handling.html#pango-ot-ruleset-substitute">pango_ot_ruleset_substitute</a>     (<a href="pango-OpenType-Font-Handling.html#PangoOTRuleset">PangoOTRuleset</a> *ruleset,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTBuffer">PangoOTBuffer</a> *buffer);void        <a href="pango-OpenType-Font-Handling.html#pango-ot-ruleset-position">pango_ot_ruleset_position</a>       (<a href="pango-OpenType-Font-Handling.html#PangoOTRuleset">PangoOTRuleset</a> *ruleset,                                             <a href="pango-OpenType-Font-Handling.html#PangoOTBuffer">PangoOTBuffer</a> *buffer);</pre></div><div class="refsect1" lang="en"><a name="desc"></a><h2>Description</h2><p>Functions and macros in this section are used to implement the OpenType Layoutfeatures and algorithms.  These are mostly useful when writing Fontconfig-basedshaping engines</p></div><div class="refsect1" lang="en"><a name="details"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2925404"></a><h3><a name="PangoOTTag"></a>PangoOTTag</h3><a class="indexterm" name="id2925416"></a><pre class="programlisting">typedef guint32  PangoOTTag;</pre><p>The <span class="type">PangoOTTag</span> typedef is used to represent TrueType and OpenTypefour letter tags inside Pango. Use the <code class="function"><code class="function">FT_MAKE_TAG()</code></code> macrodefined in the FreeType2 header <code class="filename">freetype/freetype.h</code> to create <span class="type">PangoOTTag</span>s manually.</p></div><hr><div class="refsect2" lang="en"><a name="id2925462"></a><h3><a name="PangoOTInfo"></a>PangoOTInfo</h3><a class="indexterm" name="id2925474"></a><pre class="programlisting">typedef struct _PangoOTInfo PangoOTInfo;</pre><p>The <a href="pango-OpenType-Font-Handling.html#PangoOTInfo"><span class="type">PangoOTInfo</span></a> struct contains the various tables associated with an OpenType font. It contains only private fields andshould only be accessed via the <code class="function">pango_ot_info_*</code> functionswhich are documented below. To obtain a <a href="pango-OpenType-Font-Handling.html#PangoOTInfo"><span class="type">PangoOTInfo</span></a>,use <code class="function">pango_ot_info_new()</code>.</p></div><hr><div class="refsect2" lang="en"><a name="id2925526"></a><h3><a name="PangoOTBuffer"></a>PangoOTBuffer</h3><a class="indexterm" name="id2925539"></a><pre class="programlisting">typedef struct _PangoOTBuffer PangoOTBuffer;</pre><p>The <a href="pango-OpenType-Font-Handling.html#PangoOTBuffer"><span class="type">PangoOTBuffer</span></a> structure is used to store strings of glyphs associatedwith a <a href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a>, suitable for OpenType layout processing.  It containsonly private fields and should only be accessed via the<code class="function">pango_ot_buffer_*</code> functions which are documented below.To obtain a <a href="pango-OpenType-Font-Handling.html#PangoOTBuffer"><span class="type">PangoOTBuffer</span></a>, use <a href="pango-OpenType-Font-Handling.html#pango-ot-buffer-new"><code class="function">pango_ot_buffer_new()</code></a>.</p></div><hr><div class="refsect2" lang="en"><a name="id2925600"></a><h3><a name="PangoOTGlyph"></a>PangoOTGlyph</h3><a class="indexterm" name="id2925612"></a><pre class="programlisting">typedef struct {  guint    glyph;  guint    properties;  guint    cluster;  gushort  component;  gushort  ligID;  gushort  property_cache;    /* Internal */} PangoOTGlyph;</pre><p>The <a href="pango-OpenType-Font-Handling.html#PangoOTGlyph"><span class="type">PangoOTGlyph</span></a> structure represents a single glyph together withinformation used for OpenType layout processing of the glyph.It contains the following fields.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>glyph</code></em>;</span></td><td>the glyph itself.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>properties</code></em>;</span></td><td>the properties value, identifying which features should be	     applied on this glyph.  See <code class="function">pango_ruleset_add_feature()</code>.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>cluster</code></em>;</span></td><td>the cluster that this glyph belongs to.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#gushort">gushort</a>&#160;<em class="structfield"><code>component</code></em>;</span></td><td>a component value, set by the OpenType layout engine.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#gushort">gushort</a>&#160;<em class="structfield"><code>ligID</code></em>;</span></td><td>a ligature index value, set by the OpenType layout engine.</td></tr><tr><td><span class="term"><ahref="../glib/glib-Basic-Types.html#gushort">gushort</a>&#160;<em class="structfield"><code>property_cache</code></em>;</span></td><td>for internal use.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2925785"></a><h3><a name="PangoOTRuleset"></a>PangoOTRuleset</h3><a class="indexterm" name="id2925798"></a><pre class="programlisting">typedef struct _PangoOTRuleset PangoOTRuleset;</pre><p>The <span class="type">PangoOTRuleSet</span> structure holds aset of features selected from the tables in an OpenType font.(A feature is an operation such as adjusting glyph positioningthat should be applied to a text feature such as a certaintype of accent.) A <span class="type">PangoOTRuleSet</span>is created with <a href="pango-OpenType-Font-Handling.html#pango-ot-ruleset-new"><code class="function">pango_ot_ruleset_new()</code></a>, features are addedto it with <a href="pango-OpenType-Font-Handling.html#pango-ot-ruleset-add-feature"><code class="function">pango_ot_ruleset_add_feature()</code></a>, then it isapplied to a <a href="pango-Glyph-Storage.html#PangoGlyphString"><span class="type">PangoGlyphString</span></a> with <code class="function">pango_ot_ruleset_shape()</code>.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -