[BUG] Nerdfont is not being properly rendered
- Dominant language
- Rust
- Stars
- 4.8k
- Forks
- 270
- Avg merge
- 5d 19h
- Merged PRs (30d)
- 2
Description
**Describe the bug**
When a glyph from a Nerdfont-patched font is used, the interface is not properly rendered for some backends.
**To Reproduce**
After cloning the repo, I added the following change:
```diff
diff --git a/cursive/examples/dialog.rs b/cursive/examples/dialog.rs
index c044205..695f0de 100644
--- a/cursive/examples/dialog.rs
+++ b/cursive/examples/dialog.rs
@@ -10,7 +10,7 @@ fn main() {
// Creates a dialog with a single "Quit" button
siv.add_layer(
// Most views can be configured in a chainable way
- Dialog::around(TextView::new("Hello Dialog!"))
+ Dialog::around(TextView::new("Hello Dialog! \u{f049d} "))
.title("Cursive")
.button("Foo", |_s| ())
.button("Quit", |s| s.quit())
```
And then I experimented with various backends:
### ncurses
```bash
cargo run --example dialog --features ncurses-backend --no-default-features
```

### termion
```bash
cargo run --example dialog --features termion-backend --no-default-features
```

### pancurses
```bash
cargo run --example dialog --features pancurses-backend --no-default-features
```

### crossterm
```bash
cargo run --example dialog --features crossterm-backend --no-default-features
```

**Expected behavior**
All backends should have the same result as `termion`.
**Environment**
* Operating system used: macOS Ventura 13.4
* Backend used: all macOS supported backends were tested
* Current locale
```bash
$ locale
LANG=""
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
```
* Cursive version: git commit hash `30046dc563b3041092f0f0475ddf87a84eef25f9` (I used the `main` branch)
**Additional context**
- the terminal emulator used was iTerm 2 (Build 3.4.19)
- the font used was MesloMGS Nerd Font Mono
- this issue was created as a follow-up of an issue in `ncspot`: https://github.com/hrkfdn/ncspot/issues/1154
Contributor guide
Assessment
This issue has not been assessed yet.