# C1.C1Preview.EmbeddedFontCollection.FindFont

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_EmbeddedFontCollection_FindFont_" data-uid="C1.C1Preview.EmbeddedFontCollection.FindFont*">FindFont Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_EmbeddedFontCollection_FindFont_" data-uid="C1.C1Preview.EmbeddedFontCollection.FindFont*"></a>
<h4 id="C1_C1Preview_EmbeddedFontCollection_FindFont_System_String_System_Int32_System_Boolean_System_Boolean_" data-uid="C1.C1Preview.EmbeddedFontCollection.FindFont(System.String,System.Int32,System.Boolean,System.Boolean)">FindFont(string, int, bool, bool)</h4>
<div class="markdown level1 summary"><p>Searches for a font with the specified name and charset,
which exactly matches the specified bold/italic styles.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public EmbeddedFont FindFont(string name, int charSet, bool bold, bool italic)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function FindFont(name As String, charSet As Integer, bold As Boolean, italic As Boolean) As EmbeddedFont</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">name</span></td>
      <td><p>The name of the font to search for.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">charSet</span></td>
      <td><p>The charset to search for.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">bold</span></td>
      <td><p>The bold style to search for.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">italic</span></td>
      <td><p>The italic style to search for.</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="C1.C1Preview.EmbeddedFont.html">EmbeddedFont</a></td>
      <td><p>The matching <a class="xref" href="C1.C1Preview.EmbeddedFont.html">EmbeddedFont</a>, or <b>null</b> if an exact match was not found.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_EmbeddedFontCollection_FindFont_" data-uid="C1.C1Preview.EmbeddedFontCollection.FindFont*"></a>
<h4 id="C1_C1Preview_EmbeddedFontCollection_FindFont_System_String_System_Int32_System_Drawing_FontStyle_" data-uid="C1.C1Preview.EmbeddedFontCollection.FindFont(System.String,System.Int32,System.Drawing.FontStyle)">FindFont(string, int, FontStyle)</h4>
<div class="markdown level1 summary"><p>Searches for a font with the specified name and charset,
which exactly matches the specified bold/italic styles.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public EmbeddedFont FindFont(string name, int charSet, FontStyle fontStyle)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function FindFont(name As String, charSet As Integer, fontStyle As FontStyle) As EmbeddedFont</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">name</span></td>
      <td><p>The name of the font to search for.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">charSet</span></td>
      <td><p>The charset to search for.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.fontstyle">FontStyle</a></td>
      <td><span class="parametername">fontStyle</span></td>
      <td><p>The style of the font to match.</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="C1.C1Preview.EmbeddedFont.html">EmbeddedFont</a></td>
      <td><p>The matching <a class="xref" href="C1.C1Preview.EmbeddedFont.html">EmbeddedFont</a>, or <b>null</b> if an exact match was not found.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
