-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: merge pull request #267 from charmbracelet/vt
Add vt
- Loading branch information
Showing
80 changed files
with
7,391 additions
and
1,993 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.ttf filter=lfs diff=lfs merge=lfs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package ansi | ||
|
||
// SelectCharacterSet sets the G-set character designator to the specified | ||
// character set. | ||
// | ||
// ESC Ps Pd | ||
// | ||
// Where Ps is the G-set character designator, and Pd is the identifier. | ||
// For 94-character sets, the designator can be one of: | ||
// - ( G0 | ||
// - ) G1 | ||
// - * G2 | ||
// - + G3 | ||
// | ||
// For 96-character sets, the designator can be one of: | ||
// - - G1 | ||
// - . G2 | ||
// - / G3 | ||
// | ||
// Some common 94-character sets are: | ||
// - 0 DEC Special Drawing Set | ||
// - A United Kingdom (UK) | ||
// - B United States (USASCII) | ||
// | ||
// Examples: | ||
// | ||
// ESC ( B Select character set G0 = United States (USASCII) | ||
// ESC ( 0 Select character set G0 = Special Character and Line Drawing Set | ||
// ESC ) 0 Select character set G1 = Special Character and Line Drawing Set | ||
// ESC * A Select character set G2 = United Kingdom (UK) | ||
// | ||
// See: https://vt100.net/docs/vt510-rm/SCS.html | ||
func SelectCharacterSet(gset byte, charset byte) string { | ||
return "\x1b" + string(gset) + string(charset) | ||
} | ||
|
||
// SCS is an alias for SelectCharacterSet. | ||
func SCS(gset byte, charset byte) string { | ||
return SelectCharacterSet(gset, charset) | ||
} | ||
|
||
// Locking Shift 1 Right (LS1R) shifts G1 into GR character set. | ||
const LS1R = "\x1b~" | ||
|
||
// Locking Shift 2 (LS2) shifts G2 into GL character set. | ||
const LS2 = "\x1bn" | ||
|
||
// Locking Shift 2 Right (LS2R) shifts G2 into GR character set. | ||
const LS2R = "\x1b}" | ||
|
||
// Locking Shift 3 (LS3) shifts G3 into GL character set. | ||
const LS3 = "\x1bo" | ||
|
||
// Locking Shift 3 Right (LS3R) shifts G3 into GR character set. | ||
const LS3R = "\x1b|" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.