mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-16 00:37:11 -06:00
Fonts: support specifying preferred font family for easy using another font (e.g. Inter) for all components
This commit is contained in:
@@ -27,6 +27,24 @@ import java.io.InputStream;
|
||||
* <p>
|
||||
* Font home page: <a href="https://www.jetbrains.com/mono">https://www.jetbrains.com/mono</a><br>
|
||||
* GitHub project: <a href="https://github.com/JetBrains/JetBrainsMono">https://github.com/JetBrains/JetBrainsMono</a>
|
||||
* <p>
|
||||
* To install the font, invoke following once (e.g. in your {@code main()} method; on AWT thread):
|
||||
* <pre>{@code
|
||||
* FlatJetBrainsMonoFont.install();
|
||||
* }</pre>
|
||||
* <p>
|
||||
* Use as default monospaced font:
|
||||
* <pre>{@code
|
||||
* FlatLaf.setPreferredMonospacedFontFamily( FlatJetBrainsMonoFont.FAMILY );
|
||||
* }</pre>
|
||||
* <p>
|
||||
* Create fonts:
|
||||
* <pre>{@code
|
||||
* new Font( FlatJetBrainsMonoFont.FAMILY, Font.PLAIN, 12 );
|
||||
* new Font( FlatJetBrainsMonoFont.FAMILY, Font.ITALIC, 12 );
|
||||
* new Font( FlatJetBrainsMonoFont.FAMILY, Font.BOLD, 12 );
|
||||
* new Font( FlatJetBrainsMonoFont.FAMILY, Font.BOLD | Font.ITALIC, 12 );
|
||||
* }</pre>
|
||||
*
|
||||
* @author Karl Tauber
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user