Skip to content

Commit

Permalink
Merge branch 'raphamorim:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
yonas authored Sep 8, 2024
2 parents 6a04807 + decf4c5 commit f81ca9b
Show file tree
Hide file tree
Showing 29 changed files with 295 additions and 333 deletions.
28 changes: 19 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.1.11"
version = "0.1.12"
authors = ["Raphael Amorim <[email protected]>"]
edition = "2021"
license = "MIT"
Expand All @@ -27,14 +27,14 @@ documentation = "https://github.com/raphamorim/rio#readme"
# Note: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#multiple-locations
# Sugarloaf example uses path when used locally, but uses
# version from crates.io when published.
sugarloaf = { path = "sugarloaf", version = "0.1.11" }
corcovado = { path = "corcovado", version = "0.1.11" }
rio-config = { path = "rio-config", version = "0.1.11" }
rio-proc-macros = { path = "rio-proc-macros", version = "0.1.11" }
copa = { path = "copa", default-features = true, version = "0.1.11" }
teletypewriter = { path = "teletypewriter", version = "0.1.11" }
rio-backend = { path = "rio-backend", version = "0.1.11" }
rio-window = { path = "rio-window", version = "0.1.11", default-features = false }
sugarloaf = { path = "sugarloaf", version = "0.1.12" }
corcovado = { path = "corcovado", version = "0.1.12" }
rio-config = { path = "rio-config", version = "0.1.12" }
rio-proc-macros = { path = "rio-proc-macros", version = "0.1.12" }
copa = { path = "copa", default-features = true, version = "0.1.12" }
teletypewriter = { path = "teletypewriter", version = "0.1.12" }
rio-backend = { path = "rio-backend", version = "0.1.12" }
rio-window = { path = "rio-window", version = "0.1.12", default-features = false }
wa = { path = "wa", version = "0.1.7" }

raw-window-handle = { version = "0.6.2", features = ["std"] }
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ If you use and like Rio, please consider sponsoring it: your support helps to co

- Alacritty 🥇
- Since version 0.0.22, Sugarloaf ported glyph-brush code which was originally written by @alexheretic and licensed under Apache-2.0 license 🥇
- DepartureMono font https://departuremono.com/.
- Components text render was originally from https://github.com/hecrj/wgpu_glyph
- The legacy Rio logo was made using _Adobe Sketchbook_ on iPad (between versions 0.0.1 between 0.0.18).
- WA was built originally from a fork from [Macroquad](https://github.com/not-fl3/macroquad) which is licensed under MIT license.
Expand Down
33 changes: 32 additions & 1 deletion docs/docs/config/fonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ You can also set family on root to overwrite all fonts.
family = "cascadiacode"
```

## Extra fonts

You can also specify extra fonts to load:

```toml
[fonts]
extras = [{ family = "Microsoft JhengHei" }]
```

## Font features

In case you want to specify any font feature:

```toml
Expand All @@ -31,7 +35,7 @@ features = ["ss02", "ss03", "ss05", "ss19"]

Note: Font features do not have support to live reload on configuration, so to reflect your changes, you will need to close and reopen Rio.

---
## Default configuration

The font configuration default:

Expand Down Expand Up @@ -59,4 +63,31 @@ weight = 400
family = "cascadiacode"
style = "italic"
weight = 800
```

## Emojis

You can also specify which emoji font you would like to use, by default will be loaded a built-in Twemoji color by Mozilla.

In case you would like to change:

```toml
# Apple
# [fonts.emoji]
# family = "Apple Color Emoji"

# In case you have Noto Color Emoji installed
# [fonts.emoji]
# family = "Noto Color Emoji"
```

## User interface

You can specify user interface font on Rio.

Note: `fonts.ui` does not have live reload configuration update, you need to close and open Rio again.

```toml
[fonts.ui]
family = "Departure Mono"
```
2 changes: 1 addition & 1 deletion docs/docs/config/renderer.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ language: 'en'

- `disable-unfocused-render` - This property disable renderer processes while Rio is unfocused.

- `max-fps` - Limits the maximum number of frames per second that rio terminal will attempt to draw. If you set as `0` then this limit will be ignored.
- `max-fps` - Limits the maximum number of frames per second that rio terminal will attempt to draw. If you set as `0` then this limit will be ignored. The default on MacOS is 120 and all other platforms is 60.

Example:

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/install/macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ language: 'en'

You can download Rio terminal application for macOS platform:

- [Download Rio for MacOS v0.1.10](https://github.com/raphamorim/rio/releases/download/v0.1.10/Rio-v0.1.10.dmg)
- [Download Rio for MacOS v0.1.12](https://github.com/raphamorim/rio/releases/download/v0.1.12/Rio-v0.1.12.dmg)

Alternatively you can install Rio through [Homebrew](https://brew.sh/)...

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/install/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Note: Rio is only available for Windows 10 or later.

Prebuilt binaries for Windows:

- [Download Microsoft installer](https://github.com/raphamorim/rio/releases/download/v0.1.10/Rio-installer.msi)
- [Download Microsoft executable](https://github.com/raphamorim/rio/releases/download/v0.1.10/Rio-portable.exe)
- [Download Microsoft installer](https://github.com/raphamorim/rio/releases/download/v0.1.12/Rio-installer.msi)
- [Download Microsoft executable](https://github.com/raphamorim/rio/releases/download/v0.1.12/Rio-portable.exe)
- [Using Chocolatey package manager](https://community.chocolatey.org/packages/rio-terminal)

```sh
Expand Down
31 changes: 30 additions & 1 deletion docs/docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,40 @@ language: 'en'

<!-- - Fix: MacOS Delete key doesn't work in kitty mode [#513](https://github.com/raphamorim/rio/issues/513). -->
<!-- - Fix: Kitty keyboard protocol doesn't work with tmux [#599](https://github.com/raphamorim/rio/issues/599). -->
- Introduce: `renderer.max-fps` (default is 60).

- Implement LRU to cache on layout and draw methods.
- Reenable set subtitle on MacOS native tabs.

## 0.1.12

- Introduce: `renderer.max-fps`.
- Fix: Cursor making text with ligatures hidden.
- Fix: Underline cursor not working.
- Fix: sixel: Text doesn't overwrite sixels [#636](https://github.com/raphamorim/rio/issues/636).
- Initial support to Sixel protocol.
- Support to `fonts.emoji`. You can also specify which emoji font you would like to use, by default will be loaded a built-in Twemoji color by Mozilla.

In case you would like to change:

```toml
# Apple
# [fonts.emoji]
# family = "Apple Color Emoji"

# In case you have Noto Color Emoji installed
# [fonts.emoji]
# family = "Noto Color Emoji"
```

- Support to `fonts.ui`. You can specify user interface font on Rio.

Note: `fonts.ui` does not have live reload configuration update, you need to close and open Rio again.

```toml
[fonts.ui]
family = "Departure Mono"
```

- **breaking:** Revamp the cursor configuration

Before:
Expand Down
13 changes: 11 additions & 2 deletions frontends/rioterm/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,17 @@ impl<T: EventListener + Clone + std::marker::Send + 'static> ContextManager<T> {
format!("{} ({})", terminal_title, program)
};

