<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:mml="http://www.w3.org/1998/Math/MathML"
><head><title>glutBitmapCharacter</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"/><link rel="home" href="index.xml" title="PyOpenGL 2.0.1.07 Man Pages"/><link rel="up" href="reference-GLUT.xml" title="GLUT"/><link rel="previous" href="glutAttachMenu.3GLUT.xml" title="glutAttachMenu"/><link rel="next" href="glutBitmapWidth.3GLUT.xml" title="glutBitmapWidth"/></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glutBitmapCharacter</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glutAttachMenu.3GLUT.xml">Prev</a> </td><th width="60%" align="center">GLUT</th><td width="20%" align="right"> <a accesskey="n" href="glutBitmapWidth.3GLUT.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glutBitmapCharacter.3GLUT"/><div class="titlepage"/><div class="refnamediv"><a name="glutBitmapCharacter.3GLUT-name"/><h2>Name</h2><p>glutBitmapCharacter &#8212; renders a bitmap character using OpenGL.</p></div><div class="refsynopsisdiv"><a name="glutBitmapCharacter.3GLUT-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glutBitmapCharacter</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>void *<i><tt>font</tt></i>, int <i><tt>character</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glutBitmapCharacter.3GLUT-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glutBitmapCharacter</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>font</tt></i>, <i><tt>character</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glutBitmapCharacter.3GLUT-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>font</tt></i></span></dt><dd>
						Bitmap font to use.
					</dd><dt><span class="term"><i><tt>character</tt></i></span></dt><dd>
						Character to render (not confined to 8 bits).
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glutBitmapCharacter.3GLUT-description"/><h2>Description</h2><p>
			Without using any display lists, <tt>glutBitmapCharacter</tt> renders the character in the named bitmap
			font. The available fonts are:
		</p><div class="variablelist"><dl><dt><span class="term"><tt>GLUT_BITMAP_8_BY_13</tt></span></dt><dd><p>
						A fixed width font with every character fitting in an 8 by 13 pixel rectangle. The exact bitmaps to be used
						is defined by the standard X glyph bitmaps for the X font named:
					</p><pre class="screen">-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1</pre></dd><dt><span class="term"><tt>GLUT_BITMAP_9_BY_15</tt></span></dt><dd><p>
						A fixed width font with every character fitting in an 9 by 15 pixel rectangle. The exact bitmaps to be used
						is defined by the standard X glyph bitmaps for the X font named:
					</p><pre class="screen">-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1</pre></dd><dt><span class="term"><tt>GLUT_BITMAP_TIMES_ROMAN_10</tt></span></dt><dd><p>
						A 10-point proportional spaced Times Roman font. The exact bitmaps to be used is defined by the standard X
						glyph bitmaps for the X font named:
					</p><pre class="screen">-adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1</pre></dd><dt><span class="term"><tt>GLUT_BITMAP_TIMES_ROMAN_24</tt></span></dt><dd><p>
						A 24-point proportional spaced Times Roman font. The exact bitmaps to be used is defined by the standard X
						glyph bitmaps for the X font named:
					</p><pre class="screen">-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1</pre></dd><dt><span class="term"><tt>GLUT_BITMAP_HELVETICA_10</tt></span></dt><dd><p>
						A 10-point proportional spaced Helvetica font. The exact bitmaps to be used is defined by the standard X
						glyph bitmaps for the X font named:
					</p><pre class="screen">-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1</pre></dd><dt><span class="term"><tt>GLUT_BITMAP_HELVETICA_12</tt></span></dt><dd><p>
						A 12-point proportional spaced Helvetica font. The exact bitmaps to be used is defined by the standard X
						glyph bitmaps for the X font named:
					</p><pre class="screen">-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1</pre></dd><dt><span class="term"><tt>GLUT_BITMAP_HELVETICA_18</tt></span></dt><dd><p>
						A 18-point proportional spaced Helvetica font. The exact bitmaps to be used is defined by the standard X
						glyph bitmaps for the X font named:
					</p><pre class="screen">-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1</pre></dd></dl></div><p>
			Rendering a nonexistent character has no effect. glutBitmapCharacter automatically sets the OpenGL unpack pixel storage
			modes it needs appropriately and saves and restores the previous modes before returning. The generated call to glBitmap
			will adjust the current raster position based on the width of the character.
		</p></div><div class="refsect1" lang="en"><a name="glutBitmapCharacter.3GLUT-example"/><h2>Example</h2><p>
			Here is a routine that shows how to render a string of ASCII text with <tt>glutBitmapCharacter</tt>:
		</p><pre class="programlisting">void output(int x, int y, char *string)
{
  int len, i;
  glRasterPos2f(x, y);
  len = (int) strlen(string);
  for (i = 0; i &lt; len; i++)
  {
    glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, string[i]);
  }
}</pre></div><div class="refsect1" lang="en"><a name="glutBitmapCharacter.3GLUT-see_also"/><h2>See Also</h2><p>
			<span class="simplelist"><a href="glutBitmapWidth.3GLUT.xml">glutBitmapWidth</a>, <a href="glutStrokeCharacter.3GLUT.xml">glutStrokeCharacter</a></span>
		</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glutAttachMenu.3GLUT.xml">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-GLUT.xml">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="glutBitmapWidth.3GLUT.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glutAttachMenu </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> glutBitmapWidth</td></tr></table></div></body></html>
