Comments (4)
Ugh, why font handling is such a mess. As a quick workaround: you may specify an absolute path (e.g /usr/share/fonts/inter/Inter-Regular.ttf).
I couldn't reproduce your case yet, for me output is the following:
[2022-10-01][10:11:38][yofi::font::fdue][INFO] The font Inter could not be found.
[2022-10-01][10:11:38][yofi::font::fdue][INFO] Best matches:
Inter Bold
Inter Thin
Arial
Inter Black
Inter Light
Do you have some no-default path for this font? It seems rust-fontconfig that searches fc-cache doesn't handle xdg dirs properly, is it your case?
from yofi.
Okay, the absolute path works. (I thought I tried that before)
The fonts I want are located in $HOME/.local/share/fonts/
I leave /usr/share/fonts/
just for system fonts from my distro (Arch)
My other apps load the fonts fine.
It seems rust-fontconfig that searches fc-cache doesn't handle xdg dirs properly, is it your case?
Sorry, I don't know what you mean. I don't know rust. But fontconfig registers all my fonts fine. I can print all their information (For example, with fc-list --verbose
)
from yofi.
Sorry, I don't know what you mean. I don't know rust. But fontconfig registers all my fonts fine. I can print all their information (For example, with fc-list --verbose)
Yeah, sure. The link is for the library I'm using for finding fonts, it's not a system fontconfig thus a different behavior. It doesn't handle XDG standard directories, in particular yours $HOME/.local/share/fonts/
. You may find searched dirs with grep '<dir>' /etc/fonts/fonts.conf
, for me it produces the following output:
<dir>/usr/share/fonts</dir>
<dir>/usr/local/share/fonts</dir>
<dir>~/.fonts</dir>
So basically these 3 dirs are searched. There are also entries <dir prefix=..>..</dir>
in that file but these are handled poorly (prefix=xdg in particular implies searching in $HOME/.local/share
). Includes are not supported as well so anything in /etc/fonts/conf.d
is not considered.
Unfortunately I didn't find any other libraries for that job and I don't really want to be bound to fontconfig system libs. Hopefully I make my own implementation soon.
from yofi.
I get the same output when grepping /etc/fonts/fonts.conf
I'm a novice coder, but to me it seems strange that the tilde (~) would be referenced here. I thought it was considered poor form to use the tilde anywhere outside of the command line, and that instead we should use $HOME.
Additionally, by only looking at the base of the home directory, we're inviting our home to be cluttered with dot files. Again, strange policy.
In any case, I'll go with the absolute path for now.
Thanks again
from yofi.
Related Issues (20)
- Chinese rendering is too slow HOT 3
- Long lines with marquee-like animation
- Support right-to-left languages
- gvim icon failed to load HOT 1
- Config for tuning fuzzy match
- Look into ~/.local/share/icons/ for icons HOT 1
- Crash: failed to initialize fontconfig HOT 6
- Add support for adaptive height when using layer shell mode HOT 3
- Add option to draw border around yofi window HOT 3
- feature request: (optionally) start with an empty result list HOT 1
- uses outdated rust compiler version HOT 1
- Search for .desktop program files for nix installed programs. HOT 2
- [Package Request] Void Linux HOT 1
- Panic when no apps match query HOT 2
- Yofi Layer Shell / Input exclusivity, doesn't get destroyed without stopping the program.
- Panic on launch after Hyprland update HOT 2
- run-time error: No such file or directory HOT 4
- [BUG] Flake nix run fails on NixOS + [Features] add direnv support, update flake HOT 3
- [Feature request] Parameter for config path HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yofi.