Skip to content

Write-SpectreFigletText

Description

This function writes a Spectre Console Figlet text to the console. The text can be aligned to the left, right, or center, and can be displayed in a specified color.


Examples

Example 1
This example demonstrates how to write Figlet text to the console.

Write-SpectreFigletText -Text "Hello Spectre!" -Alignment "Center" -Color "Red"

Example 2
This example demonstrates how to write Figlet text to the console using a custom Figlet font.

Write-SpectreFigletText -Text "Whoa?!" -FigletFontPath "..\PwshSpectreConsole.Docs\src\assets\3d.flf"

Parameters

Text

The text to display in the Figlet format.

TypeRequiredPositionPipelineInput
[String]false1false

Alignment

The alignment of the text. The default value is “Left”.

Valid Values:

  • Left
  • Right
  • Center
TypeRequiredPositionPipelineInput
[String]false2false

Color

The color of the text. The default value is the accent color of the script.

TypeRequiredPositionPipelineInput
[Color]false3false

FigletFontPath

The path to the Figlet font file to use. If this parameter is not specified, the default built-in Figlet font is used. The figlet font format is usually *.flf, see https://spectreconsole.net/widgets/figlet for more.

TypeRequiredPositionPipelineInput
[String]false4false

PassThru

Returns the Spectre Figlet text object instead of writing it to the console.

TypeRequiredPositionPipelineInput
[Switch]falsenamedfalse

Syntax

Write-SpectreFigletText [[-Text] <String>] [[-Alignment] <String>] [[-Color] <Color>] [[-FigletFontPath] <String>] [-PassThru] [<CommonParameters>]