package readers.fonts; import java.awt.image.BufferedImage; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import java.util.List; import java.awt.Color; public class Font { Glyph[] data = new Glyph[10]; final static int TRANSPARENT = new Color(0,0,0,0).getRGB(); final static Font FONT_DDR_DIFF = LoadFont("ddr_diff"); final static Font FONT_DDR_EXCOMBO = LoadFont("ddr_excombo"); final static Font FONT_DDR_NOTECOUNT = LoadFont("ddr_noteCount"); final static Font FONT_DDR_SCORE = LoadFont("ddr_score"); final static Font FONT_ITG_DIFF = LoadFont("itg_diff"); final static Font FONT_ITG_EX = LoadFont("itg_ex"); final static Font FONT_ITG_NOTECOUNT = LoadFont("itg_noteCount"); final static Font FONT_ITG_PCT = LoadFont("itg_pct"); final static Font FONT_LOVELIVE_NOTECOUNT = LoadFont("lovelive_noteCount"); final static Font FONT_LOVELIVE_PCT = LoadFont("lovelive_pct"); final static Font FONT_LOVELIVE_SCORE = LoadFont("lovelive_score"); final static Font FONT_POPN_COMBO = LoadFont("popn_combo"); final static Font FONT_POPN_NOTECOUNT = LoadFont("popn_noteCount"); final static Font FONT_POPN_SCORE = LoadFont("popn_score"); final static Font FONT_SDVX_EXSCORE = LoadFont("sdvx_EXScore"); final static Font FONT_SDVX_LITTLESCORE = LoadFont("sdvx_littleScore"); final static Font FONT_SDVX_NOTECOUNT = LoadFont("sdvx_noteCount"); final static Font FONT_SDVX_BIGSCORE = LoadFont("sdvx_largeScore"); public static Font LoadFont(String fontName) { Path f = Paths.get("readers","fonts",fontName); if (Files.exists(f)) { Font font = new Font(); try { List data = Files.readAllLines(f); for (int i=0;iendY) { endY=Y; } } } g.height=endY-startY; g.data = new boolean[g.width*g.height]; for (int X=0;X=0&&index