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

📄 pango-miscellaneous-utilities.html

📁 GTK+-2.0源码之pango-1.15.6.tar.gz
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<tbody><tr><td><span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></td><td> a string to parse.</td></tr><tr><td><span class="term"><em class="parameter"><code>weight</code></em>&#160;:</span></td><td> a <a href="pango-Fonts.html#PangoWeight"><span class="type">PangoWeight</span></a> to store the result in.</td></tr><tr><td><span class="term"><em class="parameter"><code>warn</code></em>&#160;:</span></td><td> if <ahref="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, issue a <ahref="../glib/glib-Message-Logging.html#g-warning"><code class="function">g_warning()</code></a> on bad input.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> <ahref="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> was successfully parsed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2944648"></a><h3><a name="pango-parse-stretch"></a>pango_parse_stretch ()</h3><a class="indexterm" name="id2944661"></a><pre class="programlisting"><ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>    pango_parse_stretch             (const char *str,                                             <a href="pango-Fonts.html#PangoStretch">PangoStretch</a> *stretch,                                             <ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a> warn);</pre><p>Parses a font stretch. The allowed values are"ultra_condensed", "extra_condensed", "condensed","semi_condensed", "normal", "semi_expanded", "expanded","extra_expanded" and "ultra_expanded". Case variations areignored and the '_' characters may be omitted.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></td><td> a string to parse.</td></tr><tr><td><span class="term"><em class="parameter"><code>stretch</code></em>&#160;:</span></td><td> a <a href="pango-Fonts.html#PangoStretch"><span class="type">PangoStretch</span></a> to store the result in.</td></tr><tr><td><span class="term"><em class="parameter"><code>warn</code></em>&#160;:</span></td><td> if <ahref="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, issue a <ahref="../glib/glib-Message-Logging.html#g-warning"><code class="function">g_warning()</code></a> on bad input.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> <ahref="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> was successfully parsed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2944813"></a><h3><a name="pango-get-sysconf-subdirectory"></a>pango_get_sysconf_subdirectory ()</h3><a class="indexterm" name="id2944826"></a><pre class="programlisting">const char* pango_get_sysconf_subdirectory  (void);</pre><p>On Unix, returns the name of the "pango" subdirectory of SYSCONFDIR(which is set at compile time). On Win32, returns a subdirectory ofthe Pango installation directory (which is deduced at run time fromthe DLL's location, or stored in the Registry).</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the Pango sysconf directory. The returned string shouldnot be freed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2944873"></a><h3><a name="pango-get-lib-subdirectory"></a>pango_get_lib_subdirectory ()</h3><a class="indexterm" name="id2944887"></a><pre class="programlisting">const char* pango_get_lib_subdirectory      (void);</pre><p>On Unix, returns the name of the "pango" subdirectory of LIBDIR(which is set at compile time). On Win32, returns the Pangoinstallation directory (which is deduced at run time from the DLL'slocation, or stored in the Registry). The returned string shouldnot be freed.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the Pango lib directory. The returned string shouldnot be freed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2944932"></a><h3><a name="pango-log2vis-get-embedding-levels"></a>pango_log2vis_get_embedding_levels ()</h3><a class="indexterm" name="id2944949"></a><pre class="programlisting"><ahref="../glib/glib-Basic-Types.html#guint8">guint8</a>*     pango_log2vis_get_embedding_levels                                            (const <ahref="../glib/glib-Basic-Types.html#gchar">gchar</a> *text,                                             int length,                                             <a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> *pbase_dir);</pre><p>This will return the bidirectional embedding levels of the input paragraphas defined by the Unicode Bidirectional Algorithm available at:</p><p>  http://www.unicode.org/reports/tr9/</p><p>If the input base direction is a weak direction, the direction of thecharacters in the text will determine the final resolved direction.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>text</code></em>&#160;:</span></td><td>      the text to itemize.</td></tr><tr><td><span class="term"><em class="parameter"><code>length</code></em>&#160;:</span></td><td>    the number of bytes (not characters) to process, or -1            if <em class="parameter"><code>text</code></em> is nul-terminated and the length should be calculated.</td></tr><tr><td><span class="term"><em class="parameter"><code>pbase_dir</code></em>&#160;:</span></td><td> input base direction, and output resolved direction.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> a newly allocated array of embedding levels, one item per              character (not byte), that should be freed using g_free.</td></tr></tbody></table></div><p>Since  1.4</p></div><hr><div class="refsect2" lang="en"><a name="id2945080"></a><h3><a name="pango-language-get-default"></a>pango_language_get_default ()</h3><a class="indexterm" name="id2945096"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a>* pango_language_get_default   (void);</pre><p>Returns the <a href="pango-Text-Attributes.html#PangoLanguage"><span class="type">PangoLanguage</span></a> for the current locale of the process.Note that this can change over the life of an application.</p><p>On Unix systems, this is the return value is derived from<code class="literal">setlocale(LC_CTYPE, NULL)</code>, and the user canaffect this through the environment variables LC_ALL, LC_CTYPE orLANG (checked in that order). The locale string typically is inthe form lang_COUNTRY, where lang is an ISO-639 language code, andCOUNTRY is an ISO-3166 country code. For instance, sv_FI forSwedish as written in Finland or pt_BR for Portuguese as written inBrazil.</p><p>On Windows, the C library does not use any such environmentvariables, and setting them won't affect the behavior of functionslike <code class="function">ctime()</code>. The user sets the locale through the Regional Optionsin the Control Panel. The C library (in the <code class="function">setlocale()</code> function)does not use country and language codes, but country and languagenames spelled out in English.However, this function does check the above environmentvariables, and does return a Unix-style locale string based oneither said environment variables or the thread's current locale.</p><p>Your application should call <code class="literal">setlocale(LC_ALL, "");</code>for the user settings to take effect.  Gtk+ does this in its initializationfunctions automatically (by calling <code class="function">gtk_set_locale()</code>).See <code class="literal">man setlocale</code> for more details.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the default language as a <a href="pango-Text-Attributes.html#PangoLanguage"><span class="type">PangoLanguage</span></a>, must not be              freed.</td></tr></tbody></table></div><p>Since  1.16</p></div><hr><div class="refsect2" lang="en"><a name="id2945241"></a><h3><a name="pango-language-get-sample-string"></a>pango_language_get_sample_string ()</h3><a class="indexterm" name="id2945255"></a><pre class="programlisting">const char* pango_language_get_sample_string                                            (<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language);</pre><p>Get a string that is representative of the characters needed torender a particular language. This function is a bad hack forinternal use by renderers and Pango.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>language</code></em>&#160;:</span></td><td> a <a href="pango-Text-Attributes.html#PangoLanguage"><span class="type">PangoLanguage</span></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the sample string. This value is owned by Pango  and must not be freed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2945329"></a><h3><a name="pango-is-zero-width"></a>pango_is_zero_width ()</h3><a class="indexterm" name="id2945344"></a><pre class="programlisting"><ahref="../glib/glib-Basic-Types.html#gboolean">gboolean</a>    pango_is_zero_width             (<ahref="../glib/glib-Unicode-Manipulation.html#gunichar">gunichar</a> ch);</pre><p>Checks <em class="parameter"><code>ch</code></em> to see if it is a character that should not benormally rendered on the screen.  This includes all Unicode characterswith "ZERO WIDTH" in their name, as well as <em class="firstterm">bidi</em> formatting characters, anda few other ones.  This is totally different from <code class="function">g_unichar_iszerowidth()</code>and is at best misnamed.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>ch</code></em>&#160;:</span></td><td> a Unicode character</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> <ahref="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>ch</code></em> is a zero-width character, <ahref="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td></tr></tbody></table></div><p>Since  1.10</p></div><hr><div class="refsect2" lang="en"><a name="id2945461"></a><h3><a name="pango-quantize-line-geometry"></a>pango_quantize_line_geometry ()</h3><a class="indexterm" name="id2945477"></a><pre class="programlisting">void        pango_quantize_line_geometry    (int *thickness,                                             int *position);</pre><p>Quantizes the thickness and position of a line, typically anunderline or strikethrough, to whole device pixels, that is integermultiples of <a href="pango-Glyph-Storage.html#PANGO-SCALE:CAPS"><code class="literal">PANGO_SCALE</code></a>. The purpose of this function is to avoidsuch lines looking blurry.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>thickness</code></em>&#160;:</span></td><td> pointer to the thickness of a line, in Pango scaled units</td></tr><tr><td><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></td><td> corresponding position</td></tr></tbody></table></div><p>Since  1.12</p></div></div></div></body></html>

⌨️ 快捷键说明

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