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

Fonts: Roboto Mono #639

Merged
merged 1 commit into from
Jan 12, 2023
Merged

Fonts: Roboto Mono #639

merged 1 commit into from
Jan 12, 2023

Conversation

DevCharly
Copy link
Collaborator

This PR packages the Roboto Mono font (https://fonts.google.com/specimen/Roboto+Mono) into a JAR (will be released to Maven Central later) and provides an easy way to use it with FlatLaf.

The font need to be installed before it can be used.

For lazy loading use:

FlatRobotoMonoFont.installLazy();

Or load immediately with:

FlatRobotoMonoFont.install();

To use Roboto Mono as monospaced font in your application, use:

FlatLaf.setPreferredMonospacedFontFamily( FlatRobotoMonoFont.FAMILY );

FlatLightLaf.setup();

//TODO create UI

You can of course also create fonts. E.g.:

// basic styles
new Font( FlatRobotoMonoFont.FAMILY, Font.PLAIN, 12 );
new Font( FlatRobotoMonoFont.FAMILY, Font.ITALIC, 12 );
new Font( FlatRobotoMonoFont.FAMILY, Font.BOLD, 12 );
new Font( FlatRobotoMonoFont.FAMILY, Font.BOLD | Font.ITALIC, 12 );

@DevCharly DevCharly added this to the 3.1 milestone Jan 12, 2023
@DevCharly DevCharly linked an issue Jan 12, 2023 that may be closed by this pull request
@DevCharly DevCharly merged commit e34b5ea into main Jan 12, 2023
@DevCharly
Copy link
Collaborator Author

Now available on Maven Central:

groupId:     com.formdev
artifactId:  flatlaf-fonts-roboto-mono
version:     3.000

Can be used with FlatLaf 3.0.

@DevCharly DevCharly deleted the fonts-roboto-mono branch January 12, 2023 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.

Add Roboto Mono support
1 participant