Rogue: Savage Rats, a retro-themed dungeon crawler
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
rogue-savage-rats/src/mightypork/gamecore/resources/fonts/impl/LazyFontNative.java

40 lines
1.0 KiB

package mightypork.gamecore.resources.fonts.impl;
import java.awt.Font;
import java.io.IOException;
import mightypork.gamecore.resources.textures.FilterMode;
import mightypork.utils.annotations.Alias;
/**
* Font obtained from the OS
*
* @author Ondřej Hruška (MightyPork)
*/
@Alias(name = "FontNative")
public class LazyFontNative extends LazyFont {
/**
* A font from OS, found by name
*
* @param fontName font family name
* @param extraChars extra chars (0-255 loaded by default)
* @param size size (pt)
* @param style font style
* @param antialias use antialiasing when drawn on the cache texture
* @param filter GL filtering mode
*/
public LazyFontNative(String fontName, String extraChars, double size, FontStyle style, boolean antialias, FilterMode filter) {
super(fontName, extraChars, size, style, antialias, filter);
}
@Override
protected Font getAwtFont(String resource, float size, int style) throws IOException
{
return new Font(resource, style, (int) size);
}
}