# C1.Document.Util.C1HtmlGraphics.DrawGlyphRun

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Document_Util_C1HtmlGraphics_DrawGlyphRun_" data-uid="C1.Document.Util.C1HtmlGraphics.DrawGlyphRun*">DrawGlyphRun Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Document_Util_C1HtmlGraphics_DrawGlyphRun_" data-uid="C1.Document.Util.C1HtmlGraphics.DrawGlyphRun*"></a>
<h4 id="C1_Document_Util_C1HtmlGraphics_DrawGlyphRun_System_Double_System_Double_System_Int32_System_IntPtr_System_IntPtr_System_IntPtr_System_IntPtr_System_Drawing_Color_C1_Document_Util_IC1TextRangeBase_C1_Document_Util_C1TextLayout_System_String_" data-uid="C1.Document.Util.C1HtmlGraphics.DrawGlyphRun(System.Double,System.Double,System.Int32,System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr,System.Drawing.Color,C1.Document.Util.IC1TextRangeBase,C1.Document.Util.C1TextLayout,System.String)">DrawGlyphRun(double, double, int, IntPtr, IntPtr, IntPtr, IntPtr, Color, IC1TextRangeBase, C1TextLayout, string)</h4>
<div class="markdown level1 summary"><p>Renders a run of glyphs.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public override void DrawGlyphRun(double baselineOriginX, double baselineOriginY, int glyphCount, IntPtr glyphIndices, IntPtr glyphAdvances, IntPtr glyphOffsets, IntPtr clusterMap, Color foreColor, IC1TextRangeBase range, C1TextLayout textLayout, string text)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overrides Sub DrawGlyphRun(baselineOriginX As Double, baselineOriginY As Double, glyphCount As Integer, glyphIndices As IntPtr, glyphAdvances As IntPtr, glyphOffsets As IntPtr, clusterMap As IntPtr, foreColor As Color, range As IC1TextRangeBase, textLayout As C1TextLayout, text As String)</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.double">double</a></td>
      <td><span class="parametername">baselineOriginX</span></td>
      <td><p>The X coordinate of the glyphs' baseline, if this is right-to-left text then X points to the &quot;right&quot; side of the text, glyphs should be drawn from this point to the left.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">baselineOriginY</span></td>
      <td><p>The Y coordinate of the glyphs' baseline, if range.IsSideways is true, i.e. glyphs should be drawn in vertical direction (japanese text), then Y equals to the middle of the glyphs' height.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">glyphCount</span></td>
      <td><p>The count of the glyphs.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">glyphIndices</span></td>
      <td><p>The pointer to the array of shorts containing indicies of the glyphs in the font specified by the range.GetFontFace(), use ((short*)glyphIndices)[i] to get i-th glyph index, all indices already resolved and can not be zero.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">glyphAdvances</span></td>
      <td><p>The pointer to the array of floats containing the glyphs' widths, use ((float*)glyphAdvances)[i] to get width of the i-th glyph.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">glyphOffsets</span></td>
      <td><p>The pointer to the array of DW.GlyphOffset structures, use ((DW.GlyphOffset*)glyphOffsets)[i] to get width of the i-th glyph.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">clusterMap</span></td>
      <td><p>The pointer to the table of text clusters.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">foreColor</span></td>
      <td><p>The color of the text.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">IC1TextRangeBase</span></td>
      <td><span class="parametername">range</span></td>
      <td><p>The <span class="xref">C1.Document.Util.IC1TextRangeBase</span> interface which allows to get extended information about text.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">C1TextLayout</span></td>
      <td><span class="parametername">textLayout</span></td>
      <td><p>The <span class="xref">C1.Document.Util.C1TextLayout</span> object calling this method.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>The text to drawn.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">C1Graphics.DrawGlyphRun(double, double, int, IntPtr, IntPtr, IntPtr, IntPtr, Color, IC1TextRangeBase, C1TextLayout, string)</a></div>
</div>
