-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add font fallback or warning #83
Comments
This is probably completely unrelated but I'm running NVIDIA proprietary driver and that's only just now started working on other compositors that are not GNOME or KDE |
What's the Also I figured out that the default font is not really Deja Vu Sans for fontdue (default backend), but just the first found font without any filter. |
It's a family name. It resolves to whatever font is configured for system ui elements on the local setup. It's kinda like My bad though there's no dash in it, it's actually $ fc-match "monospace"
FantasqueSansMono-Regular.otf: "Fantasque Sans Mono" "Regular"
$ fc-match "system-ui" # Wrong name
OpenSans-Regular.ttf: "Open Sans" "Regular"
$ fc-match "system ui" # Actual system ui font
Cantarell-VF.otf: "Cantarell" "Regular" It's a pretty safe fallback because rather than providing a font and expecting the user to have that installed, it picks something that's locally installed. |
This one unfortunately doesn't work for rust-fontconfig, you may try it with smth like this: fn main() {
use rust_fontconfig::*;
let path = FcFontCache::build().query(&FcPattern {
familiy: Some("monospace".into()),
..Default::default()
}).unwrap();
dbg!(path);
} or either via yofi: diff --git a/src/font/fdue.rs b/src/font/fdue.rs
index 3b19c35..86f1853 100644
--- a/src/font/fdue.rs
+++ b/src/font/fdue.rs
@@ -96,7 +96,10 @@ impl Font {
impl FontBackend for Font {
fn default() -> Self {
FONTCONFIG_CACHE
- .query(&FcPattern::default())
+ .query(&FcPattern {
+ family: Some("system ui".into()),
+ ..Default::default()
+ })
.map(Font::from_fc_path)
.unwrap()
.unwrap() |
I had the same issue (AUR yofi-bin package). Now that I've read that |
If you run yofi and do not have the default font installed it does this
After changing font in config with
font = "/usr/share/fonts/noto/NotoSansDisplay-Thin.ttf"
The text was updated successfully, but these errors were encountered: