include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man2 / xhtml / glXUseXFont.xml
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
2 <!-- saved from url=(0013)about:internet -->
3 <?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>glXUseXFont</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glXUseXFont"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glXUseXFont — create bitmap display lists from an X font</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td><code class="funcdef">void <b class="fsfunc">glXUseXFont</b>(</code></td><td>Font  </td><td><var class="pdparam">font</var>, </td></tr><tr><td> </td><td>int  </td><td><var class="pdparam">first</var>, </td></tr><tr><td> </td><td>int  </td><td><var class="pdparam">count</var>, </td></tr><tr><td> </td><td>int  </td><td><var class="pdparam">listBase</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>font</code></em></span></dt><dd><p>
4 Specifies the font from which character glyphs are to be taken.
5 </p></dd><dt><span class="term"><em class="parameter"><code>first</code></em></span></dt><dd><p>
6 Specifies the index of the first glyph to be taken.
7 </p></dd><dt><span class="term"><em class="parameter"><code>count</code></em></span></dt><dd><p>
8 Specifies the number of glyphs to be taken.
9 </p></dd><dt><span class="term"><em class="parameter"><code>listBase</code></em></span></dt><dd><p>
10 Specifies the index of the first display list to be generated.
11 </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
12 <code class="function">glXUseXFont</code> generates <em class="parameter"><code>count</code></em> display lists,
13 named <em class="parameter"><code>listBase</code></em> through
14 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
15
16 <mml:mrow>
17 <mml:mi mathvariant="italic">listBase</mml:mi>
18 <mml:mo>+</mml:mo>
19 <mml:mi mathvariant="italic">count</mml:mi>
20 <mml:mo>-</mml:mo>
21 <mml:mn>1</mml:mn>
22 </mml:mrow>
23 </mml:math>,
24 each containing a single <a class="citerefentry" href="glBitmap.xml"><span class="citerefentry"><span class="refentrytitle">glBitmap</span></span></a> command.
25 The parameters of the <a class="citerefentry" href="glBitmap.xml"><span class="citerefentry"><span class="refentrytitle">glBitmap</span></span></a> command of display list
26 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
27
28 <mml:mrow>
29 <mml:mi mathvariant="italic">listBase</mml:mi>
30 <mml:mo>+</mml:mo>
31 <mml:mi mathvariant="italic">i</mml:mi>
32 </mml:mrow>
33 </mml:math>
34 are derived from glyph
35 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
36
37 <mml:mrow>
38 <mml:mi mathvariant="italic">first</mml:mi>
39 <mml:mo>+</mml:mo>
40 <mml:mi mathvariant="italic">i</mml:mi>
41 </mml:mrow>
42 </mml:math>.
43 Bitmap parameters
44 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">xorig</mml:mi></mml:math>,
45 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">yorig</mml:mi></mml:math>,
46 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">width</mml:mi></mml:math>,
47 and
48 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">height</mml:mi></mml:math>
49 are computed from font metrics as
50 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
51
52 <mml:mrow>
53 <mml:mi mathvariant="italic">descent</mml:mi>
54 <mml:mo>-</mml:mo>
55 <mml:mn>1</mml:mn>
56 </mml:mrow>
57 </mml:math>,
58 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
59
60 <mml:mrow>
61 <mml:mo>-</mml:mo>
62 <mml:mi mathvariant="italic">lbearing</mml:mi>
63 </mml:mrow>
64 </mml:math>,
65 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
66
67 <mml:mrow>
68 <mml:mi mathvariant="italic">rbearing</mml:mi>
69 <mml:mo>-</mml:mo>
70 <mml:mi mathvariant="italic">lbearing</mml:mi>
71 </mml:mrow>
72 </mml:math>,
73 and
74 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll">
75
76 <mml:mrow>
77 <mml:mi mathvariant="italic">ascent</mml:mi>
78 <mml:mo>+</mml:mo>
79 <mml:mi mathvariant="italic">descent</mml:mi>
80 </mml:mrow>
81 </mml:math>,
82 respectively.
83 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">xmove</mml:mi></mml:math>
84 is taken from the glyph's
85 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">width</mml:mi></mml:math>
86 metric,
87 and
88 <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" overflow="scroll"><mml:mi mathvariant="italic">ymove</mml:mi></mml:math>
89 is set to zero.
90 Finally,
91 the glyph's image is converted to the appropriate format for <a class="citerefentry" href="glBitmap.xml"><span class="citerefentry"><span class="refentrytitle">glBitmap</span></span></a>.
92 </p><p>
93 Using <code class="function">glXUseXFont</code> may be more efficient than accessing the X font and generating
94 the display lists explicitly,
95 both because the display lists are created on the server without requiring
96 a round trip of the glyph data,
97 and because the server may choose to delay the creation of each
98 bitmap until it is accessed.
99 </p><p>
100 Empty display lists are created for all glyphs that are requested and
101 are not defined in <em class="parameter"><code>font</code></em>.
102 <code class="function">glXUseXFont</code> is ignored if there is no current GLX context.
103 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
104 <code class="constant">BadFont</code> is generated if <em class="parameter"><code>font</code></em> is not a valid font.
105 </p><p>
106 <code class="constant">GLXBadContextState</code> is generated if the current GLX context is
107 in display-list construction mode.
108 </p><p>
109 <code class="constant">GLXBadCurrentWindow</code> is generated if the drawable associated
110 with the current context of the calling thread is a window, and that
111 window is no longer valid.
112 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
113 <a class="citerefentry" href="glBitmap.xml"><span class="citerefentry"><span class="refentrytitle">glBitmap</span></span></a>,
114 <a class="citerefentry" href="glXMakeCurrent.xml"><span class="citerefentry"><span class="refentrytitle">glXMakeCurrent</span></span></a>
115 </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p>
116 Copyright <span class="trademark"></span>© 1991-2006
117 Silicon Graphics, Inc. This document is licensed under the SGI
118 Free Software B License. For details, see
119 <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
120 </p></div></div></body></html>