Skip to content
ConsoleMonster
Class

TerminalWidthProfile

ConsoleMonster.Text

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

Describes terminal-specific Unicode cell width choices.

Inheritance

  • object
  • TerminalWidthProfile

Usage

Explore 21 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 12

Constructors

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

Creates a terminal width profile.

Parameters

emojiWidth int = 2 optional
ambiguousWidth int = 1 optional
zwjSequences ConsoleMonster.Text.ZwjRendering = Joined optional
flagWidth int = 2 optional
textPresentationWidth int = 1 optional
source string = "default" optional

Methods

Equals 2 overloads
public bool Equals(TerminalWidthProfile? other) #

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

Parameters

other ConsoleMonster.Text.TerminalWidthProfile? required
An object to compare with this object.

Returns

bool true if the current object is equal to the other parameter; otherwise, false.
public override bool Equals(object? obj) #

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

Parameters

obj object? required
The object to compare with the current object.

Returns

bool true if the specified object is equal to the current object; otherwise, false.
public override int GetHashCode() #

Serves as the default hash function.

Returns

int A hash code for the current object.
public override string ToString() #

Returns a string that represents the current object.

Returns

string A string that represents the current object.
public TerminalWidthProfile WithAmbiguousWidth(int value) #

Copies this profile with a different ambiguous width.

Parameters

value int required
public TerminalWidthProfile WithEmojiWidth(int value) #

Copies this profile with a different emoji width.

Parameters

value int required
public TerminalWidthProfile WithFlagWidth(int value) #

Copies this profile with a different flag width.

Parameters

value int required
public TerminalWidthProfile WithSource(string value) #

Copies this profile with a different source label.

Parameters

value string required
public TerminalWidthProfile WithTextPresentationWidth(int value) #

Copies this profile with a different text presentation width.

Parameters

value int required
public TerminalWidthProfile WithZwjSequences(ZwjRendering value) #

Copies this profile with a different ZWJ rendering.

Parameters

value ConsoleMonster.Text.ZwjRendering required

Properties

public int EmojiWidth { get; } #

Emoji presentation cluster width.

public int AmbiguousWidth { get; } #

East Asian Ambiguous code point width.

public ZwjRendering ZwjSequences { get; } #

Rendering model for emoji ZWJ sequences.

public int FlagWidth { get; } #

Width of a regional indicator pair.

public int 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.