# C1.Util.DX.DirectWrite.TextLayout.SetFontWeight

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DirectWrite_TextLayout_SetFontWeight_" data-uid="C1.Util.DX.DirectWrite.TextLayout.SetFontWeight*">SetFontWeight Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DirectWrite_TextLayout_SetFontWeight_" data-uid="C1.Util.DX.DirectWrite.TextLayout.SetFontWeight*"></a>
<h4 id="C1_Util_DX_DirectWrite_TextLayout_SetFontWeight_C1_Util_DX_DirectWrite_FontWeight_C1_Util_DX_DirectWrite_TextRange_" data-uid="C1.Util.DX.DirectWrite.TextLayout.SetFontWeight(C1.Util.DX.DirectWrite.FontWeight,C1.Util.DX.DirectWrite.TextRange)">SetFontWeight(FontWeight, TextRange)</h4>
<div class="markdown level1 summary"><p>HRESULT IDWriteTextLayout::SetFontWeight([In] DWRITE_FONT_WEIGHT fontWeight,[In] DWRITE_TEXT_RANGE textRange)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetFontWeight(FontWeight fontWeight, TextRange textRange)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetFontWeight(fontWeight As FontWeight, textRange As TextRange)</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.FontWeight.html">FontWeight</a></td>
      <td><span class="parametername">fontWeight</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.TextRange.html">TextRange</a></td>
      <td><span class="parametername">textRange</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
