57 lines
2.0 KiB
HTML
57 lines
2.0 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
|
<html>
|
|
<head>
|
|
<title>Fonts</title>
|
|
<link href="style.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<body background="images/back.gif">
|
|
<!--START-->
|
|
|
|
|
|
<h3>Fonts</h3>
|
|
It is possible to create, replace, and delete fonts during the game using
|
|
the following functions. (Don't replace a font that is set as the current
|
|
font or at least set it again afterwards.)
|
|
|
|
<p>
|
|
<blockquote>
|
|
<tt><b>font_add(name,size,bold,italic,first,last)</b></tt>
|
|
Adds a new font and returns its index, indicating the name,
|
|
size, whether it is bold or italic, and the first and last
|
|
character that must be created.<br>
|
|
<tt><b>font_add_sprite(spr,first,prop,sep)</b></tt>
|
|
Adds a new font and returns its index. The font is created from
|
|
a sprite. The sprite should contain a subimage for each character.
|
|
<tt>first</tt> indicate the index of the first character in the sprite.
|
|
For example, use <tt>ord('0')</tt> if your sprite only contains the
|
|
digits. <tt>prop</tt> indicates whether the font is proportional.
|
|
In a proportional font, for each character the width of the bounding box is
|
|
used as the character width. Finally, <tt>sep</tt> indicates
|
|
the amount of white space that must separate the characters horizontally.
|
|
A typical value would lie between 2 and 8 depending on the font size.<BR>
|
|
<tt><b>font_replace(ind,name,size,bold,italic,first,last)</b></tt>
|
|
Replaces the font <tt>ind</tt> with a new font, indicating the name,
|
|
size, whether it is bold or italic, and the first and last
|
|
character that must be created.<br>
|
|
<tt><b>font_replace_sprite(ind,spr,first,prop,sep)</b></tt>
|
|
Replaces the font <tt>ind</tt> with a new sprite-based font.<br>
|
|
<tt><b>font_delete(ind)</b></tt>
|
|
Deletes the font with the given index, freeing the memory it uses.<br>
|
|
</blockquote>
|
|
|
|
<p>
|
|
|
|
|
|
<!--END-->
|
|
</body>
|
|
</html>
|
|
|
|
<!-- KEYWORDS
|
|
font_add()
|
|
font_add_sprite()
|
|
font_replace()
|
|
font_replace_sprite()
|
|
font_delete()
|
|
|
|
--> |