# C1.Util.DX.DirectWrite.FontFace.GetGlyphIndices

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DirectWrite_FontFace_GetGlyphIndices_" data-uid="C1.Util.DX.DirectWrite.FontFace.GetGlyphIndices*">GetGlyphIndices Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DirectWrite_FontFace_GetGlyphIndices_" data-uid="C1.Util.DX.DirectWrite.FontFace.GetGlyphIndices*"></a>
<h4 id="C1_Util_DX_DirectWrite_FontFace_GetGlyphIndices_System_Int32___" data-uid="C1.Util.DX.DirectWrite.FontFace.GetGlyphIndices(System.Int32[])">GetGlyphIndices(int[])</h4>
<div class="markdown level1 summary"><p>Returns the nominal mapping of UCS4 Unicode code points to glyph indices as defined by the font 'CMAP' table.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public short[] GetGlyphIndices(int[] codePoints)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetGlyphIndices(codePoints As Integer()) As Short()</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.int32">int</a>[]</td>
      <td><span class="parametername">codePoints</span></td>
      <td><p>An array of USC4 code points from which to obtain nominal glyph indices. The array must be allocated and be able to contain the number of elements specified by codePointCount.</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="https://learn.microsoft.com/dotnet/api/system.int16">short</a>[]</td>
      <td><p>a reference to an array of nominal glyph indices filled by this function.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_DX_DirectWrite_FontFace_GetGlyphIndices_System_Int32____remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Note that this mapping is primarily provided for line layout engines built on top of the physical font API. Because of OpenType glyph substitution and line layout character substitution, the nominal conversion does not always correspond to how a Unicode string will map to glyph indices when rendering using a particular font face. Also, note that Unicode variant selectors provide for alternate mappings for character to glyph. This call will always return the default variant.</p>
</div>


<a id="C1_Util_DX_DirectWrite_FontFace_GetGlyphIndices_" data-uid="C1.Util.DX.DirectWrite.FontFace.GetGlyphIndices*"></a>
<h4 id="C1_Util_DX_DirectWrite_FontFace_GetGlyphIndices_System_Int32___System_Int32_System_Int16___" data-uid="C1.Util.DX.DirectWrite.FontFace.GetGlyphIndices(System.Int32[],System.Int32,System.Int16[])">GetGlyphIndices(int[], int, short[])</h4>
<div class="markdown level1 summary"><p>HRESULT IDWriteFontFace::GetGlyphIndices([In, Buffer] const unsigned int* codePoints,[In] unsigned int codePointCount,[Out, Buffer] unsigned short* glyphIndices)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void GetGlyphIndices(int[] codePoints, int codePointCount, short[] glyphIndices)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub GetGlyphIndices(codePoints As Integer(), codePointCount As Integer, glyphIndices As Short())</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.int32">int</a>[]</td>
      <td><span class="parametername">codePoints</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">codePointCount</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int16">short</a>[]</td>
      <td><span class="parametername">glyphIndices</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
