# C1.WPF.Excel.XLFont.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_Excel_XLFont__ctor_" data-uid="C1.WPF.Excel.XLFont.#ctor*">XLFont Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_Excel_XLFont__ctor_" data-uid="C1.WPF.Excel.XLFont.#ctor*"></a>
<h4 id="C1_WPF_Excel_XLFont__ctor_System_String_System_Single_" data-uid="C1.WPF.Excel.XLFont.#ctor(System.String,System.Single)">XLFont(string, float)</h4>
<div class="markdown level1 summary"><p>Excel font initialization.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public XLFont(string fontName, float fontSize)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(fontName As String, fontSize As Single)</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">fontName</span></td>
      <td><p>The font name, by default Arial.</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 font size in points, by default 10 pt.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Excel_XLFont__ctor_" data-uid="C1.WPF.Excel.XLFont.#ctor*"></a>
<h4 id="C1_WPF_Excel_XLFont__ctor_System_String_System_Single_System_Windows_Media_Color_" data-uid="C1.WPF.Excel.XLFont.#ctor(System.String,System.Single,System.Windows.Media.Color)">XLFont(string, float, Color)</h4>
<div class="markdown level1 summary"><p>Excel font initialization.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public XLFont(string fontName, float fontSize, Color color)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(fontName As String, fontSize As Single, color As Color)</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">fontName</span></td>
      <td><p>The font name, by default Arial.</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 font size in points, by default 10 pt.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>The foreground color of the font, by default <b>Black</b>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Excel_XLFont__ctor_" data-uid="C1.WPF.Excel.XLFont.#ctor*"></a>
<h4 id="C1_WPF_Excel_XLFont__ctor_System_String_System_Single_System_Boolean_System_Boolean_" data-uid="C1.WPF.Excel.XLFont.#ctor(System.String,System.Single,System.Boolean,System.Boolean)">XLFont(string, float, bool, bool)</h4>
<div class="markdown level1 summary"><p>Excel font initialization.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public XLFont(string fontName, float fontSize, bool bold, bool italic)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(fontName As String, fontSize As Single, bold As Boolean, italic As Boolean)</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">fontName</span></td>
      <td><p>The font name, by default Arial.</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 font size in points, by default 10 pt.</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 flag of the font.</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 flag of the font.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Excel_XLFont__ctor_" data-uid="C1.WPF.Excel.XLFont.#ctor*"></a>
<h4 id="C1_WPF_Excel_XLFont__ctor_System_String_System_Single_System_Boolean_System_Boolean_System_Windows_Media_Color_" data-uid="C1.WPF.Excel.XLFont.#ctor(System.String,System.Single,System.Boolean,System.Boolean,System.Windows.Media.Color)">XLFont(string, float, bool, bool, Color)</h4>
<div class="markdown level1 summary"><p>Excel font initialization.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public XLFont(string fontName, float fontSize, bool bold, bool italic, Color color)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(fontName As String, fontSize As Single, bold As Boolean, italic As Boolean, color As Color)</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">fontName</span></td>
      <td><p>The font name, by default Arial.</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 font size in points, by default 10 pt.</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 flag of the font.</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 flag of the font.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>The foreground color of the font, by default <b>Black</b>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Excel_XLFont__ctor_" data-uid="C1.WPF.Excel.XLFont.#ctor*"></a>
<h4 id="C1_WPF_Excel_XLFont__ctor_System_String_System_Single_System_Boolean_System_Boolean_System_Boolean_C1_WPF_Excel_XLFontScript_C1_WPF_Excel_XLUnderlineStyle_System_Windows_Media_Color_" data-uid="C1.WPF.Excel.XLFont.#ctor(System.String,System.Single,System.Boolean,System.Boolean,System.Boolean,C1.WPF.Excel.XLFontScript,C1.WPF.Excel.XLUnderlineStyle,System.Windows.Media.Color)">XLFont(string, float, bool, bool, bool, XLFontScript, XLUnderlineStyle, Color)</h4>
<div class="markdown level1 summary"><p>Excel font initialization.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public XLFont(string fontName, float fontSize, bool bold, bool italic, bool strikeout, XLFontScript fs, XLUnderlineStyle us, Color color)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(fontName As String, fontSize As Single, bold As Boolean, italic As Boolean, strikeout As Boolean, fs As XLFontScript, us As XLUnderlineStyle, color As Color)</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">fontName</span></td>
      <td><p>The font name, by default Arial.</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 font size in points, by default 10 pt.</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 flag of the font.</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 flag of the font.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">strikeout</span></td>
      <td><p>The strikeout flag of the font.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Excel.XLFontScript.html">XLFontScript</a></td>
      <td><span class="parametername">fs</span></td>
      <td><p>The font superscript/subscript, by default <b>None</b>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Excel.XLUnderlineStyle.html">XLUnderlineStyle</a></td>
      <td><span class="parametername">us</span></td>
      <td><p>Select <a class="xref" href="C1.WPF.Excel.XLUnderlineStyle.html">XLUnderlineStyle</a> as underline style, by default <b>None</b>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>The foreground color of the font, by default <b>Black</b>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Excel_XLFont__ctor_" data-uid="C1.WPF.Excel.XLFont.#ctor*"></a>
<h4 id="C1_WPF_Excel_XLFont__ctor_System_String_System_Single_System_Boolean_System_Boolean_System_Boolean_C1_WPF_Excel_XLFontScript_C1_WPF_Excel_XLUnderlineStyle_System_Windows_Media_Color_System_Byte_" data-uid="C1.WPF.Excel.XLFont.#ctor(System.String,System.Single,System.Boolean,System.Boolean,System.Boolean,C1.WPF.Excel.XLFontScript,C1.WPF.Excel.XLUnderlineStyle,System.Windows.Media.Color,System.Byte)">XLFont(string, float, bool, bool, bool, XLFontScript, XLUnderlineStyle, Color, byte)</h4>
<div class="markdown level1 summary"><p>Excel font initialization.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public XLFont(string fontName, float fontSize, bool bold, bool italic, bool strikeout, XLFontScript fs, XLUnderlineStyle us, Color color, byte charSet)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(fontName As String, fontSize As Single, bold As Boolean, italic As Boolean, strikeout As Boolean, fs As XLFontScript, us As XLUnderlineStyle, color As Color, charSet As Byte)</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">fontName</span></td>
      <td><p>The font name, by default Arial.</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 font size in points, by default 10 pt.</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 flag of the font.</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 flag of the font.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">strikeout</span></td>
      <td><p>The strikeout flag of the font.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Excel.XLFontScript.html">XLFontScript</a></td>
      <td><span class="parametername">fs</span></td>
      <td><p>The font superscript/subscript, by default <b>None</b>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.Excel.XLUnderlineStyle.html">XLUnderlineStyle</a></td>
      <td><span class="parametername">us</span></td>
      <td><p>Select <a class="xref" href="C1.WPF.Excel.XLUnderlineStyle.html">XLUnderlineStyle</a> as underline style, by default <b>None</b>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>The foreground color of the font, by default <b>Black</b>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a></td>
      <td><span class="parametername">charSet</span></td>
      <td><p>The character set of the font, by default <b>zero</b>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
