Skip to content
ConsoleMonster

API Reference

Class

TerminalWidthProfile

Namespace ConsoleMonster.Text
Assembly ConsoleMonster
Implements
IEquatable<TerminalWidthProfile>
Modifiers sealed

Describes terminal-specific Unicode cell width choices.

Inheritance

  • Object
  • TerminalWidthProfile

Usage

Explore 19 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 10

Constructors

public TerminalWidthProfile(Int32 emojiWidth = 2, Int32 ambiguousWidth = 1, ZwjRendering zwjSequences = Joined, Int32 flagWidth = 2, Int32 textPresentationWidth = 1, String source = "default") #

Creates a terminal width profile.

Parameters

emojiWidth System.Int32 = 2 optionalposition: 0
ambiguousWidth System.Int32 = 1 optionalposition: 1
zwjSequences ConsoleMonster.Text.ZwjRendering = Joined optionalposition: 2
flagWidth System.Int32 = 2 optionalposition: 3
textPresentationWidth System.Int32 = 1 optionalposition: 4
source System.String = "default" optionalposition: 5

Methods

Equals 2 overloads
public Boolean Equals(TerminalWidthProfile? other) #
Returns: Boolean

Indicates whether the current object is equal to another object of the same type.

Parameters

other ConsoleMonster.Text.TerminalWidthProfile? requiredposition: 0
An object to compare with this object.

Returns

true if the current object is equal to the other parameter; otherwise, false.

public override Boolean Equals(Object? obj) #
Returns: Boolean

Determines whether the specified object is equal to the current object.

Parameters

obj System.Object? requiredposition: 0
The object to compare with the current object.

Returns

true if the specified object is equal to the current object; otherwise, false.

public override Int32 GetHashCode() #
Returns: Int32

Serves as the default hash function.

Returns

A hash code for the current object.

public override String ToString() #
Returns: String

Returns a string that represents the current object.

Returns

A string that represents the current object.

public TerminalWidthProfile WithAmbiguousWidth(Int32 value) #
Returns: TerminalWidthProfile

Copies this profile with a different ambiguous width.

Parameters

value System.Int32 requiredposition: 0
public TerminalWidthProfile WithEmojiWidth(Int32 value) #
Returns: TerminalWidthProfile

Copies this profile with a different emoji width.

Parameters

value System.Int32 requiredposition: 0
public TerminalWidthProfile WithFlagWidth(Int32 value) #
Returns: TerminalWidthProfile

Copies this profile with a different flag width.

Parameters

value System.Int32 requiredposition: 0
public TerminalWidthProfile WithSource(String value) #
Returns: TerminalWidthProfile

Copies this profile with a different source label.

Parameters

value System.String requiredposition: 0
public TerminalWidthProfile WithTextPresentationWidth(Int32 value) #
Returns: TerminalWidthProfile

Copies this profile with a different text presentation width.

Parameters

value System.Int32 requiredposition: 0
public TerminalWidthProfile WithZwjSequences(ZwjRendering value) #
Returns: TerminalWidthProfile

Copies this profile with a different ZWJ rendering.

Parameters

value ConsoleMonster.Text.ZwjRendering requiredposition: 0

Properties

public Int32 EmojiWidth { get; } #

Emoji presentation cluster width.

public Int32 AmbiguousWidth { get; } #

East Asian Ambiguous code point width.

public ZwjRendering ZwjSequences { get; } #

Rendering model for emoji ZWJ sequences.

public Int32 FlagWidth { get; } #

Width of a regional indicator pair.

public Int32 TextPresentationWidth { get; } #

Width of emoji base plus VS15.

public String Source { get; } #

How this profile was selected.

public static TerminalWidthProfile Standard { get; } #

Standard terminal width assumptions.