# C1.Util.DX.DirectWrite.Factory.RegisterFontFileLoader

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DirectWrite_Factory_RegisterFontFileLoader_" data-uid="C1.Util.DX.DirectWrite.Factory.RegisterFontFileLoader*">RegisterFontFileLoader Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DirectWrite_Factory_RegisterFontFileLoader_" data-uid="C1.Util.DX.DirectWrite.Factory.RegisterFontFileLoader*"></a>
<h4 id="C1_Util_DX_DirectWrite_Factory_RegisterFontFileLoader_C1_Util_DX_DirectWrite_FontFileLoader_" data-uid="C1.Util.DX.DirectWrite.Factory.RegisterFontFileLoader(C1.Util.DX.DirectWrite.FontFileLoader)">RegisterFontFileLoader(FontFileLoader)</h4>
<div class="markdown level1 summary"><p>Registers a font file loader with DirectWrite.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void RegisterFontFileLoader(FontFileLoader fontFileLoader)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub RegisterFontFileLoader(fontFileLoader As FontFileLoader)</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="C1.Util.DX.DirectWrite.FontFileLoader.html">FontFileLoader</a></td>
      <td><span class="parametername">fontFileLoader</span></td>
      <td><p>Pointer to a <a class="xref" href="C1.Util.DX.DirectWrite.FontFileLoader.html">FontFileLoader</a> object for a particular file resource type.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_DX_DirectWrite_Factory_RegisterFontFileLoader_C1_Util_DX_DirectWrite_FontFileLoader__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This function registers a font file loader with DirectWrite. The font file loader interface, which should be implemented   by a singleton object, handles loading font file resources of a particular type from a key. A given instance can only be registered once. Succeeding attempts will return an error, indicating that it has already been registered. Note that font file loader implementations must not register themselves with DirectWrite inside their constructors, and must not unregister themselves inside their destructors, because registration and unregistraton operations increment and decrement the object reference count respectively. Instead, registration and unregistration with DirectWrite of font file loaders should be performed outside of the font file loader implementation.</p>
</div>
</div>
