# FarPoint.Win.Spread.CellType.IPaintingContext.ToGdiFont

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_CellType_IPaintingContext_ToGdiFont_" data-uid="FarPoint.Win.Spread.CellType.IPaintingContext.ToGdiFont*">ToGdiFont Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_CellType_IPaintingContext_ToGdiFont_" data-uid="FarPoint.Win.Spread.CellType.IPaintingContext.ToGdiFont*"></a>
<h4 id="FarPoint_Win_Spread_CellType_IPaintingContext_ToGdiFont_GrapeCity_Spreadsheet_Font_System_Boolean_" data-uid="FarPoint.Win.Spread.CellType.IPaintingContext.ToGdiFont(GrapeCity.Spreadsheet.Font,System.Boolean)">ToGdiFont(Font, bool)</h4>
<div class="markdown level1 summary"><p>Gets the corresponding GDI+ font.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">Font ToGdiFont(Font font, bool useDefault = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function ToGdiFont(font As Font, Optional useDefault As Boolean = False) 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><span class="xref">Font</span></td>
      <td><span class="parametername">font</span></td>
      <td><p>The font data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">useDefault</span></td>
      <td><p><code>true</code> if the default font returned for an empty font data; otherwise, <code>false</code>.</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="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a> object represents the corresponding GDI+ font.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
