📄 cairo-scaled-font.xml
字号:
font designer's intent as to how the the font should align with elements below it.</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>height</structfield>;</term><listitem><simpara> the recommended vertical distance between baselines when setting consecutive lines of text with the font. This is greater than <parameter>ascent</parameter>+<parameter>descent</parameter> by a quantity known as the <firstterm>line spacing</firstterm> or <firstterm>external leading</firstterm>. When space is at a premium, most fonts can be set with only a distance of <parameter>ascent</parameter>+<parameter>descent</parameter> between lines.</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>max_x_advance</structfield>;</term><listitem><simpara> the maximum distance in the X direction that the the origin is advanced for any glyph in the font.</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>max_y_advance</structfield>;</term><listitem><simpara> the maximum distance in the Y direction that the the origin is advanced for any glyph in the font. this will be zero for normal fonts used for horizontal writing. (The scripts of East Asia are sometimes written vertically.)</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="cairo-scaled-font-extents" role="function"/>cairo_scaled_font_extents ()</title><indexterm><primary>cairo_scaled_font_extents</primary></indexterm><programlisting><link linkend="void">void</link> cairo_scaled_font_extents (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font, <link linkend="cairo-font-extents-t">cairo_font_extents_t</link> *extents);</programlisting></refsect2><refsect2><title><anchor id="cairo-text-extents-t" role="struct"/>cairo_text_extents_t</title><indexterm><primary>cairo_text_extents_t</primary></indexterm><programlisting>typedef struct { double x_bearing; double y_bearing; double width; double height; double x_advance; double y_advance;} cairo_text_extents_t;</programlisting><para>The <link linkend="cairo-text-extents-t"><type>cairo_text_extents_t</type></link> structure stores the extents of a singleglyph or a string of glyphs in user-space coordinates. Because textextents are in user-space coordinates, they are mostly, but notentirely, independent of the current transformation matrix. If you call<literal>cairo_scale(cr, 2.0, 2.0)</literal>, text willbe drawn twice as big, but the reported text extents will not bedoubled. They will change slightly due to hinting (so you can'tassume that metrics are independent of the transformation matrix),but otherwise will remain unchanged.</para><para></para><variablelist role="struct"><varlistentry><term><link linkend="double">double</link> <structfield>x_bearing</structfield>;</term><listitem><simpara> the horizontal distance from the origin to the leftmost part of the glyphs as drawn. Positive if the glyphs lie entirely to the right of the origin.</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>y_bearing</structfield>;</term><listitem><simpara> the vertical distance from the origin to the topmost part of the glyphs as drawn. Positive only if the glyphs lie completely below the origin; will usually be negative.</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>width</structfield>;</term><listitem><simpara> width of the glyphs as drawn</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>height</structfield>;</term><listitem><simpara> height of the glyphs as drawn</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>x_advance</structfield>;</term><listitem><simpara>distance to advance in the X direction after drawing these glyphs</simpara></listitem></varlistentry><varlistentry><term><link linkend="double">double</link> <structfield>y_advance</structfield>;</term><listitem><simpara> distance to advance in the Y direction after drawing these glyphs. Will typically be zero except for vertical text layout as found in East-Asian languages.</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="cairo-scaled-font-text-extents" role="function" condition="since:1.2"/>cairo_scaled_font_text_extents ()</title><indexterm role="1.2"><primary>cairo_scaled_font_text_extents</primary></indexterm><programlisting><link linkend="void">void</link> cairo_scaled_font_text_extents (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font, const <link linkend="char">char</link> *utf8, <link linkend="cairo-text-extents-t">cairo_text_extents_t</link> *extents);</programlisting><para>Since 1.2</para></refsect2><refsect2><title><anchor id="cairo-scaled-font-glyph-extents" role="function"/>cairo_scaled_font_glyph_extents ()</title><indexterm><primary>cairo_scaled_font_glyph_extents</primary></indexterm><programlisting><link linkend="void">void</link> cairo_scaled_font_glyph_extents (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font, <link linkend="cairo-glyph-t">cairo_glyph_t</link> *glyphs, <link linkend="int">int</link> num_glyphs, <link linkend="cairo-text-extents-t">cairo_text_extents_t</link> *extents);</programlisting></refsect2><refsect2><title><anchor id="cairo-scaled-font-get-font-face" role="function" condition="since:1.2"/>cairo_scaled_font_get_font_face ()</title><indexterm role="1.2"><primary>cairo_scaled_font_get_font_face</primary></indexterm><programlisting><link linkend="cairo-font-face-t">cairo_font_face_t</link>* cairo_scaled_font_get_font_face (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);</programlisting><para>Since 1.2</para></refsect2><refsect2><title><anchor id="cairo-scaled-font-get-font-options" role="function" condition="since:1.2"/>cairo_scaled_font_get_font_options ()</title><indexterm role="1.2"><primary>cairo_scaled_font_get_font_options</primary></indexterm><programlisting><link linkend="void">void</link> cairo_scaled_font_get_font_options (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font, <link linkend="cairo-font-options-t">cairo_font_options_t</link> *options);</programlisting><para>Since 1.2</para></refsect2><refsect2><title><anchor id="cairo-scaled-font-get-font-matrix" role="function" condition="since:1.2"/>cairo_scaled_font_get_font_matrix ()</title><indexterm role="1.2"><primary>cairo_scaled_font_get_font_matrix</primary></indexterm><programlisting><link linkend="void">void</link> cairo_scaled_font_get_font_matrix (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font, <link linkend="cairo-matrix-t">cairo_matrix_t</link> *font_matrix);</programlisting><para>Since 1.2</para></refsect2><refsect2><title><anchor id="cairo-scaled-font-get-ctm" role="function" condition="since:1.2"/>cairo_scaled_font_get_ctm ()</title><indexterm role="1.2"><primary>cairo_scaled_font_get_ctm</primary></indexterm><programlisting><link linkend="void">void</link> cairo_scaled_font_get_ctm (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font, <link linkend="cairo-matrix-t">cairo_matrix_t</link> *ctm);</programlisting><para>Since 1.2</para></refsect2><refsect2><title><anchor id="cairo-scaled-font-get-type" role="function" condition="since:1.2"/>cairo_scaled_font_get_type ()</title><indexterm role="1.2"><primary>cairo_scaled_font_get_type</primary></indexterm><programlisting><link linkend="cairo-font-type-t">cairo_font_type_t</link> cairo_scaled_font_get_type (<link linkend="cairo-scaled-font-t">cairo_scaled_font_t</link> *scaled_font);</programlisting><para>Since 1.2</para></refsect2></refsect1></refentry>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -