net.sourceforge.plantuml.font.Roboto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-mit Show documentation
Show all versions of plantuml-mit Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.font;
import java.awt.Font;
import java.awt.FontFormatException;
import java.awt.GraphicsEnvironment;
import java.io.IOException;
import java.io.InputStream;
public class Roboto {
// ::remove folder when __HAXE__
private final static String[] names = new String[] { "Roboto-BlackItalic.ttf", "Roboto-Black.ttf",
"Roboto-BoldItalic.ttf", "Roboto-Bold.ttf", "RobotoCondensed-BoldItalic.ttf", "RobotoCondensed-Bold.ttf",
"RobotoCondensed-Italic.ttf", "RobotoCondensed-LightItalic.ttf", "RobotoCondensed-Light.ttf",
"RobotoCondensed-MediumItalic.ttf", "RobotoCondensed-Medium.ttf", "RobotoCondensed-Regular.ttf",
"Roboto-Italic.ttf", "Roboto-LightItalic.ttf", "Roboto-Light.ttf", "Roboto-MediumItalic.ttf",
"Roboto-Medium.ttf", "Roboto-Regular.ttf", "Roboto-ThinItalic.ttf", "Roboto-Thin.ttf" };
public static void registerFonts() throws FontFormatException, IOException {
for (String n : names) {
final InputStream stream = Roboto.class.getResourceAsStream(n);
final Font font = Font.createFont(Font.TRUETYPE_FONT, stream);
GraphicsEnvironment.getLocalGraphicsEnvironment().registerFont(font);
}
}
}