📄 hgefont_description.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- http://hge.relishgames.com -->
<html>
<head>
<meta name="Keywords" content="game engine, 2d, hardware accelerated, hge, engine, relish games, game development">
<meta name="Description" content="Haaf's Game Engine - Hardware accelerated 2D games engine">
<title>Haaf's Game Engine - Hardware accelerated 2D games engine</title>
<link rel=stylesheet type=text/css href=hge.css>
<script language="JavaScript" src="hge.js"></script>
</head>
<body onload="setContents('cnt_hgefont.html');" bgcolor=#ffffff text=#000000 link=#7F0000 vlink=#7F0000 alink=#7F0000 marginwidth=0 marginheight=0 leftmargin=0 topmargin=0>
<table height=100% cellspacing=0 cellpadding=0 border=0><tr>
<td valign=top>
<table width=566 cellspacing=0 cellpadding=20 border=0><tr><td>
<h1 style="margin-top:0px">Font description file format</h1>
<p>
To create and use a <b>hgeFont</b> object you will need a couple of files
that describe your font.
</p>
<h2>Font description file</h2>
<p>
This file must be passed to the <a href="hgefont_constructor.html">hgeFont constructor</a>.
It is just plain text file that contains specification
for all the font symbols. It holds a set of values
separated with whitespace characters ('\t', '\n' or ' ').
Here's an example:
</p>
<pre>
font2.png
16
-32
6 2 4 7 7 11 8 2 4 5 7 7 2 7 3 5 6 5 7 6 7 6
7 7 6 7 3 3 7 6 6 7 10 8 7 7 7 6 5 8 7 2
6 7 6 9 7 8 7 8 7 7 8 8 7 10 7 8 7
4 5 4 6 8 4 7 6 6 6 6 4 6 7 3 3 6 3 9 7 6 6 6
4 6 4 6 6 9 6 6 5 4 2 4 7
-129
</pre>
<p>
The first value specifies the font bitmap file (see below).
The path is relative to the description file folder.
Then goes the font symbols height in pixels. And finally,
widths for all 255 symbols. If you want to skip some of them -
you may use a negative value specifying the number of symbols to skip.
</p>
<h2>Font bitmap file</h2>
<p>
This file must hold the images of all the symbols, specified
in the font description file. The images must start at the top-left
corner of the bitmap file and go in left-to-right, top-to-bottom
order without any additional space between them.
<br><br>
The font bitmap file dimensions must be a power of 2.
</p>
<br>
</td></tr></table>
</td>
</tr></table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -