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

fix crash discovering fonts on Linux #123

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

blepping
Copy link

currently the extension crashes on every startup and every time the browser refreshes the session on Linux due to the font directories it looks for not existing and it doesn't handle exceptions.

this pull reduces code duplication by moving font discovery into functions and it also adds error handling when discovering fonts. i set it up to search common font directories on Linux.

the diff is fairly large because my editor cleaned up a bunch of trailing whitespace. if you really want to keep it for whatever reason i can amend this pull to only affect the font discovery part.

i'm not sure why some nodes only used the builtin fonts and one of them used system fonts instead, i assume it's for a reason so i provided separate functions. if you wanted to just use all available fonts a simple function like:

def get_all_fonts():
  return get_builtin_fonts() + get_system_fonts()

would work.

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

Successfully merging this pull request may close these issues.

None yet

1 participant