Skip to content
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

Better font detection #116

Closed
ok-nick opened this issue Mar 22, 2023 · 2 comments
Closed

Better font detection #116

ok-nick opened this issue Mar 22, 2023 · 2 comments

Comments

@ok-nick
Copy link

ok-nick commented Mar 22, 2023

typst predefines these paths for font detection:

  1. /usr/share/fonts
  2. /usr/local/share/fonts
  3. $HOME/.local/share/fonts

The last one is obtained from the dirs crate.

Sometimes fonts are stored in other directories, like on NixOS, for example, where fonts are stored in a totally separate directory. I'm not familiar with font detection, however, I believe the "conventional" way to go about this is by using the fontconfig library, as used by gimp and many other programs. There are a couple of other Rust alternatives I scoped out but they seem all either unmaintained or immature.

@hcsch
Copy link

hcsch commented Mar 22, 2023

Hey, just a heads-up, this is probably a duplicate of #100 ^^

@ok-nick
Copy link
Author

ok-nick commented Mar 22, 2023

Yep, thanks!

@ok-nick ok-nick closed this as completed Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants