# C1.Util.DX.DirectWrite.TextFormat.Create

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DirectWrite_TextFormat_Create_" data-uid="C1.Util.DX.DirectWrite.TextFormat.Create*">Create Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DirectWrite_TextFormat_Create_" data-uid="C1.Util.DX.DirectWrite.TextFormat.Create*"></a>
<h4 id="C1_Util_DX_DirectWrite_TextFormat_Create_C1_Util_DX_DirectWrite_Factory_System_String_System_Single_" data-uid="C1.Util.DX.DirectWrite.TextFormat.Create(C1.Util.DX.DirectWrite.Factory,System.String,System.Single)">Create(Factory, string, float)</h4>
<div class="markdown level1 summary"><p>Creates a text format object used for text layout with normal weight, style and stretch.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static TextFormat Create(Factory factory, string fontFamilyName, float fontSize)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(factory As Factory, fontFamilyName As String, fontSize As Single) As TextFormat</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="C1.Util.DX.DirectWrite.Factory.html">Factory</a></td>
      <td><span class="parametername">factory</span></td>
      <td><p>an instance of <a class="xref" href="C1.Util.DX.DirectWrite.Factory.html">Factory</a></p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">fontFamilyName</span></td>
      <td><p>An array of characters that contains the name of the font family</p>
</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>The logical size of the font in DIP (&quot;device-independent pixel&quot;) units. A DIP equals 1/96 inch.</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.Util.DX.DirectWrite.TextFormat.html">TextFormat</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_DirectWrite_TextFormat_Create_" data-uid="C1.Util.DX.DirectWrite.TextFormat.Create*"></a>
<h4 id="C1_Util_DX_DirectWrite_TextFormat_Create_C1_Util_DX_DirectWrite_Factory_System_String_C1_Util_DX_DirectWrite_FontWeight_C1_Util_DX_DirectWrite_FontStyle_System_Single_" data-uid="C1.Util.DX.DirectWrite.TextFormat.Create(C1.Util.DX.DirectWrite.Factory,System.String,C1.Util.DX.DirectWrite.FontWeight,C1.Util.DX.DirectWrite.FontStyle,System.Single)">Create(Factory, string, FontWeight, FontStyle, float)</h4>
<div class="markdown level1 summary"><p>Creates a text format object used for text layout with normal stretch.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static TextFormat Create(Factory factory, string fontFamilyName, FontWeight fontWeight, FontStyle fontStyle, float fontSize)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(factory As Factory, fontFamilyName As String, fontWeight As FontWeight, fontStyle As FontStyle, fontSize As Single) As TextFormat</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="C1.Util.DX.DirectWrite.Factory.html">Factory</a></td>
      <td><span class="parametername">factory</span></td>
      <td><p>an instance of <a class="xref" href="C1.Util.DX.DirectWrite.Factory.html">Factory</a></p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">fontFamilyName</span></td>
      <td><p>An array of characters that contains the name of the font family</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontWeight.html">FontWeight</a></td>
      <td><span class="parametername">fontWeight</span></td>
      <td><p>A value that indicates the font weight for the text object created by this method.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontStyle.html">FontStyle</a></td>
      <td><span class="parametername">fontStyle</span></td>
      <td><p>A value that indicates the font style for the text object created by this method.</p>
</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>The logical size of the font in DIP (&quot;device-independent pixel&quot;) units. A DIP equals 1/96 inch.</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.Util.DX.DirectWrite.TextFormat.html">TextFormat</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_DirectWrite_TextFormat_Create_" data-uid="C1.Util.DX.DirectWrite.TextFormat.Create*"></a>
<h4 id="C1_Util_DX_DirectWrite_TextFormat_Create_C1_Util_DX_DirectWrite_Factory_System_String_C1_Util_DX_DirectWrite_FontWeight_C1_Util_DX_DirectWrite_FontStyle_C1_Util_DX_DirectWrite_FontStretch_System_Single_" data-uid="C1.Util.DX.DirectWrite.TextFormat.Create(C1.Util.DX.DirectWrite.Factory,System.String,C1.Util.DX.DirectWrite.FontWeight,C1.Util.DX.DirectWrite.FontStyle,C1.Util.DX.DirectWrite.FontStretch,System.Single)">Create(Factory, string, FontWeight, FontStyle, FontStretch, float)</h4>
<div class="markdown level1 summary"><p>Creates a text format object used for text layout.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static TextFormat Create(Factory factory, string fontFamilyName, FontWeight fontWeight, FontStyle fontStyle, FontStretch fontStretch, float fontSize)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(factory As Factory, fontFamilyName As String, fontWeight As FontWeight, fontStyle As FontStyle, fontStretch As FontStretch, fontSize As Single) As TextFormat</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="C1.Util.DX.DirectWrite.Factory.html">Factory</a></td>
      <td><span class="parametername">factory</span></td>
      <td><p>an instance of <a class="xref" href="C1.Util.DX.DirectWrite.Factory.html">Factory</a></p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">fontFamilyName</span></td>
      <td><p>An array of characters that contains the name of the font family</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontWeight.html">FontWeight</a></td>
      <td><span class="parametername">fontWeight</span></td>
      <td><p>A value that indicates the font weight for the text object created by this method.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontStyle.html">FontStyle</a></td>
      <td><span class="parametername">fontStyle</span></td>
      <td><p>A value that indicates the font style for the text object created by this method.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontStretch.html">FontStretch</a></td>
      <td><span class="parametername">fontStretch</span></td>
      <td><p>A value that indicates the font stretch for the text object created by this method.</p>
