1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META http-equiv="Content-Style-Type" content="text/css"> 6<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 7<TITLE>Font - Introduction</TITLE> 8</HEAD> 9<BODY> 10 11<H1>FNT API</H1> 12 13<H2>Introduction</H2> 14<P> 15Two types of Wii bitmap fonts are stored in the NAND flash memory built into the Wii console. In addition, the same Wii bitmap fonts stored in NAND flash memory are included with the Revolution SDK in the form of files. 16</P> 17<P> 18The FNT functions provide basic features for using the Wii bitmap font included in the Revolution SDK and the Wii bitmap fonts stored in NAND flash memory. 19</P> 20<P> 21The Wii bitmap font stored in NAND flash memory can only be used with NAND applications. 22</P> 23 24<H2>Character Set</H2> 25<p>The Wii bitmap font has been created to roughly cover the following character sets. Kanji support extends to the JIS Level 2 kanji.<br> <br> ASCII<br> ISO 8859-1<br> ISO 8859-7<br> CP 932<br> CP 1252<br> CP 1253<br> JIS X 0201<br> JIS X 0208<br> DS External Characters<br> Wii External Characters<br> <br> The font images included in the Wii bitmap fonts can be accessed through the following links.<br><br> Wii Bitmap Font 1 <br><a href="images/wbf1-0.jpg">Image 1</a> <a href="images/wbf1-1.jpg">Image 2</a> <a href="images/wbf1-2.jpg">Image 3</a> <a href="images/wbf1-3.jpg">Image 4</a> <a href="images/wbf1-4.jpg">Image 5</a> <a href="images/wbf1-5.jpg">Image 6</a> <a href="images/wbf1-6.jpg">Image 7</a> <a href="images/wbf1-7.jpg">Image 8</a> <a href="images/wbf1-8.jpg">Image 9</a> <a href="images/wbf1-9.jpg">Image 10</a> <br><a href="images/wbf1-10.jpg">Image 11</a> <a href="images/wbf1-11.jpg">Image 12</a> <a href="images/wbf1-12.jpg">Image 13</a> <a href="images/wbf1-13.jpg">Image 14</a> <a href="images/wbf1-14.jpg">Image 15</a> <a href="images/wbf1-15.jpg">Image 16</a> <a href="images/wbf1-16.jpg">Image 17</a> <a href="images/wbf1-17.jpg">Image 18</a> <a href="images/wbf1-18.jpg">Image 19</a> <a href="images/wbf1-19.jpg">Image 20</a> <br><br>Wii Bitmap Font 2 <br><a href="images/wbf2-0.jpg">Image 1</a> <a href="images/wbf2-1.jpg">Image 2</a> <a href="images/wbf2-2.jpg">Image 3</a> <a href="images/wbf2-3.jpg">Image 4</a> <a href="images/wbf2-4.jpg">Image 5</a> <a href="images/wbf2-5.jpg">Image 6</a> <a href="images/wbf2-6.jpg">Image 7</a> <a href="images/wbf2-7.jpg">Image 8</a> <a href="images/wbf2-8.jpg">Image 9</a> <a href="images/wbf2-9.jpg">Image 10</a> <br><a href="images/wbf2-10.jpg">Image 11</a> <a href="images/wbf2-11.jpg">Image 12</a> <a href="images/wbf2-12.jpg">Image 13</a> <a href="images/wbf2-13.jpg">Image 14</a> <a href="images/wbf2-14.jpg">Image 15</a> <a href="images/wbf2-15.jpg">Image 16</a> <a href="images/wbf2-16.jpg">Image 17</a> <a href="images/wbf2-17.jpg">Image 18</a> <a href="images/wbf2-18.jpg">Image 19</a> <a href="images/wbf2-19.jpg">Image 20</a> 26</p> 27 28<H2>Using Wii Bitmap Fonts</H2> 29<P> 30The Wii bitmap font file (font resource) is in a compressed state. To use the Wii bitmap font, the compressed font data must first be expanded in main memory. 31</P> 32 33<H3>Expansion</H3> 34<P> 35There are two methods of using a Wii bitmap font: one where all font resources are loaded into memory from DVD or NAND, and another where font resources are loaded successively into memory from DVD or NAND. 36</P> 37<P> 38Whichever method you use, get the size of the font data buffer first using the <A href="FNTGetDataSize.html"><CODE>FNTGetDataSize</CODE></A> function and then allocate the font data buffer.<BR>If all font resources are loaded into memory, expand font data by calling the <A href="FNTConstruct.html"><CODE>FNTConstruct</CODE></A> function. If font resources are loaded into memory successively, first call the <A href="FNTInitStreamingConstruct.html"><CODE>FNTInitStreamingConstruct</CODE></A> function. Next, continue loading font resources and calling the <A href="FNTStreamingConstruct.html"><CODE>FNTStreamingConstruct</CODE></A> function until expansion of font data is finished. 39</P> 40 41<H3>Image Data</H3> 42<P>Image data is divided into multiple texture images (sheets) having the same size when expanded. A texture image sheet can be used as is as the texture image data stored in the <A href="../gx/Structures/GXTexObj.html"><CODE>GXTexObj</CODE></A> structure. The <A href="FNTGetTexture.html"><code>FNTGetTexture</code></a> function returns the pointer to the sheet that includes the specified character and the character position inside the sheet.</P> 43 44<H3>Character Width</H3> 45<P>The Wii bitmap font is a variable pitch (proportional) font. The width in texels of a specified character can be obtained by calling the <A href="FNTGetTexture.html"><CODE>FNTGetTexture</CODE></A> and <A href="FNTGetWidth.html"><CODE>FNTGetWidth</CODE></A> functions.</P> 46 47<H3>Encoding Method</H3> 48<P>The character encoding method to be passed to the <A href="FNTGetTexture.html"><CODE>FNTGetTexture</CODE></A> and <A href="FNTGetWidth.html"><CODE>FNTGetWidth</CODE></A> functions can be specified using the <A href="FNTSetEncoding.html"><CODE>FNTSetEncoding</CODE></A> function. The current encoding method can be obtained using <A href="FNTGetEncoding.html"><CODE>FNTGetEncoding</CODE></A>. UTF16 is set immediately after initialization by the <A href="FNTConstruct.html"><CODE>FNTConstruct</CODE></A> or <A href="FNTStreamingConstruct.html"><CODE>FNTStreamingConstruct</CODE></A> function.</P> 49 50<H3>Size Information</H3> 51<P>Font height, ascent, descent, line spacing, and so on can be obtained using the <A href="FNTGetMetrics.html"><CODE>FNTGetMetrics</CODE></A> function. 52</P> 53 54<H3>Alternate Characters</H3> 55<P>Using the <A href="FNTSetAlternateChar.html"><CODE>FNTSetAlternateChar</CODE></A> function, you can change the alternate character that is used to substitute for any characters not included in the font. 56</P> 57 58<H2>Chinese and Korean Versions of Wii Bitmap Fonts</H2> 59<P> 60You need to use special Wii bitmap fonts for the Chinese and Korean versions of the Wii console. Use the Chinese and Korean versions of the Wii bitmap fonts, which are stored in the following directories: 61</P> 62<table border="1" width="80%"> 63 <tbody> 64 <tr> 65 <td width="80%"> 66<pre><code> 67/dvddata/fonts_chn 68/dvddata/fonts_kor 69</code></pre> 70 </td> 71 </tr> 72 </tbody> 73</table> 74<p> 75Font images included in the Chinese version bitmap fonts can be accessed via the following links.<br><br> Chinese version bitmap font 1<br> <a href="images/wbf1_cn_1.jpg">Image 1</a> <a href="images/wbf1_cn_2.jpg">Image 2</a> <a href="images/wbf1_cn_3.jpg">Image 3</a> <a href="images/wbf1_cn_4.jpg">Image 4</a> <a href="images/wbf1_cn_5.jpg">Image 5</a> <a href="images/wbf1_cn_6.jpg">Image 6</a> <a href="images/wbf1_cn_7.jpg">Image 7</a> <a href="images/wbf1_cn_8.jpg">Image 8</a> <a href="images/wbf1_cn_9.jpg">Image 9</a> <a href="images/wbf1_cn_10.jpg">Image 10</a> <br> <a href="images/wbf1_cn_11.jpg">Image 11</a> <a href="images/wbf1_cn_12.jpg">Image 12</a> <a href="images/wbf1_cn_13.jpg">Image 13</a> <a href="images/wbf1_cn_14.jpg">Image 14</a> <a href="images/wbf1_cn_15.jpg">Image 15</a> <a href="images/wbf1_cn_16.jpg">Image 16</a> <a href="images/wbf1_cn_17.jpg">Image 17</a> <a href="images/wbf1_cn_18.jpg">Image 18</a> <a href="images/wbf1_cn_19.jpg">Image 19</a> <a href="images/wbf1_cn_20.jpg">Image 20</a> <br> <a href="images/wbf1_cn_21.jpg">Image 21</a> <a href="images/wbf1_cn_22.jpg">Image 22</a> <br> <br> Chinese version bitmap font 2<br> <a href="images/wbf2_cn_1.jpg">Image 1</a> <a href="images/wbf2_cn_2.jpg">Image 2</a> <a href="images/wbf2_cn_3.jpg">Image 3</a> <a href="images/wbf2_cn_4.jpg">Image 4</a> <a href="images/wbf2_cn_5.jpg">Image 5</a> <a href="images/wbf2_cn_6.jpg">Image 6</a> <a href="images/wbf2_cn_7.jpg">Image 7</a> <a href="images/wbf2_cn_8.jpg">Image 8</a> <a href="images/wbf2_cn_9.jpg">Image 9</a> <a href="images/wbf2_cn_10.jpg">Image 10</a> <br> <a href="images/wbf2_cn_11.jpg">Image 11</a> <a href="images/wbf2_cn_12.jpg">Image 12</a> <a href="images/wbf2_cn_13.jpg">Image 13</a> <a href="images/wbf2_cn_14.jpg">Image 14</a> <a href="images/wbf2_cn_15.jpg">Image 15</a> <a href="images/wbf2_cn_16.jpg">Image 16</a> <a href="images/wbf2_cn_17.jpg">Image 17</a> <a href="images/wbf2_cn_18.jpg">Image 18</a> <a href="images/wbf2_cn_19.jpg">Image 19</a> <a href="images/wbf2_cn_20.jpg">Image 20</a> <br> <a href="images/wbf2_cn_21.jpg">Image 21</a> <a href="images/wbf2_cn_22.jpg">Image 22</a> <br> <br> 76 77Font images included in the Korean version bitmap fonts can be accessed via the following links.<br><br> Korean version bitmap font 1<br> <a href="images/wbf1_kr_1.jpg">Image 1</a> <a href="images/wbf1_kr_2.jpg">Image 2</a> <a href="images/wbf1_kr_3.jpg">Image 3</a> <a href="images/wbf1_kr_4.jpg">Image 4</a> <a href="images/wbf1_kr_5.jpg">Image 5</a> <a href="images/wbf1_kr_6.jpg">Image 6</a> <a href="images/wbf1_kr_7.jpg">Image 7</a> <a href="images/wbf1_kr_8.jpg">Image 8</a> <a href="images/wbf1_kr_9.jpg">Image 9</a> <a href="images/wbf1_kr_10.jpg">Image 10</a> <br> <a href="images/wbf1_kr_11.jpg">Image 11</a> <a href="images/wbf1_kr_12.jpg">Image 12</a> <a href="images/wbf1_kr_13.jpg">Image 13</a> <a href="images/wbf1_kr_14.jpg">Image 14</a> <a href="images/wbf1_kr_15.jpg">Image 15</a> <a href="images/wbf1_kr_16.jpg">Image 16</a> <a href="images/wbf1_kr_17.jpg">Image 17</a> <a href="images/wbf1_kr_18.jpg">Image 18</a> <a href="images/wbf1_kr_19.jpg">Image 19</a> <a href="images/wbf1_kr_20.jpg">Image 20</a> <br> <a href="images/wbf1_kr_21.jpg">Image 21</a> <a href="images/wbf1_kr_22.jpg">Image 22</a> <a href="images/wbf1_kr_23.jpg">Image 23</a> <a href="images/wbf1_kr_24.jpg">Image 24</a> <a href="images/wbf1_kr_25.jpg">Image 25</a> <a href="images/wbf1_kr_26.jpg">Image 26</a> <a href="images/wbf1_kr_27.jpg">Image 27</a> <a href="images/wbf1_kr_28.jpg">Image 28</a> <a href="images/wbf1_kr_29.jpg">Image 29</a> <a href="images/wbf1_kr_30.jpg">Image 30</a> <br> <a href="images/wbf1_kr_31.jpg">Image 31</a> <a href="images/wbf1_kr_32.jpg">Image 32</a> <a href="images/wbf1_kr_33.jpg">Image 33</a> <br> <br> Korean version bitmap font 2<br> <a href="images/wbf2_kr_1.jpg">Image 1</a> <a href="images/wbf2_kr_2.jpg">Image 2</a> <a href="images/wbf2_kr_3.jpg">Image 3</a> <a href="images/wbf2_kr_4.jpg">Image 4</a> <a href="images/wbf2_kr_5.jpg">Image 5</a> <a href="images/wbf2_kr_6.jpg">Image 6</a> <a href="images/wbf2_kr_7.jpg">Image 7</a> <a href="images/wbf2_kr_8.jpg">Image 8</a> <a href="images/wbf2_kr_9.jpg">Image 9</a> <a href="images/wbf2_kr_10.jpg">Image 10</a> <br> <a href="images/wbf2_kr_11.jpg">Image 11</a> <a href="images/wbf2_kr_12.jpg">Image 12</a> <a href="images/wbf2_kr_13.jpg">Image 13</a> <a href="images/wbf2_kr_14.jpg">Image 14</a> <a href="images/wbf2_kr_15.jpg">Image 15</a> <a href="images/wbf2_kr_16.jpg">Image 16</a> <a href="images/wbf2_kr_17.jpg">Image 17</a> <a href="images/wbf2_kr_18.jpg">Image 18</a> <a href="images/wbf2_kr_19.jpg">Image 19</a> <a href="images/wbf2_kr_20.jpg">Image 20</a> <br> <a href="images/wbf2_kr_21.jpg">Image 21</a> <a href="images/wbf2_kr_22.jpg">Image 22</a> <a href="images/wbf2_kr_23.jpg">Image 23</a> <a href="images/wbf2_kr_24.jpg">Image 24</a> <a href="images/wbf2_kr_25.jpg">Image 25</a> <a href="images/wbf2_kr_26.jpg">Image 26</a> <a href="images/wbf2_kr_27.jpg">Image 27</a> <a href="images/wbf2_kr_28.jpg">Image 28</a> <a href="images/wbf2_kr_29.jpg">Image 29</a> <a href="images/wbf2_kr_30.jpg">Image 30</a> <br> <a href="images/wbf2_kr_31.jpg">Image 31</a> <a href="images/wbf2_kr_32.jpg">Image 32</a> <a href="images/wbf2_kr_33.jpg">Image 33</a> 78</p> 79 80<H3>Note</H3> 81<P> 82The Chinese and Korean versions of the Wii bitmap fonts contain a bug: The index of their default alternate character is not set correctly. These bitmap font versions cannot use their default alternate characters. When using alternate characters with these fonts, explicitly specify them.</p> 83 84<h2>Modifications</h2> 85<p> 86You can use Wii bitmap fonts that you have modified yourself. For example, you can use techniques such as edges and drop shadows. 87</p> 88<H2>Reference</H2> 89<TABLE border="1" cellpadding="3" cellspacing="0"> 90 <TBODY> 91 <TR> 92<TD bgcolor="#C0C0C0"><B>File</B></TD> 93<TD bgcolor="#C0C0C0"><B>Description</B></TD> 94 </TR> 95 <TR> 96<TD><CODE>fntdemo/src/fntdemo1.c</CODE></TD> 97<TD>The sample demo displays characters using two types of fonts.</TD> 98 </TR> 99 </TBODY> 100</TABLE> 101 102<H2>Revision History</H2> 103<P> 1042009/02/20 Added lists of Chinese and Korean bitmap fonts.<br>2008/07/23 Added descriptions for character groups and modifications.<br>2008/06/24 Added description of the Chinese and Korean versions of the Wii bitmap fonts.<BR>2008/04/14 Added mention of alternate characters.<BR>2006/10/01 Initial version. 105</P> 106 107<hr><p>CONFIDENTIAL</p></body> 108</HTML>