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>OSLoadFont</TITLE>
8</HEAD>
9<BODY>
10<H1>OSLoadFont</H1>
11
12<H2>C Specification</H2>
13<DL>
14  <DD>
15<PRE><CODE>#include &lt;revolution/os.h&gt;
16
17// For OSLoadFont(*, temp)
18#define OS_FONT_ROM_SIZE_ANSI   12288   // 0x03000
19#define OS_FONT_ROM_SIZE_SJIS   315392  // 0x4D000
20
21// For OSLoadFont(fontData, *)
22#define OS_FONT_DATA_SIZE_ANSI  65824
23#define OS_FONT_DATA_SIZE_SJIS  593636</code></PRE>
24  <DD>
25<PRE><CODE>u32 OSLoadFont (OSFontHeader* fontData, void* temp);</CODE></PRE>
26</DL>
27<H2>Arguments</H2>
28<TABLE border="1" cellpadding="3" cellspacing="0.1">
29  <TBODY>
30    <TR>
31<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>fontData</CODE></EM></STRONG></CODE></STRONG></EM></TD>
32<TD width="520">Pointer to the font data buffer that has size <code>OS_FONT_DATA_SIZE_*</code> which depends on the font encoding.&nbsp;Must be 32-byte aligned.</TD>
33    </TR>
34    <TR>
35<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE><STRONG><EM><CODE>temp</CODE></EM></STRONG></CODE></STRONG></EM></TD>
36<TD width="520">Pointer to a temporary buffer that the <code>OSLoadFont</code> function uses. The buffer size must be <code>OS_FONT_ROM_SIZE_*</code>.&nbsp;This temporary buffer can be released after the function completes.&nbsp;Must be 32-byte aligned.</TD>
37    </TR>
38  </TBODY>
39</TABLE>
40<H2>Return Values</H2>
41<P>Font data size in bytes. Returns zero if font data is unavailable.</P>
42<H2>Description</H2>
43<P>The <CODE>OSLoadFont</CODE> function loads a ROM font. This is a low-level font function that must be used in conjuction with the <A href="OSGetFontTexel.html"><CODE>OSGetFontTexel</CODE></A> function. </P>
44<P><STRONG>Note: </STRONG><font color="red">This font is currently used on a provisional basis. It may not be allowed on the product version. </font>For the product version of Revolution, we plan to prepare a new font set that uses the internal flash memory.  A new font library for accessing this font will be prepared in future SDKs. </p>
45<H2>See Also</H2>
46<P><A target="contents" href="../toc.html#Font">Font Functions</A></P>
47<H2>Revision History</H2>
48<P>03/01/2006 Initial version.</P>
49</BODY>
50</HTML>