Giter Club home page Giter Club logo

fontchooser's People

Contributors

davidsusu avatar dependabot[bot] avatar dheid avatar dsorokin avatar fluks avatar weisj avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

weisj rockola

fontchooser's Issues

Can I select only monospace fonts?

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.

[BUG] Getting stack overflow when used with DarkLaf

Code for Font dialog to get called: (Made in kotlin)

val dialog = FontDialog(frame, true)
dialog.defaultCloseOperation = JDialog.DISPOSE_ON_CLOSE
dialog.isVisible = true
if (!dialog.isCancelSelected) {
    textArea.font = dialog.selectedFont
}

Partial exception:

Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
	at java.desktop/javax.swing.plaf.basic.BasicTextUI.propertyChange(BasicTextUI.java:208)
	at com.github.weisj.darklaf.ui.text.DarkTextFieldUI.propertyChange(DarkTextFieldUI.java:310)
	at com.github.weisj.darklaf.ui.text.DarkFormattedTextFieldUI.propertyChange(DarkFormattedTextFieldUI.java:59)
	at java.desktop/javax.swing.plaf.basic.BasicTextUI$UpdateHandler.propertyChange(BasicTextUI.java:1926)
	at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268)
    ...
	at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268)
	at java.desktop/java.awt.Component.firePropertyChange(Component.java:8722)
	at java.desktop/javax.swing.JComponent.setBorder(JComponent.java:1854)
	at java.desktop/javax.swing.plaf.basic.BasicSpinnerUI.maybeRemoveEditorBorder(BasicSpinnerUI.java:491)
	at java.desktop/javax.swing.plaf.basic.BasicSpinnerUI$Handler.propertyChange(BasicSpinnerUI.java:1094)
	at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268)
	at java.desktop/java.awt.Component.firePropertyChange(Component.java:8722)
	at java.desktop/javax.swing.JComponent.setBorder(JComponent.java:1854)
	at com.github.weisj.darklaf.components.border.MarginBorderWrapper.installBorder(MarginBorderWrapper.java:44)
	at com.github.weisj.darklaf.ui.text.DarkTextUI.installBorder(DarkTextUI.java:163)
	at com.github.weisj.darklaf.ui.text.DarkTextListener.propertyChange(DarkTextListener.java:90)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.