# GrapeCity.Documents.Text.Font.FromArray

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Text_Font_FromArray_" data-uid="GrapeCity.Documents.Text.Font.FromArray*">FromArray Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Text_Font_FromArray_" data-uid="GrapeCity.Documents.Text.Font.FromArray*"></a>
<h4 id="GrapeCity_Documents_Text_Font_FromArray_System_Byte___System_Boolean_" data-uid="GrapeCity.Documents.Text.Font.FromArray(System.Byte[],System.Boolean)">FromArray(byte[], bool)</h4>
<div class="markdown level1 summary"><p>Loads the first <a class="xref" href="GrapeCity.Documents.Text.Font.html">Font</a> from a byte array.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Font FromArray(byte[] fontData, bool initCodeMap = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function FromArray(fontData As Byte(), Optional initCodeMap As Boolean = False) As Font</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a>[]</td>
      <td><span class="parametername">fontData</span></td>
      <td><p>The byte array with the font data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">initCodeMap</span></td>
      <td><p>Set this parameter to True if you're planning to add the font to the fallback font collection.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Text.Font.html">Font</a></td>
      <td><p>The newly created font, or null if the file did not contain any fonts.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Text_Font_FromArray_" data-uid="GrapeCity.Documents.Text.Font.FromArray*"></a>
<h4 id="GrapeCity_Documents_Text_Font_FromArray_System_Byte___System_String_" data-uid="GrapeCity.Documents.Text.Font.FromArray(System.Byte[],System.String)">FromArray(byte[], string)</h4>
<div class="markdown level1 summary"><p>Loads a <a class="xref" href="GrapeCity.Documents.Text.Font.html">Font</a> with given full font name from a byte array.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Font FromArray(byte[] fontData, string fullFontName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function FromArray(fontData As Byte(), fullFontName As String) As Font</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a>[]</td>
      <td><span class="parametername">fontData</span></td>
      <td><p>The byte array with the font data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">fullFontName</span></td>
      <td><p>The full font name to be loaded.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Text.Font.html">Font</a></td>
      <td><p>The newly created font.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
