Refactors the Editor's scrolling implementation to be pixel-based instead of line-based. This provides smoother and more granular scrolling, which works more consistently across different input devices (like trackpads).
- The `Action::Scroll` variant now takes `pixels: f32`.
- The `Editor` now processes scroll actions using pixel values directly.
- Examples have been updated to reflect the new scrolling behavior.
* Variable font support
Here's a pretty naïve solution for variable fonts.
The iterator doesn't use the match keys' weight, but instead tries to
get the requested ideal weight, if the font is variable, otherwise it is
ignored and the actual (non-variable) weight is used. This is because I
didn't implement finding variable weight support for match keys; doing
so would be impossible without parsing TTF files when matching and I
didn't want to add that potentially expensive infrastructure if not
entirely necessary.
This is a breaking change, and I'm open for ideas on how to fix that
if it's an issue.
* cargo fmt
* Add variable font example to rich-text example
- Scroll is identified by line index and layout index, instead of just
layout index
- Shaping has the option to prune, where caches outside of the scroll
view are cleared
- Syntax editor no longer requires layout of all lines, only of lines
inside scroll
- BufferLine has a metadata field that can be used by other abstractions
to know when text was changed
* WIP VI wrapper for editor
* WIP: block cursor
* Create Edit trait, run CI on all feature options
* Add prints describing build steps to ci.sh
* Custom rendering for Vi editor
* Clippy fixes
* More clippy fixes
* Show clippy results in CI
* Fix for Redox
* Fix clippy lint
* Add vi feature to enable vi-style editor
* Add escape to libcosmic text box