34
34
<li>Cairo::FontExtents</li>
37
<h2><a name="label-2" id="label-2">インタンスメソッド</a></h2><!-- RDLabel: "インタンスメソッド" -->
39
<dt><a name="label-3" id="label-3"><code>ascent</code></a></dt><!-- RDLabel: "ascent" -->
37
<h2><a name="label-2" id="label-2">クラスメソッド</a></h2><!-- RDLabel: "クラスメソッド" -->
39
<dt><a name="label-3" id="label-3"><code>Cairo::FontExtents.new</code></a></dt><!-- RDLabel: "Cairo::FontExtents.new" -->
41
<em>Since 1.7</em>: 新しく<a href="cairo-font-extents.html">Cairo::FontExtents</a>オブジェ
42
クトを生成します。以下のように値が設定されています。
47
<li>max_x_advance: 1.0</li>
48
<li>max_y_advance: 0.0</li>
51
<li>戻り値: 新しく生成された<a href="cairo-font-extents.html">Cairo::FontExtents</a>オブジェクト。</li>
54
<h2><a name="label-4" id="label-4">インタンスメソッド</a></h2><!-- RDLabel: "インタンスメソッド" -->
56
<dt><a name="label-5" id="label-5"><code>ascent</code></a></dt><!-- RDLabel: "ascent" -->
41
58
フォントがベースラインより上に広げる距離。この値が常に
42
59
フォントの全てのグリフの範囲の最大値と同じになるわけで
44
61
にフォントをベースライン上の要素と並べるべきかというフォ
45
62
ントデザイナの意図を表現するために取り出します。
47
<li>Returns: フォントがベースラインより上に広げる距離。</li>
49
<dt><a name="label-4" id="label-4"><code>descent</code></a></dt><!-- RDLabel: "descent" -->
64
<li>戻り値: フォントがベースラインより上に広げる距離。</li>
66
<dt><a name="label-6" id="label-6"><code>ascent=(<var>ascent</var>)</code></a></dt><!-- RDLabel: "ascent=" -->
67
<dt><a name="label-7" id="label-7"><code>set_ascent(<var>ascent</var>)</code></a></dt><!-- RDLabel: "set_ascent" -->
71
<li>ascent: フォントがベースラインより上に広げる距離。</li>
73
<dt><a name="label-8" id="label-8"><code>descent</code></a></dt><!-- RDLabel: "descent" -->
51
75
フォントがベースラインより下に広げる距離。多くのフォン
52
76
トはベースラインの下の部分を含みますが、そのようなフォ
56
80
ベースラインより下の要素と並べるべきかというフォントデ
57
81
ザイナの意図を表現するために取り出します。
59
<li>Returns: フォントがベースラインより下に広げる距離。</li>
61
<dt><a name="label-5" id="label-5"><code>height</code></a></dt><!-- RDLabel: "height" -->
83
<li>戻り値: フォントがベースラインより下に広げる距離。</li>
85
<dt><a name="label-9" id="label-9"><code>descent=(<var>descent</var>)</code></a></dt><!-- RDLabel: "descent=" -->
86
<dt><a name="label-10" id="label-10"><code>set_descent(<var>descent</var>)</code></a></dt><!-- RDLabel: "set_descent" -->
90
<li>descent: フォントがベースラインより下に広げる距離。</li>
92
<dt><a name="label-11" id="label-11"><code>height</code></a></dt><!-- RDLabel: "height" -->
63
94
指定したフォントでテキストの連続的な線を設定したときに
64
95
推奨される縦方向のベースライン間の距離です。この値は行
67
98
も需要が多い場合、多くのフォントは線の間の<code>ascent +
68
99
descent</code>の距離だけが設定されます。
72
<dt><a name="label-6" id="label-6"><code>max_x_advance</code></a></dt><!-- RDLabel: "max_x_advance" -->
103
<dt><a name="label-12" id="label-12"><code>height=(<var>height</var>)</code></a></dt><!-- RDLabel: "height=" -->
104
<dt><a name="label-13" id="label-13"><code>set_height(<var>height</var>)</code></a></dt><!-- RDLabel: "set_height" -->
110
<dt><a name="label-14" id="label-14"><code>max_x_advance</code></a></dt><!-- RDLabel: "max_x_advance" -->
74
112
X方向の最大の距離。基点はフォントの中の全てのグリフによっ
77
<li>Returns: X方向の最大の距離。</li>
79
<dt><a name="label-7" id="label-7"><code>max_y_advance</code></a></dt><!-- RDLabel: "max_y_advance" -->
115
<li>戻り値: X方向の最大の距離。</li>
117
<dt><a name="label-15" id="label-15"><code>max_x_advance=(<var>max_x_advance</var>)</code></a></dt><!-- RDLabel: "max_x_advance=" -->
118
<dt><a name="label-16" id="label-16"><code>set_max_x_advance(<var>max_x_advance</var>)</code></a></dt><!-- RDLabel: "set_max_x_advance" -->
122
<li>max_x_advance: X方向の最大の距離。</li>
124
<dt><a name="label-17" id="label-17"><code>max_y_advance</code></a></dt><!-- RDLabel: "max_y_advance" -->
81
126
Y方向の最大の距離。基点はフォントの中の全てのグリフによっ
82
127
進化します。普通のフォントを横書きにする場合は0になりで
83
128
しょう。(東アジアの文字はときどき縦書きになります。)
85
<li>Returns: Y方向の最大の距離。</li>
87
<dt><a name="label-8" id="label-8"><code>to_s</code></a></dt><!-- RDLabel: "to_s" -->
90
<li>Returns: self</li>
130
<li>戻り値: Y方向の最大の距離。</li>
132
<dt><a name="label-18" id="label-18"><code>max_y_advance=(<var>max_y_advance</var>)</code></a></dt><!-- RDLabel: "max_y_advance=" -->
133
<dt><a name="label-19" id="label-19"><code>set_max_y_advance(<var>max_y_advance</var>)</code></a></dt><!-- RDLabel: "set_max_y_advance" -->
137
<li>max_y_advance: Y方向の最大の距離。</li>
139
<dt><a name="label-20" id="label-20"><code>to_s</code></a></dt><!-- RDLabel: "to_s" -->
142
<li>戻り値: この<a href="cairo-font-extents.html">Cairo::FontExtents</a>の文字列表現。</li>
93
<h2><a name="label-9" id="label-9">参考</a></h2><!-- RDLabel: "参考" -->
145
<h2><a name="label-21" id="label-21">参考</a></h2><!-- RDLabel: "参考" -->
95
147
<li><a href="index.html#label-0">索引</a></li>
148
<li><a href="cairo-user-font-face.html#label-5">Cairo::UserFontFace#on_init</a></li>
97
<h2><a name="label-10" id="label-10">変更履歴</a></h2><!-- RDLabel: "変更履歴" -->
150
<h2><a name="label-22" id="label-22">変更履歴</a></h2><!-- RDLabel: "変更履歴" -->
152
<li>2008-08-17: kou: rcairo 1.7対応</li>
99
153
<li>2007-04-16: kou: スタート</li>