# C1.Util.DX.DirectWrite.FontFallbackBuilder.AddMapping

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DirectWrite_FontFallbackBuilder_AddMapping_" data-uid="C1.Util.DX.DirectWrite.FontFallbackBuilder.AddMapping*">AddMapping Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DirectWrite_FontFallbackBuilder_AddMapping_" data-uid="C1.Util.DX.DirectWrite.FontFallbackBuilder.AddMapping*"></a>
<h4 id="C1_Util_DX_DirectWrite_FontFallbackBuilder_AddMapping_C1_Util_DX_DirectWrite_UnicodeRange___System_String___C1_Util_DX_DirectWrite_FontCollection_System_String_System_String_System_Single_" data-uid="C1.Util.DX.DirectWrite.FontFallbackBuilder.AddMapping(C1.Util.DX.DirectWrite.UnicodeRange[],System.String[],C1.Util.DX.DirectWrite.FontCollection,System.String,System.String,System.Single)">AddMapping(UnicodeRange[], string[], FontCollection, string, string, float)</h4>
<div class="markdown level1 summary"><p>Appends a single mapping to the list. Call this once for each additional mapping.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AddMapping(UnicodeRange[] ranges, string[] targetFamilyNames, FontCollection fontCollection, string localeName, string baseFamilyName, float scale = 1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AddMapping(ranges As UnicodeRange(), targetFamilyNames As String(), fontCollection As FontCollection, localeName As String, baseFamilyName As String, Optional scale As Single = 1)</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.UnicodeRange.html">UnicodeRange</a>[]</td>
      <td><span class="parametername">ranges</span></td>
      <td><p>Unicode ranges that apply to this mapping.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>[]</td>
      <td><span class="parametername">targetFamilyNames</span></td>
      <td><p>List of target family name strings.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontCollection.html">FontCollection</a></td>
      <td><span class="parametername">fontCollection</span></td>
      <td><p>Optional explicit font collection for this mapping.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">localeName</span></td>
      <td><p>Locale of the context.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">baseFamilyName</span></td>
      <td><p>Base family name to match against, if applicable.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">scale</span></td>
      <td><p>Scale factor to multiply the result target font by.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_DirectWrite_FontFallbackBuilder_AddMapping_" data-uid="C1.Util.DX.DirectWrite.FontFallbackBuilder.AddMapping*"></a>
<h4 id="C1_Util_DX_DirectWrite_FontFallbackBuilder_AddMapping_C1_Util_DX_DirectWrite_UnicodeRange___System_IntPtr___C1_Util_DX_DirectWrite_FontCollection_System_String_System_String_System_Single_" data-uid="C1.Util.DX.DirectWrite.FontFallbackBuilder.AddMapping(C1.Util.DX.DirectWrite.UnicodeRange[],System.IntPtr[],C1.Util.DX.DirectWrite.FontCollection,System.String,System.String,System.Single)">AddMapping(UnicodeRange[], IntPtr[], FontCollection, string, string, float)</h4>
<div class="markdown level1 summary"><p>HRESULT AddMapping(DWRITE_UNICODE_RANGE* ranges, UINT32 rangesCount, [in] WCHAR** targetFamilyNames, UINT32 targetFamilyNamesCount, [in, optional] IDWriteFontCollection fontCollection, [in, optional] WCHAR* localeName, [in, optional] WCHAR* baseFamilyName, FLOAT scale)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AddMapping(UnicodeRange[] unicodeRanges, IntPtr[] targetFamilyNames, FontCollection fontCollection, string localeName, string baseFamilyName, float scale)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AddMapping(unicodeRanges As UnicodeRange(), targetFamilyNames As IntPtr(), fontCollection As FontCollection, localeName As String, baseFamilyName As String, scale As Single)</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.UnicodeRange.html">UnicodeRange</a>[]</td>
      <td><span class="parametername">unicodeRanges</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a>[]</td>
      <td><span class="parametername">targetFamilyNames</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontCollection.html">FontCollection</a></td>
      <td><span class="parametername">fontCollection</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">localeName</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">baseFamilyName</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">scale</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_DirectWrite_FontFallbackBuilder_AddMapping_" data-uid="C1.Util.DX.DirectWrite.FontFallbackBuilder.AddMapping*"></a>
<h4 id="C1_Util_DX_DirectWrite_FontFallbackBuilder_AddMapping_C1_Util_DX_DirectWrite_UnicodeRange___System_IntPtr___System_IntPtr_System_IntPtr_System_IntPtr_System_Single_" data-uid="C1.Util.DX.DirectWrite.FontFallbackBuilder.AddMapping(C1.Util.DX.DirectWrite.UnicodeRange[],System.IntPtr[],System.IntPtr,System.IntPtr,System.IntPtr,System.Single)">AddMapping(UnicodeRange[], IntPtr[], IntPtr, IntPtr, IntPtr, float)</h4>
<div class="markdown level1 summary"><p>HRESULT AddMapping(DWRITE_UNICODE_RANGE* ranges, UINT32 rangesCount, [in] WCHAR** targetFamilyNames, UINT32 targetFamilyNamesCount, [in, optional] IDWriteFontCollection fontCollection, [in, optional] WCHAR* localeName, [in, optional] WCHAR* baseFamilyName, FLOAT scale)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AddMapping(UnicodeRange[] unicodeRanges, IntPtr[] targetFamilyNames, IntPtr fontCollection, IntPtr localeName, IntPtr baseFamilyName, float scale)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AddMapping(unicodeRanges As UnicodeRange(), targetFamilyNames As IntPtr(), fontCollection As IntPtr, localeName As IntPtr, baseFamilyName As IntPtr, scale As Single)</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.UnicodeRange.html">UnicodeRange</a>[]</td>
      <td><span class="parametername">unicodeRanges</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a>[]</td>
      <td><span class="parametername">targetFamilyNames</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">fontCollection</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">localeName</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">baseFamilyName</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">scale</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
