Formatting, added eclipse prefs file
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package mightypork.rogue.fonts;
|
||||
|
||||
|
||||
/**
|
||||
* Alignment
|
||||
*
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mightypork.rogue.fonts;
|
||||
|
||||
|
||||
import java.awt.Font;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
@@ -20,7 +21,6 @@ public class FontManager {
|
||||
|
||||
private static final boolean DEBUG = Config.LOG_FONTS;
|
||||
|
||||
|
||||
/**
|
||||
* Glyph tables.
|
||||
*
|
||||
@@ -75,13 +75,13 @@ public class FontManager {
|
||||
//@formatter:on
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Font style
|
||||
*
|
||||
* @author MightyPork
|
||||
*/
|
||||
public static enum Style {
|
||||
public static enum Style
|
||||
{
|
||||
/** Normal */
|
||||
NORMAL,
|
||||
/** Italic */
|
||||
@@ -112,7 +112,6 @@ public class FontManager {
|
||||
OUTLINE;
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * Preloaded font identifier [name, size, style]
|
||||
// *
|
||||
@@ -224,12 +223,9 @@ public class FontManager {
|
||||
/**
|
||||
* Register font file.
|
||||
*
|
||||
* @param path
|
||||
* resource path (res/fonts/...)
|
||||
* @param name
|
||||
* font name (for binding)
|
||||
* @param style
|
||||
* font style in this file
|
||||
* @param path resource path (res/fonts/...)
|
||||
* @param name font name (for binding)
|
||||
* @param style font style in this file
|
||||
*/
|
||||
public static void registerFile(String path, String name, Style style)
|
||||
{
|
||||
@@ -254,14 +250,10 @@ public class FontManager {
|
||||
* Preload font if needed, get preloaded font.<br>
|
||||
* If needed file is not available, throws runtime exception.
|
||||
*
|
||||
* @param name
|
||||
* font name (registerFile)
|
||||
* @param size
|
||||
* font size (pt)
|
||||
* @param style
|
||||
* font style
|
||||
* @param glyphs
|
||||
* glyphs needed
|
||||
* @param name font name (registerFile)
|
||||
* @param size font size (pt)
|
||||
* @param style font style
|
||||
* @param glyphs glyphs needed
|
||||
* @return the loaded font.
|
||||
*/
|
||||
public static LoadedFont loadFont(String name, double size, Style style, String glyphs)
|
||||
@@ -274,24 +266,16 @@ public class FontManager {
|
||||
* Preload font if needed, get preloaded font.<br>
|
||||
* If needed file is not available, throws runtime exception.
|
||||
*
|
||||
* @param name
|
||||
* font name (registerFile)
|
||||
* @param size
|
||||
* font size (pt)
|
||||
* @param style
|
||||
* font style
|
||||
* @param glyphs
|
||||
* glyphs needed
|
||||
* @param correctLeft
|
||||
* left horizontal correction
|
||||
* @param correctRight
|
||||
* right horizontal correction
|
||||
* @param scale
|
||||
* font scale (changing aspect ratio)
|
||||
* @param clipTop
|
||||
* top clip (0-1) - top part of the font to be cut off
|
||||
* @param clipBottom
|
||||
* bottom clip (0-1) - bottom part of the font to be cut off
|
||||
* @param name font name (registerFile)
|
||||
* @param size font size (pt)
|
||||
* @param style font style
|
||||
* @param glyphs glyphs needed
|
||||
* @param correctLeft left horizontal correction
|
||||
* @param correctRight right horizontal correction
|
||||
* @param scale font scale (changing aspect ratio)
|
||||
* @param clipTop top clip (0-1) - top part of the font to be cut off
|
||||
* @param clipBottom bottom clip (0-1) - bottom part of the font to be cut
|
||||
* off
|
||||
* @return the loaded font.
|
||||
*/
|
||||
public static LoadedFont loadFont(String name, double size, Style style, String glyphs, int correctLeft, int correctRight, Coord scale, double clipTop, double clipBottom)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mightypork.rogue.fonts;
|
||||
|
||||
|
||||
import static mightypork.rogue.fonts.FontManager.Style.*;
|
||||
import mightypork.rogue.fonts.FontManager.Glyphs;
|
||||
import mightypork.utils.logging.Log;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mightypork.rogue.fonts;
|
||||
|
||||
|
||||
import static mightypork.rogue.fonts.Align.*;
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
@@ -74,7 +75,6 @@ public class LoadedFont {
|
||||
private double clipVerticalT = 0;
|
||||
private double clipVerticalB = 0;
|
||||
|
||||
|
||||
private class CharStorageEntry {
|
||||
|
||||
/** Character's width */
|
||||
@@ -572,16 +572,11 @@ public class LoadedFont {
|
||||
/**
|
||||
* Draw string with font.
|
||||
*
|
||||
* @param x
|
||||
* x coord
|
||||
* @param y
|
||||
* y coord
|
||||
* @param text
|
||||
* text to draw
|
||||
* @param color
|
||||
* render color
|
||||
* @param align
|
||||
* (-1,0,1)
|
||||
* @param x x coord
|
||||
* @param y y coord
|
||||
* @param text text to draw
|
||||
* @param color render color
|
||||
* @param align (-1,0,1)
|
||||
*/
|
||||
public void draw(double x, double y, String text, RGB color, int align)
|
||||
{
|
||||
@@ -592,14 +587,10 @@ public class LoadedFont {
|
||||
/**
|
||||
* Draw string with font.
|
||||
*
|
||||
* @param pos
|
||||
* coord
|
||||
* @param text
|
||||
* text to draw
|
||||
* @param color
|
||||
* render color
|
||||
* @param align
|
||||
* (-1,0,1)
|
||||
* @param pos coord
|
||||
* @param text text to draw
|
||||
* @param color render color
|
||||
* @param align (-1,0,1)
|
||||
*/
|
||||
public void draw(Coord pos, String text, RGB color, int align)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user