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

browser/gui: Prime the font system w/ a 'monospace' font #779

Merged
merged 2 commits into from
Dec 2, 2023

Conversation

robinlinden
Copy link
Owner

DejaVu Sans Mono for Linux for now because that's what happened to live on the machine I ran fc-match monospace on. This will be looked up in a more reasonable fashion in the future.

robin@q:~/code/hastur$ fc-match monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

@robinlinden robinlinden force-pushed the browser-gui-monospace branch from 16fcd8a to e126851 Compare November 30, 2023 00:54
Copy link
Collaborator

@Zer0-One Zer0-One left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine for now, but probably good to note that the first match for "monospace" might be a serif font, which might look a bit funky in a browser. On my system, you get LiberationMono-Regular.ttf: "Liberation Mono" "Regular", whereas the firefox default, for example, is actually LiberationSans-Regular.ttf: "Liberation Sans" "Regular".

@robinlinden
Copy link
Owner Author

Yeah, for Linux we won't be hardcoding fonts like this in the future and probably actually use something like fontconfig (or parse the files) ourselves, and as you say, we'll probably want to care about more things than just a font being monospace.

If DejaVuSansMono.ttf isn't found, the font-engine will still fall back to trying to find a font w/ monospace in the file name right now. For Windows it might make sense to hardcode a font and let the user override it from the UI somewhere, but the real reason for this is that I need a monospace font so I can check my layout work. Feel free to add a monospace font that works well on your system to the Linux side of the array. :P

@robinlinden robinlinden force-pushed the browser-gui-monospace branch from e126851 to c0cb84f Compare December 2, 2023 01:08
@robinlinden robinlinden merged commit c0cb84f into master Dec 2, 2023
21 checks passed
@robinlinden robinlinden deleted the browser-gui-monospace branch December 2, 2023 01:40
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.

2 participants