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

ngscopeclient preferences.yml font path shall use relative path by default #596

Closed
bvernoux opened this issue Jun 10, 2023 · 3 comments
Closed

Comments

@bvernoux
Copy link
Contributor

bvernoux commented Jun 10, 2023

Today ngscopeclient preferences.yml use full path for all font for everything (label_font ...) even when created by default using fonts from ./fonts/xxx (usually DejaVuSans.ttf or DejaVuSansMono.ttf, potentially later DejaVuSans-Bold.ttf)
So it will be better to use relative path by default at least as when you launch ngscopeclient from an other path the old one which is a full path is not found and it prevent to ngscopeclient start with an error
How to fix it:

@azonenberg
Copy link
Collaborator

Relative paths doesn't sound like a great idea, since we need to allow for things like running a dev build in your working copy followed by installing system wide, and not have them stepping on each other accessing stuff in /usr/share/fonts or similar.

The better solution is for the font loading code to detect failure to load a font file and fall back to a default font if the supplied filename is nonexistent or malformed. This will recover without crashing in the rare case of a font you have selected becoming unavailable, while also ensuring determinism in other cases.

@bvernoux
Copy link
Contributor Author

bvernoux commented Jun 11, 2023

I do not really see what is your point towards running a dev build in your working copy so please check the ngscopeclient/scopehal#779 that clearly solve any issue with relative or full path (if relative path is not available it do like before scanning all dir for full path ...)

@bvernoux
Copy link
Contributor Author

Fixed in commit f236404

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