# GrapeCity.ActiveReports.Core.Document.ITextLayoutService.LayoutShrinkToFit

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_ActiveReports_Core_Document_ITextLayoutService_LayoutShrinkToFit_" data-uid="GrapeCity.ActiveReports.Core.Document.ITextLayoutService.LayoutShrinkToFit*">LayoutShrinkToFit Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Core_Document_ITextLayoutService_LayoutShrinkToFit_" data-uid="GrapeCity.ActiveReports.Core.Document.ITextLayoutService.LayoutShrinkToFit*"></a>
<h4 id="GrapeCity_ActiveReports_Core_Document_ITextLayoutService_LayoutShrinkToFit_System_String_GrapeCity_ActiveReports_Document_Drawing_Font_System_Single_System_Single_GrapeCity_ActiveReports_Core_Document_TextLayoutParams_System_Single__" data-uid="GrapeCity.ActiveReports.Core.Document.ITextLayoutService.LayoutShrinkToFit(System.String,GrapeCity.ActiveReports.Document.Drawing.Font,System.Single,System.Single,GrapeCity.ActiveReports.Core.Document.TextLayoutParams,System.Single@)">LayoutShrinkToFit(string, Font, float, float, TextLayoutParams, out float)</h4>
<div class="markdown level1 summary"><p>Layouts a text with attempt to find min possible font</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">TextLayoutResult LayoutShrinkToFit(string text, Font font, float width, float height, TextLayoutParams param, out float fontSize)</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">text</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.Document.Drawing.Font.html">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>Width in inches</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>Height in inches</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.Core.Document.TextLayoutParams.html">TextLayoutParams</a></td>
      <td><span class="parametername">param</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">fontSize</span></td>
      <td><p>Result font size</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.ActiveReports.Core.Document.TextLayoutResult.html">TextLayoutResult</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
