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

Can I select only monospace fonts? #41

Open
dzmipt opened this issue May 12, 2023 · 2 comments
Open

Can I select only monospace fonts? #41

dzmipt opened this issue May 12, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@dzmipt
Copy link

dzmipt commented May 12, 2023

Is your feature request related to a problem? Please describe.
I want to use the font chooser for an editor and be able to select only monospace fonts.

Describe the solution you'd like
Probably the best option would be a checkbox in the FontChooser panel to filter only monospace fonts.

I didn't find how to determine in Java in a Font is monospace or not. I would take some characters like space, x, i, W and check if they render to the same width.

Describe alternatives you've considered
Another possible option would be to allow users of the library to initialise the list of fonts to select from.

@dzmipt dzmipt added the enhancement New feature or request label May 12, 2023
@dheid
Copy link
Owner

dheid commented May 12, 2023

Thanks for the request. A checkbox would be an extra action for the user and as far as I understand you want to enforce monospace fonts, right? How about a boolean option before creating the font chooser to only show monospaced fonts?

@dzmipt
Copy link
Author

dzmipt commented May 12, 2023

In my case, I think that users would prefer to have monospace fonts. However I would leave this decision to user. If he/she wants to choose from monospace fonts, they click the checkbox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants