# C1.Util.SvgRendering.SetFont

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_SvgRendering_SetFont_" data-uid="C1.Util.SvgRendering.SetFont*">SetFont Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_SvgRendering_SetFont_" data-uid="C1.Util.SvgRendering.SetFont*"></a>
<h4 id="C1_Util_SvgRendering_SetFont_System_Object_" data-uid="C1.Util.SvgRendering.SetFont(System.Object)">SetFont(object)</h4>
<div class="markdown level1 summary"><p>Sets the font.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual void SetFont(object font)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Sub SetFont(font As Object)</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.object">object</a></td>
      <td><span class="parametername">font</span></td>
      <td><p>Native font object.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_SvgRendering_SetFont_" data-uid="C1.Util.SvgRendering.SetFont*"></a>
<h4 id="C1_Util_SvgRendering_SetFont_System_String_System_Double_System_Int32_" data-uid="C1.Util.SvgRendering.SetFont(System.String,System.Double,System.Int32)">SetFont(string, double, int)</h4>
<div class="markdown level1 summary"><p>Sets the current font based on the provided parameters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetFont(string fontName, double fontSize, int fontStyle = 0)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetFont(fontName As String, fontSize As Double, Optional fontStyle As Integer = 0)</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.string">string</a></td>
      <td><span class="parametername">fontName</span></td>
      <td><p>Font name</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">fontSize</span></td>
      <td><p>Font size</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">fontStyle</span></td>
      <td><p>Font style</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_SvgRendering_SetFont_System_String_System_Double_System_Int32__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Font Style:
Regular	 0	Normal text.
Bold        1	Bold text.
Italic      2	Italic text.
Underline   4	Underlined text.
Strikeout   8	Text with a line through the middle.</p>
</div>
</div>
