private void button1_Click(object sender, EventArgs e) { OpenFileDialog fd = new OpenFileDialog(); fd.Filter = "All AquaPlus Font Files|*.fnt"; if (fd.ShowDialog() != DialogResult.OK) { return; } Stream Stream = new StreamReader(fd.FileName).BaseStream; Font = new FNT(Stream); Glyphs = Font.GetGlyphs(); textBox4.Text = (FontSize - (FontSize / 8)) + ",0"; PreviewText(); }
private void button1_Click(object sender, EventArgs e) { OpenFileDialog fd = new OpenFileDialog(); fd.Filter = "All Prototype Font Files|*.fnt;*.pro"; if (fd.ShowDialog() != DialogResult.OK) { return; } string FN = Path.GetDirectoryName(fd.FileName) + "\\" + Path.GetFileNameWithoutExtension(fd.FileName); byte[] FNTD = File.ReadAllBytes(FN + ".fnt"); byte[] PROD = File.ReadAllBytes(FN + ".pro"); Font = new FNT(FNTD, PROD); Glyphs = Font.GetGlyphs(); textBox4.Text = (FontWidth - (FontWidth / 8)) + ",0"; PreviewText(); }