2020-10-25 02:40:15 +03:00
|
|
|
[package]
|
|
|
|
name = "wezterm-font"
|
|
|
|
version = "0.1.0"
|
|
|
|
authors = ["Wez Furlong <wez@wezfurlong.org>"]
|
2023-08-18 17:15:49 +03:00
|
|
|
edition = "2021"
|
2024-05-13 18:29:36 +03:00
|
|
|
publish = false
|
2020-10-25 02:40:15 +03:00
|
|
|
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
|
2022-09-09 18:40:05 +03:00
|
|
|
[features]
|
|
|
|
vendor-jetbrains = []
|
|
|
|
vendor-roboto = []
|
|
|
|
vendor-noto-emoji = []
|
|
|
|
vendor-nerd-font-symbols = []
|
|
|
|
|
2020-10-25 02:40:15 +03:00
|
|
|
[dependencies]
|
|
|
|
anyhow = "1.0"
|
2023-08-20 23:13:13 +03:00
|
|
|
cairo-rs = {version="0.18", default-features=false}
|
2020-10-25 02:40:15 +03:00
|
|
|
config = { path = "../config" }
|
2022-03-26 09:27:27 +03:00
|
|
|
encoding_rs = "0.8"
|
Add `wezterm ls-fonts` subcommand
At this time it just shows you the fonts that your config matches
and where they came from:
```
; wezterm -n ls-fonts
Primary font:
wezterm.font("JetBrains Mono", weight="Regular", stretch="Normal", italic=false)
(/home/wez/.fonts/JetBrainsMono-Regular.ttf, FontConfig)
wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
(/usr/share/fonts/google-noto-emoji/NotoColorEmoji.ttf, FontConfig)
wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
(/home/wez/.fonts/NotoColorEmoji.ttf, FontConfig)
wezterm.font("Last Resort High-Efficiency", weight="Regular", stretch="Normal", italic=false)
(<built-in>, BuiltIn)
When Italic=true:
wezterm.font("JetBrains Mono", weight="Regular", stretch="Normal", italic=true)
(/home/wez/.fonts/JetBrainsMono-Italic.ttf, FontConfig)
wezterm.font("JetBrains Mono", weight="Regular", stretch="Normal", italic=false)
(/home/wez/.fonts/JetBrainsMono-Regular.ttf, FontConfig)
wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
(/usr/share/fonts/google-noto-emoji/NotoColorEmoji.ttf, FontConfig)
wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
(/home/wez/.fonts/NotoColorEmoji.ttf, FontConfig)
wezterm.font("Last Resort High-Efficiency", weight="Regular", stretch="Normal", italic=false)
(<built-in>, BuiltIn)
When Intensity=Bold:
wezterm.font("JetBrains Mono", weight="Bold", stretch="Normal", italic=false)
(/home/wez/.fonts/JetBrainsMono-Bold.ttf, FontConfig)
wezterm.font("JetBrains Mono", weight="Regular", stretch="Normal", italic=false)
(/home/wez/.fonts/JetBrainsMono-Regular.ttf, FontConfig)
wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
(/usr/share/fonts/google-noto-emoji/NotoColorEmoji.ttf, FontConfig)
wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
(/home/wez/.fonts/NotoColorEmoji.ttf, FontConfig)
wezterm.font("Last Resort High-Efficiency", weight="Regular", stretch="Normal", italic=false)
(<built-in>, BuiltIn)
When Intensity=Bold Italic=true:
wezterm.font("JetBrains Mono", weight="Bold", stretch="Normal", italic=true)
(/home/wez/.fonts/JetBrainsMono-Bold-Italic.ttf, FontConfig)
wezterm.font("JetBrains Mono", weight="Regular", stretch="Normal", italic=false)
(/home/wez/.fonts/JetBrainsMono-Regular.ttf, FontConfig)
wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
(/usr/share/fonts/google-noto-emoji/NotoColorEmoji.ttf, FontConfig)
wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
(/home/wez/.fonts/NotoColorEmoji.ttf, FontConfig)
wezterm.font("Last Resort High-Efficiency", weight="Regular", stretch="Normal", italic=false)
(<built-in>, BuiltIn)
```
refs: #347
2021-04-12 19:36:56 +03:00
|
|
|
enum-display-derive = "0.1"
|
2020-12-10 21:03:16 +03:00
|
|
|
euclid = "0.22"
|
2022-10-23 22:07:00 +03:00
|
|
|
finl_unicode = "1.2"
|
2020-10-25 02:40:15 +03:00
|
|
|
freetype = { path = "../deps/freetype" }
|
|
|
|
harfbuzz = { path = "../deps/harfbuzz" }
|
2024-05-06 02:14:46 +03:00
|
|
|
image = "0.25"
|
2020-10-25 02:40:15 +03:00
|
|
|
lazy_static = "1.4"
|
2022-11-14 17:34:38 +03:00
|
|
|
lfucache = { path = "../lfucache" }
|
2020-10-25 02:40:15 +03:00
|
|
|
log = "0.4"
|
2024-05-13 21:45:47 +03:00
|
|
|
memmap2 = "0.9"
|
2024-06-08 03:48:46 +03:00
|
|
|
metrics = "0.23"
|
2023-09-29 00:39:22 +03:00
|
|
|
ordered-float = "4.1"
|
2020-11-26 06:15:08 +03:00
|
|
|
rangeset = { path = "../rangeset" }
|
2020-10-25 02:40:15 +03:00
|
|
|
termwiz = { path = "../termwiz" }
|
|
|
|
thiserror = "1.0"
|
|
|
|
walkdir = "2"
|
2022-02-05 23:59:54 +03:00
|
|
|
wezterm-color-types = { path = "../color-types" }
|
2021-06-27 05:48:06 +03:00
|
|
|
wezterm-input-types = { path = "../wezterm-input-types" }
|
2020-10-25 02:40:15 +03:00
|
|
|
wezterm-term = { path = "../term", features=["use_serde"] }
|
2021-05-02 02:05:23 +03:00
|
|
|
wezterm-toast-notification = { path = "../wezterm-toast-notification" }
|
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" }
|
2020-10-25 02:40:15 +03:00
|
|
|
|
|
|
|
[target.'cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))'.dependencies]
|
|
|
|
fontconfig = { path = "../deps/fontconfig" }
|
|
|
|
|
|
|
|
[target."cfg(windows)".dependencies]
|
2020-11-26 01:53:42 +03:00
|
|
|
dwrote = "0.11"
|
2020-10-25 03:00:07 +03:00
|
|
|
winapi = "0.3"
|
2020-10-25 02:40:15 +03:00
|
|
|
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
2023-08-06 03:33:59 +03:00
|
|
|
cocoa = "0.25"
|
2020-11-22 22:19:44 +03:00
|
|
|
core-foundation = "0.9"
|
2023-08-06 03:33:59 +03:00
|
|
|
core-text = "20.0"
|
|
|
|
objc = "0.2"
|
2021-02-22 20:19:05 +03:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2024-03-25 21:26:52 +03:00
|
|
|
k9 = "0.12.0"
|
2024-01-21 02:01:10 +03:00
|
|
|
env_logger = "0.11"
|