API Reference
TerminalWidthProfile
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.
Returned or exposed by 9
- Property TerminalProfile.WidthProfile
- Property DisplayWidth.Profile
- Method TerminalWidthProfile.WithAmbiguousWidth
- Method TerminalWidthProfile.WithEmojiWidth
- Method TerminalWidthProfile.WithFlagWidth
- Method TerminalWidthProfile.WithSource
- Method TerminalWidthProfile.WithTextPresentationWidth
- Method TerminalWidthProfile.WithZwjSequences
- Property TerminalWidthProfile.Standard
Accepted by parameters 10
- Constructor TerminalProfile.TerminalProfile
- Method TerminalProfile.WithWidthProfile
- Method TerminalWidthProbe.TryProbe
- Method DisplayWidth.Cells
- Method DisplayWidth.GetWidth
- Method DisplayWidth.Measure
- Method TerminalWidthProfile.Equals
- Method TextWrapper.Truncate
- Method TextWrapper.TruncateMiddle
- Method TextWrapper.Wrap
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
- ambiguousWidth System.Int32 = 1
- zwjSequences ConsoleMonster.Text.ZwjRendering = Joined
- flagWidth System.Int32 = 2
- textPresentationWidth System.Int32 = 1
- source System.String = "default"
Methods
public Boolean Equals(TerminalWidthProfile? other) #BooleanIndicates whether the current object is equal to another object of the same type.
Parameters
- other ConsoleMonster.Text.TerminalWidthProfile?
- 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) #BooleanDetermines whether the specified object is equal to the current object.
Parameters
- obj System.Object?
- 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() #Int32Serves as the default hash function.
Returns
A hash code for the current object.
public override String ToString() #StringReturns a string that represents the current object.
Returns
A string that represents the current object.
public TerminalWidthProfile WithAmbiguousWidth(Int32 value) #TerminalWidthProfileCopies this profile with a different ambiguous width.
Parameters
- value System.Int32
public TerminalWidthProfile WithEmojiWidth(Int32 value) #TerminalWidthProfileCopies this profile with a different emoji width.
Parameters
- value System.Int32
public TerminalWidthProfile WithFlagWidth(Int32 value) #TerminalWidthProfileCopies this profile with a different flag width.
Parameters
- value System.Int32
public TerminalWidthProfile WithSource(String value) #TerminalWidthProfileCopies this profile with a different source label.
Parameters
- value System.String
public TerminalWidthProfile WithTextPresentationWidth(Int32 value) #TerminalWidthProfileCopies this profile with a different text presentation width.
Parameters
- value System.Int32
public TerminalWidthProfile WithZwjSequences(ZwjRendering value) #TerminalWidthProfileCopies this profile with a different ZWJ rendering.
Parameters
- value ConsoleMonster.Text.ZwjRendering
Inherited Methods
Properties
public Int32 AmbiguousWidth { get; } #East Asian Ambiguous code point width.
public ZwjRendering ZwjSequences { get; } #Rendering model for emoji ZWJ sequences.
public Int32 TextPresentationWidth { get; } #Width of emoji base plus VS15.
public static TerminalWidthProfile Standard { get; } #Standard terminal width assumptions.