</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>The logical size of the font in DIP (&quot;device-independent pixel&quot;) units. A DIP equals 1/96 inch.</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.Util.DX.DirectWrite.TextFormat.html">TextFormat</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_DirectWrite_TextFormat_Create_" data-uid="C1.Util.DX.DirectWrite.TextFormat.Create*"></a>
<h4 id="C1_Util_DX_DirectWrite_TextFormat_Create_C1_Util_DX_DirectWrite_Factory_System_String_C1_Util_DX_DirectWrite_FontCollection_C1_Util_DX_DirectWrite_FontWeight_C1_Util_DX_DirectWrite_FontStyle_C1_Util_DX_DirectWrite_FontStretch_System_Single_" data-uid="C1.Util.DX.DirectWrite.TextFormat.Create(C1.Util.DX.DirectWrite.Factory,System.String,C1.Util.DX.DirectWrite.FontCollection,C1.Util.DX.DirectWrite.FontWeight,C1.Util.DX.DirectWrite.FontStyle,C1.Util.DX.DirectWrite.FontStretch,System.Single)">Create(Factory, string, FontCollection, FontWeight, FontStyle, FontStretch, float)</h4>
<div class="markdown level1 summary"><p>Creates a text format object used for text layout.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static TextFormat Create(Factory factory, string fontFamilyName, FontCollection fontCollection, FontWeight fontWeight, FontStyle fontStyle, FontStretch fontStretch, float fontSize)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(factory As Factory, fontFamilyName As String, fontCollection As FontCollection, fontWeight As FontWeight, fontStyle As FontStyle, fontStretch As FontStretch, fontSize As Single) As TextFormat</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="C1.Util.DX.DirectWrite.Factory.html">Factory</a></td>
      <td><span class="parametername">factory</span></td>
      <td><p>an instance of <a class="xref" href="C1.Util.DX.DirectWrite.Factory.html">Factory</a></p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">fontFamilyName</span></td>
      <td><p>An array of characters that contains the name of the font family</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontCollection.html">FontCollection</a></td>
      <td><span class="parametername">fontCollection</span></td>
      <td><p>A pointer to a font collection object. When this is NULL, indicates the system font collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontWeight.html">FontWeight</a></td>
      <td><span class="parametername">fontWeight</span></td>
      <td><p>A value that indicates the font weight for the text object created by this method.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontStyle.html">FontStyle</a></td>
      <td><span class="parametername">fontStyle</span></td>
      <td><p>A value that indicates the font style for the text object created by this method.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontStretch.html">FontStretch</a></td>
      <td><span class="parametername">fontStretch</span></td>
      <td><p>A value that indicates the font stretch for the text object created by this method.</p>
</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>The logical size of the font in DIP (&quot;device-independent pixel&quot;) units. A DIP equals 1/96 inch.</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.Util.DX.DirectWrite.TextFormat.html">TextFormat</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_DirectWrite_TextFormat_Create_" data-uid="C1.Util.DX.DirectWrite.TextFormat.Create*"></a>
<h4 id="C1_Util_DX_DirectWrite_TextFormat_Create_C1_Util_DX_DirectWrite_Factory_System_String_C1_Util_DX_DirectWrite_FontCollection_C1_Util_DX_DirectWrite_FontWeight_C1_Util_DX_DirectWrite_FontStyle_C1_Util_DX_DirectWrite_FontStretch_System_Single_System_String_" data-uid="C1.Util.DX.DirectWrite.TextFormat.Create(C1.Util.DX.DirectWrite.Factory,System.String,C1.Util.DX.DirectWrite.FontCollection,C1.Util.DX.DirectWrite.FontWeight,C1.Util.DX.DirectWrite.FontStyle,C1.Util.DX.DirectWrite.FontStretch,System.Single,System.String)">Create(Factory, string, FontCollection, FontWeight, FontStyle, FontStretch, float, string)</h4>
<div class="markdown level1 summary"><p>Creates a text format object used for text layout.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static TextFormat Create(Factory factory, string fontFamilyName, FontCollection fontCollection, FontWeight fontWeight, FontStyle fontStyle, FontStretch fontStretch, float fontSize, string localeName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Create(factory As Factory, fontFamilyName As String, fontCollection As FontCollection, fontWeight As FontWeight, fontStyle As FontStyle, fontStretch As FontStretch, fontSize As Single, localeName As String) As TextFormat</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="C1.Util.DX.DirectWrite.Factory.html">Factory</a></td>
      <td><span class="parametername">factory</span></td>
      <td><p>an instance of <a class="xref" href="C1.Util.DX.DirectWrite.Factory.html">Factory</a></p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">fontFamilyName</span></td>
      <td><p>An array of characters that contains the name of the font family</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontCollection.html">FontCollection</a></td>
      <td><span class="parametername">fontCollection</span></td>
      <td><p>A pointer to a font collection object. When this is NULL, indicates the system font collection.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontWeight.html">FontWeight</a></td>
      <td><span class="parametername">fontWeight</span></td>
      <td><p>A value that indicates the font weight for the text object created by this method.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontStyle.html">FontStyle</a></td>
      <td><span class="parametername">fontStyle</span></td>
      <td><p>A value that indicates the font style for the text object created by this method.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.FontStretch.html">FontStretch</a></td>
      <td><span class="parametername">fontStretch</span></td>
      <td><p>A value that indicates the font stretch for the text object created by this method.</p>
</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>The logical size of the font in DIP (&quot;device-independent pixel&quot;) units. A DIP equals 1/96 inch.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">localeName</span></td>
      <td><p>An array of characters that contains the locale name.</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.Util.DX.DirectWrite.TextFormat.html">TextFormat</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
