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

Use monospaced fonts in gcode sections #4747

Merged
merged 4 commits into from
Oct 10, 2020

Conversation

wavexx
Copy link
Contributor

@wavexx wavexx commented Sep 13, 2020

Use the system's default monospaced font for all G-code editors in the settings.

We add a ConfigOptionDef::is_code flag to indicate if the value is intended to display code. This could be later used to highlight it too, so I kept it more generic than "monospaced".

A new method GUI_App::code_font() is added for the purpose of getting a monospaced font. I set the font size to match the normal font, but I cannot test currently if this handles dpi-scaling correctly. I can also only text on linux.

Fixes #4718

@lukasmatena lukasmatena merged commit 89e4a78 into prusa3d:master Oct 10, 2020
@lukasmatena
Copy link
Collaborator

Thanks, merged.

@wavexx wavexx deleted the monospaced_gcode branch October 12, 2020 16:13
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.

[feature request] Use fixed-width monospace font in any code field (nice to have)
2 participants