2018-07-12 17:26:37 +03:00
|
|
|
[package]
|
2018-08-07 07:54:17 +03:00
|
|
|
authors = ["Wez Furlong"]
|
2018-07-12 17:26:37 +03:00
|
|
|
name = "termwiz"
|
2021-12-22 06:37:31 +03:00
|
|
|
version = "0.15.0"
|
2019-02-19 10:26:41 +03:00
|
|
|
edition = "2018"
|
2019-05-28 05:51:10 +03:00
|
|
|
repository = "https://github.com/wez/wezterm"
|
|
|
|
description = "Terminal Wizardry for Unix and Windows"
|
|
|
|
license = "MIT"
|
|
|
|
documentation = "https://docs.rs/termwiz"
|
2019-05-28 05:57:44 +03:00
|
|
|
keywords = ["terminal", "readline", "console", "curses"]
|
2019-05-28 06:08:02 +03:00
|
|
|
readme = "README.md"
|
2018-07-12 17:26:37 +03:00
|
|
|
|
|
|
|
[dependencies]
|
2020-12-29 20:21:50 +03:00
|
|
|
base64 = "0.13"
|
2021-08-16 04:21:17 +03:00
|
|
|
bitflags = "1.3"
|
2020-01-10 08:52:47 +03:00
|
|
|
cassowary = {version="0.3", optional=true}
|
2021-02-12 19:35:00 +03:00
|
|
|
cfg-if = "1.0"
|
2019-12-15 08:43:05 +03:00
|
|
|
anyhow = "1.0"
|
2021-05-24 00:24:01 +03:00
|
|
|
filedescriptor = { version="0.8", path = "../filedescriptor" }
|
2020-01-10 08:52:47 +03:00
|
|
|
fnv = {version="1.0", optional=true}
|
2021-07-25 07:02:54 +03:00
|
|
|
hex = "0.4"
|
2022-02-07 04:51:32 +03:00
|
|
|
image = {version="0.24", optional=true}
|
2020-11-13 18:57:09 +03:00
|
|
|
lazy_static = "1.4"
|
2019-05-28 06:08:02 +03:00
|
|
|
libc = "0.2"
|
2019-06-09 01:37:55 +03:00
|
|
|
log = "0.4"
|
2019-05-28 06:08:02 +03:00
|
|
|
memmem = "0.1"
|
|
|
|
num-traits = "0.2"
|
2022-01-10 05:25:48 +03:00
|
|
|
ordered-float = "2.10"
|
2022-01-17 23:43:35 +03:00
|
|
|
pest = "2.1"
|
|
|
|
pest_derive = "2.1"
|
2020-02-04 18:52:23 +03:00
|
|
|
regex = "1"
|
2020-12-29 20:21:50 +03:00
|
|
|
semver = "0.11"
|
2020-06-13 19:51:17 +03:00
|
|
|
serde = {version="1.0", features = ["rc", "derive"], optional=true}
|
2021-08-02 19:10:36 +03:00
|
|
|
sha2 = "0.9"
|
2020-01-10 09:39:34 +03:00
|
|
|
terminfo = "0.7"
|
2021-01-08 11:21:54 +03:00
|
|
|
thiserror = "1.0"
|
2021-08-12 07:56:30 +03:00
|
|
|
unicode-segmentation = "1.8"
|
2021-08-12 00:26:57 +03:00
|
|
|
ucd-trie = "0.1"
|
2021-12-22 23:01:22 +03:00
|
|
|
vtparse = { version="0.6", path="../vtparse" }
|
wezterm: add experimental_bidi config option and very basic bidi
This commit is larger than it appears to due fanout from threading
through bidi parameters. The main changes are:
* When clustering cells, add an additional phase to resolve embedding
levels and further sub-divide a cluster based on the resolved bidi
runs; this is where we get the direction for a run and this needs
to be passed through to the shaper.
* When doing bidi, the forced cluster boundary hack that we use to
de-ligature when cursoring through text needs to be disabled,
otherwise the cursor appears to push/rotate the text in that
cluster when moving through it! We'll need to find a different
way to handle shading the cursor that eliminates the original
cursor/ligature/black issue.
* In the shaper, the logic for coalescing unresolved runs for font
fallback assumed LTR and needed to be adjusted to cluster RTL.
That meant also computing a little index of codepoint lengths.
* Added `experimental_bidi` boolean option that defaults to false.
When enabled, it activates the bidi processing phase in clustering
with a strong hint that the paragraph is LTR.
This implementation is incomplete and/or wrong for a number of cases:
* The config option should probably allow specifying the paragraph
direction hint to use by default.
* https://terminal-wg.pages.freedesktop.org/bidi/recommendation/paragraphs.html
recommends that bidi be applied to logical lines, not physical
lines (or really: ranges within physical lines) that we're doing
at the moment
* The paragraph direction hint should be overridden by cell attributes
and other escapes; see 85a6b178cfddee94b3ddb39c26652bbd5a973666
and probably others.
However, as of this commit, if you `experimental_bidi=true` then
```
echo This is RTL -> عربي فارسی bidi
```
(that text was sourced from:
https://github.com/microsoft/terminal/issues/538#issuecomment-677017322)
then wezterm will display the text in the same order as the text
renders in Chrome for that github comment.
```
; ./target/debug/wezterm --config experimental_bidi=false ls-fonts --text "عربي فارسی ->"
LeftToRight
0 ع \u{639} x_adv=8 glyph=300 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
2 ر \u{631} x_adv=3.78125 glyph=273 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
4 ب \u{628} x_adv=4 glyph=244 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
6 ي \u{64a} x_adv=4 glyph=363 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
8 \u{20} x_adv=8 glyph=2 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
9 ف \u{641} x_adv=11 glyph=328 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
11 ا \u{627} x_adv=4 glyph=240 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
13 ر \u{631} x_adv=3.78125 glyph=273 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
15 س \u{633} x_adv=10 glyph=278 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
17 ی \u{6cc} x_adv=4 glyph=664 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
19 \u{20} x_adv=8 glyph=2 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
20 - \u{2d} x_adv=8 glyph=276 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
21 > \u{3e} x_adv=8 glyph=338 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
```
```
; ./target/debug/wezterm --config experimental_bidi=true ls-fonts --text "عربي فارسی ->"
RightToLeft
17 ی \u{6cc} x_adv=9 glyph=906 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
15 س \u{633} x_adv=10 glyph=277 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
13 ر \u{631} x_adv=4.78125 glyph=272 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
11 ا \u{627} x_adv=4 glyph=241 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
9 ف \u{641} x_adv=5 glyph=329 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
8 \u{20} x_adv=8 glyph=2 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
6 ي \u{64a} x_adv=9 glyph=904 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
4 ب \u{628} x_adv=4 glyph=243 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
2 ر \u{631} x_adv=5 glyph=273 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
0 ع \u{639} x_adv=6 glyph=301 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
LeftToRight
0 \u{20} x_adv=8 glyph=2 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
1 - \u{2d} x_adv=8 glyph=480 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
2 > \u{3e} x_adv=8 glyph=470 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
;
```
refs: https://github.com/wez/wezterm/issues/784
2022-01-25 18:16:51 +03:00
|
|
|
wezterm-bidi = { path = "../bidi" }
|
2022-02-05 23:59:54 +03:00
|
|
|
wezterm-color-types = { path = "../color-types" }
|
2018-07-24 00:49:15 +03:00
|
|
|
|
2020-01-10 08:52:47 +03:00
|
|
|
[features]
|
|
|
|
widgets = ["cassowary", "fnv"]
|
2022-02-06 01:13:19 +03:00
|
|
|
use_serde = ["serde", "wezterm-color-types/use_serde"]
|
2021-08-03 02:22:55 +03:00
|
|
|
use_image = ["image"]
|
2020-12-30 20:25:54 +03:00
|
|
|
docs = ["widgets", "use_serde"]
|
2020-01-10 08:52:47 +03:00
|
|
|
|
2019-03-14 17:58:48 +03:00
|
|
|
[dev-dependencies]
|
2019-05-28 05:44:55 +03:00
|
|
|
varbincode = "0.1"
|
2020-06-18 19:46:03 +03:00
|
|
|
pretty_assertions = "0.6"
|
2022-01-17 23:43:35 +03:00
|
|
|
pretty_env_logger = "0.4"
|
2019-03-14 17:58:48 +03:00
|
|
|
|
2018-07-24 00:49:15 +03:00
|
|
|
[dependencies.num-derive]
|
|
|
|
features = ["full-syntax"]
|
2020-12-29 20:21:50 +03:00
|
|
|
version = "0.3"
|
|
|
|
|
2018-08-07 07:54:17 +03:00
|
|
|
[target."cfg(unix)".dependencies]
|
2019-05-28 06:08:02 +03:00
|
|
|
signal-hook = "0.1"
|
|
|
|
termios = "0.3"
|
2018-08-07 07:54:17 +03:00
|
|
|
[target."cfg(windows)".dependencies.winapi]
|
|
|
|
features = [
|
2019-04-28 19:31:35 +03:00
|
|
|
"winbase",
|
|
|
|
"winerror",
|
2021-12-22 22:21:39 +03:00
|
|
|
"winnls",
|
2018-08-07 07:54:17 +03:00
|
|
|
"winuser",
|
|
|
|
"consoleapi",
|
|
|
|
"handleapi",
|
|
|
|
"fileapi",
|
2019-04-28 19:31:35 +03:00
|
|
|
"synchapi",
|
2018-08-07 07:54:17 +03:00
|
|
|
]
|
2019-05-28 06:08:02 +03:00
|
|
|
version = "0.3"
|
2020-12-30 20:25:54 +03:00
|
|
|
|
|
|
|
[package.metadata.docs.rs]
|
|
|
|
features = ["docs"]
|
|
|
|
rustdoc-args = ["--cfg", "feature=\"docs\""]
|