# GrapeCity.Documents.Text.TextFormat.ResolveFontName

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Text_TextFormat_ResolveFontName_" data-uid="GrapeCity.Documents.Text.TextFormat.ResolveFontName*">ResolveFontName Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Text_TextFormat_ResolveFontName_" data-uid="GrapeCity.Documents.Text.TextFormat.ResolveFontName*"></a>
<h4 id="GrapeCity_Documents_Text_TextFormat_ResolveFontName_GrapeCity_Documents_Text_IFontCollection_System_Boolean_GrapeCity_Documents_Text_Font_" data-uid="GrapeCity.Documents.Text.TextFormat.ResolveFontName(GrapeCity.Documents.Text.IFontCollection,System.Boolean,GrapeCity.Documents.Text.Font)">ResolveFontName(IFontCollection, bool, Font)</h4>
<div class="markdown level1 summary"><p>Returns the <a class="xref" href="GrapeCity.Documents.Text.Font.html">Font</a> object for the current settings in the <a class="xref" href="GrapeCity.Documents.Text.TextFormat.FontName.html#GrapeCity_Documents_Text_TextFormat_FontName">FontName</a>, <a class="xref" href="GrapeCity.Documents.Text.TextFormat.FontBold.html#GrapeCity_Documents_Text_TextFormat_FontBold">FontBold</a>, <a class="xref" href="GrapeCity.Documents.Text.TextFormat.FontItalic.html#GrapeCity_Documents_Text_TextFormat_FontItalic">FontItalic</a> properties.
Note that if the FontName is specified (not empty), this method will return the same font that would be used by a <a class="xref" href="GrapeCity.Documents.Text.TextLayout.html">TextLayout</a> given the same settings.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Font ResolveFontName(IFontCollection fontCollection = null, bool restrictedFontLookup = false, Font defaultFont = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ResolveFontName(Optional fontCollection As IFontCollection = Nothing, Optional restrictedFontLookup As Boolean = False, Optional defaultFont As Font = Nothing) As Font</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="GrapeCity.Documents.Text.IFontCollection.html">IFontCollection</a></td>
      <td><span class="parametername">fontCollection</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Text.IFontCollection.html">IFontCollection</a> to search the font from. If this parameter is omitted the font is searched in <a class="xref" href="GrapeCity.Documents.Text.FontCollection.SystemFonts.html#GrapeCity_Documents_Text_FontCollection_SystemFonts">SystemFonts</a> only.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">restrictedFontLookup</span></td>
      <td><p>Indicates whether or not the font should be searched in the given fontCollection only. If False, the font is also searched in <a class="xref" href="GrapeCity.Documents.Text.FontCollection.SystemFonts.html#GrapeCity_Documents_Text_FontCollection_SystemFonts">SystemFonts</a>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Text.Font.html">Font</a></td>
      <td><span class="parametername">defaultFont</span></td>
      <td><p>The default font returned if font with specified name not found, if this parameter is null then fontCollection.DefaultFont or FontCollection.SystemFonts.DefaultFont is used.</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="GrapeCity.Documents.Text.Font.html">Font</a></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Text.Font.html">Font</a> object corresponding to <a class="xref" href="GrapeCity.Documents.Text.TextFormat.FontName.html#GrapeCity_Documents_Text_TextFormat_FontName">FontName</a> and font style in the current instance of <a class="xref" href="GrapeCity.Documents.Text.TextFormat.html">TextFormat</a>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
