All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.plantuml.font.Roboto Maven / Gradle / Ivy

There is a newer version: 1.2024.8
Show newest version
// 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);
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy