1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" />
7    <title>GetRequireBufferSize</title>
8  </head>
9  <body>
10    <h1><CODE>nw::font::ArchiveFont::GetRequireBufferSize</CODE> Member Function</h1>
11    <h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14static <span>u32</span> GetRequireBufferSize(
15     const void * bfnt,
16     const char * glyphGroups = <a href="../../../nw/font/ArchiveFontBase/LOAD_GLYPH_ALL.html">LOAD_GLYPH_ALL</a>
17);
18</pre>
19    </div>
20    <h2>Arguments</h2>
21    <div class="section">
22      <table class="arguments">
23        <thead>
24          <tr>
25            <td width="15" />
26            <th>Name</th>
27            <td>Description</td>
28          </tr>
29        </thead>
30        <tr>
31          <td>in</td>
32          <th>bfnt</th>
33          <td>Pointer to the header portion of the font resource.</td>
34        </tr>
35        <tr>
36          <td>in</td>
37          <th>glyphGroups</th>
38          <td>String specifying the glyph group to load.</td>
39        </tr> </table>
40    </div>
41    <h2>Return Values</h2>
42    <div class="section">Returns the buffer size required for constructing the font with the <CODE><a href="../../../nw/font/ArchiveFont/Construct.html">Construct</a></CODE> function or the <CODE><a href="../../../nw/font/ArchiveFont/InitStreamingConstruct.html">InitStreamingConstruct</a></CODE> function. <br /> Returns 0 if the buffer size could not be calculated for some reason, such as an invalid resource <CODE>bfnt</CODE>. </div>
43    <h2>Description</h2>
44    <div class="section">
45      <p>Calculates the buffer size required to construct the font.</p><p>The <CODE>brfnt</CODE> argument specifies a pointer to the header portion of the archive font loaded into memory. At least an amount equal to <CODE>ArchiveFont::HEADER_SIZE</CODE> (=16KB) needs to be loaded from the beginning of the file.</p><p>Specify in <CODE>glyphGroups</CODE> a comma-delimited string of the glyph groups to be loaded.
46				For example, to make available the glyphs belonging to the &quot;ascii&quot; group, specify as follows:</p><pre>u32 requireSize = ArchiveFont::GetRequireBufferSize(brfnt, &quot;ascii&quot;);</pre><p>To make available the glyphs belonging to the &quot;ascii&quot;, &quot;european&quot;, and &quot;jis0&quot; groups, specify as follows:</p><pre>u32 requireSize = ArchiveFont::GetRequireBufferSize(brfnt, &quot;ascii,european,jis0&quot;);</pre><p>  There is no significance to the order of the group names.<br /> These group names are defined by the glyph group specification (XGGP) file that is used when the archive font is created.<br /> Characters whose group is not defined by the glyph group specification (XGGP) file are assigned to the group with the name &quot;<CODE>*</CODE>&quot;. In the following example, glyphs belonging to the &quot;ascii&quot; group and glyphs not belonging to any group are specified.</p><pre>u32 requireSize = ArchiveFont::GetRequireBufferSize(brfnt, &quot;ascii,*&quot;);</pre><p>As a special case, all glyphs contained in an archive font are loaded when the empty string is specified in <CODE>glyphGroups</CODE>. Because <code>nw4r::ut::ArchiveFont::LOAD_GLYPH_ALL</code>, the default argument for <span class="argument">glyphGroups</span>, is the empty string, all glyphs are loaded by default.</p><p>The same size buffer is required to construct a font whether the <a href="ut_ArchiveFont_Construct.html"><CODE>Construct</CODE></a> function is used or the pair of the <CODE><a href="../../../nw/font/ArchiveFont/InitStreamingConstruct.html">nw::font::ArchiveFont::InitStreamingConstruct</a></CODE> function and the <CODE><a href="../../../nw/font/ArchiveFont/StreamingConstruct.html">nw::font::ArchiveFont::StreamingConstruct</a></CODE> function are used.</p></div>
47    <h2>See Also</h2>
48    <div class="section">
49      <p class="reference"><a href="../../../nw/font/Font/Font.html">nw::font::Font::Font</a><br /><a href="../../../nw/font/ArchiveFont/InitStreamingConstruct.html">nw::font::ArchiveFont::InitStreamingConstruct</a><br /><a href="../../../nw/font/ArchiveFont/StreamingConstruct.html">nw::font::ArchiveFont::StreamingConstruct</a><br /><a href="../../../nw/font/ArchiveFont/Construct.html">nw::font::ArchiveFont::Construct</a><br /> </p>
50    </div>
51    <h2>Revision History</h2>
52    <div class="section">
53      <dl class="history">
54        <dt>2009/11/09</dt>
55        <dd>Initial version.<br />
56        </dd>
57      </dl>
58    </div>
59  <hr><p>CONFIDENTIAL</p></body>
60</html>
61