self.event_proxy
.send_event(RioEvent::Title(window_title), self.window_id);
if cfg!(target_os = "macos") {
self.event_proxy.send_event(
RioEvent::TitleWithSubtitle(window_title, path.clone()),
self.window_id,
);
} else {
self.event_proxy.send_event(
RioEvent::Title(window_title),
self.window_id,
);
}
}

id =
Expand Down
2 changes: 1 addition & 1 deletion misc/osx/Rio.app/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<key>CFBundleIconFile</key>
<string>rio.icns</string>
<key>CFBundleShortVersionString</key>
<string>0.1.11</string>
<string>0.1.12</string>
<key>CFBundleVersion</key>
<string>20230528.115631</string>
<key>CFBundleURLTypes</key>
Expand Down
2 changes: 1 addition & 1 deletion misc/windows/rio.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
UpgradeCode="87c21c74-dbd5-4584-89d5-46d9cd0c40a8"
Language="1033"
Codepage="1252"
Version="0.1.11"
Version="0.1.12"
Manufacturer="Raphael Amorim"
InstallerVersion="200">

Expand Down
6 changes: 5 additions & 1 deletion rio-backend/src/config/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ pub fn default_line_height() -> f32 {

#[inline]
pub fn default_max_fps() -> u64 {
120
if cfg!(target_os = "macos") {
120
} else {
60
}
}

#[inline]
Expand Down
1 change: 1 addition & 0 deletions sugarloaf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ ab_glyph = "0.2.28"
linked-hash-map = "0.5.6"
xi-unicode = "0.3.0"
approx = "0.5.1"
lru = "0.12.4"
skrifa = "0.20.0"
yazi = { version = "0.1.6", optional = true }
zeno = { version = "0.2.2", optional = true, default-features = false }
Expand Down
17 changes: 13 additions & 4 deletions sugarloaf/examples/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl ApplicationHandler for Application {
);
content.finish_line();
content.add_text(
"㏑¼",
"㏑¼",
FragmentStyle {
color: [0.0, 0.0, 0.0, 1.0],
background_color: Some([1.0, 1.0, 1.0, 1.0]),
Expand All @@ -152,7 +152,7 @@ impl ApplicationHandler for Application {
);
content.finish_line();
content.add_text(
" regular -> ",
"regular -> ",
FragmentStyle {
decoration: Some(FragmentStyleDecoration::Underline(
UnderlineInfo {
Expand Down Expand Up @@ -202,7 +202,7 @@ impl ApplicationHandler for Application {
},
);
content.add_text(
"curly",
"curly",
FragmentStyle {
decoration: Some(FragmentStyleDecoration::Underline(
UnderlineInfo {
Expand All @@ -219,7 +219,7 @@ impl ApplicationHandler for Application {
);
content.finish_line();
content.add_text(
"dashed",
"dashed",
FragmentStyle {
decoration: Some(FragmentStyleDecoration::Underline(
UnderlineInfo {
Expand Down Expand Up @@ -259,6 +259,15 @@ impl ApplicationHandler for Application {
..FragmentStyle::default()
},
);
content.finish_line();
content.add_text(
"│ \u{E0B6}Hello There!\u{e0b4}",
FragmentStyle {
color: [1.0, 1.0, 1.0, 1.0],
background_color: Some([0.5, 0.5, 1.0, 1.0]),
..FragmentStyle::default()
},
);
sugarloaf.set_content(content.build());
sugarloaf.render();
event_loop.set_control_flow(ControlFlow::Wait);
Expand Down
Loading

0 comments on commit f81ca9b

Please sign in to comment.