📄 win32-fonts.xml
字号:
result may be newly loaded, or it may have been previouslystored</para><para></para><variablelist role="params"><varlistentry><term><parameter>cache</parameter> :</term><listitem><simpara> a <link linkend="PangoWin32FontCache"><type>PangoWin32FontCache</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>logfont</parameter> :</term><listitem><simpara> a pointer to a LOGFONTA structure describing the font to load.</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The font structure, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the font couldnot be loaded. In order to free this structure, you must call<link linkend="pango-win32-font-cache-unload"><function>pango_win32_font_cache_unload()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-win32-font-cache-loadw" role="function" condition="since:1.16"><title>pango_win32_font_cache_loadw ()</title><indexterm zone="pango-win32-font-cache-loadw" role="1.16"><primary>pango_win32_font_cache_loadw</primary></indexterm><programlisting><link linkend="HFONT:CAPS">HFONT</link> pango_win32_font_cache_loadw (<link linkend="PangoWin32FontCache">PangoWin32FontCache</link> *cache, const <link linkend="LOGFONTW:CAPS">LOGFONTW</link> *logfont);</programlisting><para>Creates a HFONT from a LOGFONTW. Theresult may be newly loaded, or it may have been previouslystored</para><para></para><variablelist role="params"><varlistentry><term><parameter>cache</parameter> :</term><listitem><simpara> a <link linkend="PangoWin32FontCache"><type>PangoWin32FontCache</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>logfont</parameter> :</term><listitem><simpara> a pointer to a LOGFONTW structure describing the font to load.</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The font structure, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the font couldnot be loaded. In order to free this structure, you must call<link linkend="pango-win32-font-cache-unload"><function>pango_win32_font_cache_unload()</function></link>.</simpara></listitem></varlistentry></variablelist><para role="since">Since 1.16</para></refsect2><refsect2 id="pango-win32-font-cache-unload" role="function"><title>pango_win32_font_cache_unload ()</title><indexterm zone="pango-win32-font-cache-unload"><primary>pango_win32_font_cache_unload</primary></indexterm><programlisting><link linkend="void">void</link> pango_win32_font_cache_unload (<link linkend="PangoWin32FontCache">PangoWin32FontCache</link> *cache, <link linkend="HFONT:CAPS">HFONT</link> hfont);</programlisting><para>Frees a font structure previously loaded with <link linkend="pango-win32-font-cache-load"><function>pango_win32_font_cache_load()</function></link>.</para><para></para><variablelist role="params"><varlistentry><term><parameter>cache</parameter> :</term><listitem><simpara> a <link linkend="PangoWin32FontCache"><type>PangoWin32FontCache</type></link></simpara></listitem></varlistentry><varlistentry><term><parameter>hfont</parameter> :</term><listitem><simpara> the HFONT to unload</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-win32-font-map-for-display" role="function"><title>pango_win32_font_map_for_display ()</title><indexterm zone="pango-win32-font-map-for-display"><primary>pango_win32_font_map_for_display</primary></indexterm><programlisting><link linkend="PangoFontMap">PangoFontMap</link>* pango_win32_font_map_for_display (void);</programlisting><para>Returns a <link linkend="PangoWin32FontMap"><type>PangoWin32FontMap</type></link>. Font maps are cached and shouldnot be freed. If the font map is no longer needed, it canbe released with <link linkend="pango-win32-shutdown-display"><function>pango_win32_shutdown_display()</function></link>.</para><para></para><variablelist role="params"><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a <link linkend="PangoFontMap"><type>PangoFontMap</type></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-win32-shutdown-display" role="function"><title>pango_win32_shutdown_display ()</title><indexterm zone="pango-win32-shutdown-display"><primary>pango_win32_shutdown_display</primary></indexterm><programlisting><link linkend="void">void</link> pango_win32_shutdown_display (void);</programlisting><para>Free cached resources.</para><para></para></refsect2><refsect2 id="pango-win32-font-map-get-font-cache" role="function"><title>pango_win32_font_map_get_font_cache ()</title><indexterm zone="pango-win32-font-map-get-font-cache"><primary>pango_win32_font_map_get_font_cache</primary></indexterm><programlisting><link linkend="PangoWin32FontCache">PangoWin32FontCache</link>* pango_win32_font_map_get_font_cache (<link linkend="PangoFontMap">PangoFontMap</link> *font_map);</programlisting><para>Obtains the font cache associated with the given font map.</para><para></para><variablelist role="params"><varlistentry><term><parameter>font_map</parameter> :</term><listitem><simpara> a <link linkend="PangoWin32FontMap"><type>PangoWin32FontMap</type></link>.</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the <link linkend="PangoWin32FontCache"><type>PangoWin32FontCache</type></link> of <parameter>font_map</parameter>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-win32-font-logfont" role="function"><title>pango_win32_font_logfont ()</title><indexterm zone="pango-win32-font-logfont"><primary>pango_win32_font_logfont</primary></indexterm><programlisting><link linkend="LOGFONTA:CAPS">LOGFONTA</link>* pango_win32_font_logfont (<link linkend="PangoFont">PangoFont</link> *font);</programlisting><para>Determine the LOGFONTA struct for the specified font. Note thatPango internally uses LOGFONTW structs, so if converting the UTF-16face name in the LOGFONTW struct to system codepage fails, thereturned LOGFONTA will have an emppty face name. To get theLOGFONTW of a PangoFont, use <link linkend="pango-win32-font-logfontw"><function>pango_win32_font_logfontw()</function></link>. Itis recommended to do that always even if you don't expectto come across fonts with odd names.</para><para></para><variablelist role="params"><varlistentry><term><parameter>font</parameter> :</term><listitem><simpara> a <link linkend="PangoFont"><type>PangoFont</type></link> which must be from the Win32 backend</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A newly allocated LOGFONTA struct. It must befreed with <link linkend="g-free"><function>g_free()</function></link>.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2 id="pango-win32-font-logfontw" role="function" condition="since:1.16"><title>pango_win32_font_logfontw ()</title><indexterm zone="pango-win32-font-logfontw" role="1.16"><primary>pango_win32_font_logfontw</primary></indexterm><programlisting><link linkend="LOGFONTW:CAPS">LOGFONTW</link>* pango_win32_font_logfontw (<link linkend="PangoFont">PangoFont</link> *font);</programlisting><para>Determine the LOGFONTW struct for the specified font.</para><para></para><variablelist role="params"><varlistentry><term><parameter>font</parameter> :</term><listitem><simpara> a <link linkend="PangoFont"><type>PangoFont</type></link> which must be from the Win32 backend</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A newly allocated LOGFONTW struct. It must befreed with <link linkend="g-free"><function>g_free()</function></link>.</simpara></listitem></varlistentry></variablelist><para role="since">Since 1.16</para></refsect2><refsect2 id="pango-win32-font-description-from-logfont" role="function" condition="since:1.12"><title>pango_win32_font_description_from_logfont ()</title><indexterm zone="pango-win32-font-description-from-logfont" role="1.12"><primary>pango_win32_font_description_from_logfont</primary></indexterm><programlisting><link linkend="PangoFontDescription">PangoFontDescription</link>* pango_win32_font_description_from_logfont (const <link linkend="LOGFONTA:CAPS">LOGFONTA</link> *lfp);</programlisting><para>Creates a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> that matches the specified LOGFONTA.</para><para>The face name, italicness and weight fields in the LOGFONTA are usedto set up the resulting <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>. If the face name inthe LOGFONTA contains non-ASCII characters the font is temporarilyloaded (using <link linkend="CreateFontIndirect"><function>CreateFontIndirect()</function></link>) and an ASCII (usually English)name for it is looked up from the font name tables in the fontdata. If that doesn't work, the face name is converted from thesystem codepage to UTF-8 and that is used.</para><para></para><variablelist role="params"><varlistentry><term><parameter>lfp</parameter> :</term><listitem><simpara> a LOGFONTA</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the newly allocated <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>, which should be freed using <link linkend="pango-font-description-free"><function>pango_font_description_free()</function></link></simpara></listitem></varlistentry></variablelist><para role="since">Since 1.12</para></refsect2><refsect2 id="pango-win32-font-description-from-logfontw" role="function" condition="since:1.16"><title>pango_win32_font_description_from_logfontw ()</title><indexterm zone="pango-win32-font-description-from-logfontw" role="1.16"><primary>pango_win32_font_description_from_logfontw</primary></indexterm><programlisting><link linkend="PangoFontDescription">PangoFontDescription</link>* pango_win32_font_description_from_logfontw (const <link linkend="LOGFONTW:CAPS">LOGFONTW</link> *lfp);</programlisting><para>Creates a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> that matches the specified LOGFONTW.</para><para>The face name, italicness and weight fields in the LOGFONTW are usedto set up the resulting <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>. If the face name inthe LOGFONTW contains non-ASCII characters the font is temporarilyloaded (using <link linkend="CreateFontIndirect"><function>CreateFontIndirect()</function></link>) and an ASCII (usually English)name for it is looked up from the font name tables in the fontdata. If that doesn't work, the face name is converted from UTF-16to UTF-8 and that is used.</para><para></para><variablelist role="params"><varlistentry><term><parameter>lfp</parameter> :</term><listitem><simpara> a LOGFONTW</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the newly allocated <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link>, which should be freed using <link linkend="pango-font-description-free"><function>pango_font_description_free()</function></link></simpara></listitem></varlistentry></variablelist><para role="since">Since 1.16</para></refsect2></refsect1></refentry>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -