Vi-style editor and other editor improvements (#40)
* 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
This commit is contained in:
parent
271ca5cf7a
commit
ee54e7626b
33 changed files with 982 additions and 616 deletions
|
|
@ -36,7 +36,7 @@ fn han_unification(locale: &str) -> &'static [&'static str] {
|
|||
}
|
||||
|
||||
// Fallbacks to use per script
|
||||
pub fn script_fallback(script: &Script, locale: &str) -> &'static [&'static str] {
|
||||
pub fn script_fallback(script: Script, locale: &str) -> &'static [&'static str] {
|
||||
//TODO: abstract style (sans/serif/monospaced)
|
||||
//TODO: pull more data from about:config font.name-list.sans-serif in Firefox
|
||||
match script {
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ impl<'a> Iterator for FontFallbackIter<'a> {
|
|||
while self.script_i.0 < self.scripts.len() {
|
||||
let script = self.scripts[self.script_i.0];
|
||||
|
||||
let script_families = script_fallback(&script, self.locale);
|
||||
let script_families = script_fallback(script, self.locale);
|
||||
while self.script_i.1 < script_families.len() {
|
||||
let script_family = script_families[self.script_i.1];
|
||||
self.script_i.1 += 1;
|
||||
|
|
@ -133,7 +133,7 @@ impl<'a> Iterator for FontFallbackIter<'a> {
|
|||
return Some(font);
|
||||
}
|
||||
}
|
||||
log::warn!("failed to find family '{}'", common_family)
|
||||
log::warn!("failed to find family '{}'", common_family);
|
||||
}
|
||||
|
||||
//TODO: do we need to do this?
|
||||
|
|
|
|||
|
|
@ -13,6 +13,6 @@ pub fn forbidden_fallback() -> &'static [&'static str] {
|
|||
}
|
||||
|
||||
// Fallbacks to use per script
|
||||
pub fn script_fallback(script: &Script, locale: &str) -> &'static [&'static str] {
|
||||
pub fn script_fallback(_script: Script, _locale: &str) -> &'static [&'static str] {
|
||||
&[]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ fn han_unification(locale: &str) -> &'static [&'static str] {
|
|||
}
|
||||
|
||||
// Fallbacks to use per script
|
||||
pub fn script_fallback(script: &Script, locale: &str) -> &'static [&'static str] {
|
||||
pub fn script_fallback(script: Script, locale: &str) -> &'static [&'static str] {
|
||||
//TODO: abstract style (sans/serif/monospaced)
|
||||
match script {
|
||||
Script::Adlam => &["Noto Sans Adlam", "Noto Sans Adlam Unjoined"],
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ fn han_unification(locale: &str) -> &'static [&'static str] {
|
|||
}
|
||||
|
||||
// Fallbacks to use per script
|
||||
pub fn script_fallback(script: &Script, locale: &str) -> &'static [&'static str] {
|
||||
pub fn script_fallback(script: Script, locale: &str) -> &'static [&'static str] {
|
||||
//TODO: better match https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/platform/fonts/win/font_fallback_win.cc#L99
|
||||
match script {
|
||||
Script::Adlam => &["Ebrima"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue