1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-10 15:04:32 +03:00
wezterm/term
Wez Furlong 0ee1f7529b fonts: Fix shaping metrics
This was a bit of a PITA to run down; the essence of the problem
was that the shaper was returning an x_advance of 0 for U+3000,
which caused wezterm's shaping layer to elide that glyph.

I eventually tracked down the x_advance to be the result of
scaling by an x_scale of 0, which in turn is the result of
harfbuzz not knowing the font size.

The critical portion of this diff is the line that advises
harfbuzz that the font has changed after we've applied the
font size.

The rest is just stuff to make it easier to debug and verify.

This:

```
printf "x\u3000x."
```

Now correctly renders on screen as "x  x".

fixes: #1161
2021-09-22 08:34:40 -07:00
..
src fonts: Fix shaping metrics 2021-09-22 08:34:40 -07:00
Cargo.toml deps: ordered-float -> 2.8 2021-09-05 23:25:37 -07:00
README.md term: rename crate to wezterm-term in advance of publishing 2020-06-13 09:55:16 -07:00

wezterm-term

This crate provides the core of the virtual terminal emulator implementation used by wezterm. The home for this crate is in the wezterm repo and development is tracked at https://github.com/wez/wezterm/.

It is full featured, providing terminal escape sequence parsing, keyboard and mouse input encoding, a model for the screen cells including scrollback, sixel and iTerm2 image support, OSC 8 Hyperlinks and a wide range of terminal cell attributes.

This crate does not provide any kind of gui, nor does it directly manage a PTY; you provide a std::io::Write implementation that could connect to a PTY, and supply bytes to the model via the advance_bytes method.

The entrypoint to the crate is the Terminal struct.

License: MIT