Compare commits
4 Commits
v1.6
...
c5e440ee44
Author | SHA1 | Date | |
---|---|---|---|
|
c5e440ee44 | ||
|
34bec25b3d | ||
|
b1acbdd98f | ||
|
6d5f90aaac |
@@ -88,7 +88,7 @@ namespace McBitFont {
|
||||
int imin, jmin, imax, jmax, idir, jdir;
|
||||
|
||||
if (com) {
|
||||
//Header comments
|
||||
// Header comments
|
||||
output += comments["header"];
|
||||
output += comments["scan_order"] + cbOrder.Text + "\n";
|
||||
output += comments["scan_hdir"] + cbHDir.Text + "\n";
|
||||
@@ -107,7 +107,7 @@ namespace McBitFont {
|
||||
}
|
||||
}
|
||||
|
||||
//Figure out mins and maxes
|
||||
// Figure out mins and maxes
|
||||
if (cbOrder.SelectedIndex == 0) {
|
||||
if (cbHDir.SelectedIndex == 0) {
|
||||
// Columns; Left to right
|
||||
|
@@ -89,6 +89,11 @@ namespace McBitFont {
|
||||
this.Text = "McBitFont " + version + " - " + prjName;
|
||||
|
||||
fbuf = new FrameMiniature(0, dotWidth, dotHeight);
|
||||
|
||||
// Chek for arguments
|
||||
if (Environment.GetCommandLineArgs().Length > 1) {
|
||||
loadProject(Environment.GetCommandLineArgs()[1]);
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
@@ -654,6 +659,46 @@ namespace McBitFont {
|
||||
}
|
||||
}
|
||||
|
||||
private void loadProject(string filename) {
|
||||
SaveBlock sav;
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
|
||||
using (FileStream fs = File.Open(filename, FileMode.Open)) {
|
||||
sav = (SaveBlock)formatter.Deserialize(fs);
|
||||
fs.Close();
|
||||
}
|
||||
monospaced = sav.monospaced;
|
||||
codepage = sav.codepage;
|
||||
baseline = sav.baseline;
|
||||
lblType.Text = monospaced ? "Monospaced" : "Variable width / Single";
|
||||
frames = sav.frames;
|
||||
miniList.Items.Clear();
|
||||
ilMiniatures.Images.Clear();
|
||||
foreach (FrameMiniature ff in frames) {
|
||||
var s = ff.code.ToString().PadLeft(3, '0');
|
||||
var sss = decodeSymbol(ff.code);
|
||||
ilMiniatures.Images.Add(s, (Image)getMiniPictue(ff));
|
||||
miniList.Items.Add(s, s + ' ' + sss, s);
|
||||
}
|
||||
nudX.ValueChanged -= nudX_ValueChanged;
|
||||
nudY.ValueChanged -= nudY_ValueChanged;
|
||||
nudX.Value = frames.First().width;
|
||||
nudY.Value = frames.First().height;
|
||||
dotResize((int)nudX.Value, (int)nudY.Value);
|
||||
nudX.ValueChanged += nudX_ValueChanged;
|
||||
nudY.ValueChanged += nudY_ValueChanged;
|
||||
f = copyFrame(frames.First());
|
||||
dotPanel.Refresh();
|
||||
miniList.Refresh();
|
||||
modified = false;
|
||||
prjModified = false;
|
||||
|
||||
prjName = Path.GetFileNameWithoutExtension(filename);
|
||||
this.Text = "McBitFont " + version + " - " + prjName;
|
||||
checkForAdd();
|
||||
fbuffer = false;
|
||||
}
|
||||
|
||||
private void openToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
if (prjModified) {
|
||||
if (MessageBox.Show("The project is modified.\nDo you want to save it first?", "Project was modified!", MessageBoxButtons.YesNo) == DialogResult.Yes) {
|
||||
@@ -662,43 +707,7 @@ namespace McBitFont {
|
||||
}
|
||||
}
|
||||
if (dlgOpen.ShowDialog() == DialogResult.OK) {
|
||||
SaveBlock sav;
|
||||
BinaryFormatter formatter = new BinaryFormatter();
|
||||
|
||||
using (FileStream fs = File.Open(dlgOpen.FileName, FileMode.Open)) {
|
||||
sav = (SaveBlock)formatter.Deserialize(fs);
|
||||
fs.Close();
|
||||
}
|
||||
monospaced = sav.monospaced;
|
||||
codepage = sav.codepage;
|
||||
baseline = sav.baseline;
|
||||
lblType.Text = monospaced ? "Monospaced" : "Variable width / Single";
|
||||
frames = sav.frames;
|
||||
miniList.Items.Clear();
|
||||
ilMiniatures.Images.Clear();
|
||||
foreach (FrameMiniature ff in frames) {
|
||||
var s = ff.code.ToString().PadLeft(3, '0');
|
||||
var sss = decodeSymbol(ff.code);
|
||||
ilMiniatures.Images.Add(s, (Image)getMiniPictue(ff));
|
||||
miniList.Items.Add(s, s + ' ' + sss, s);
|
||||
}
|
||||
nudX.ValueChanged -= nudX_ValueChanged;
|
||||
nudY.ValueChanged -= nudY_ValueChanged;
|
||||
nudX.Value = frames.First().width;
|
||||
nudY.Value = frames.First().height;
|
||||
dotResize((int)nudX.Value, (int)nudY.Value);
|
||||
nudX.ValueChanged += nudX_ValueChanged;
|
||||
nudY.ValueChanged += nudY_ValueChanged;
|
||||
f = copyFrame(frames.First());
|
||||
dotPanel.Refresh();
|
||||
miniList.Refresh();
|
||||
modified = false;
|
||||
prjModified = false;
|
||||
|
||||
prjName = Path.GetFileNameWithoutExtension(dlgOpen.FileName);
|
||||
this.Text = "McBitFont " + version + " - " + prjName;
|
||||
checkForAdd();
|
||||
fbuffer = false;
|
||||
loadProject(dlgOpen.FileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
23
TODO.txt
Normal file
23
TODO.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
Application:
|
||||
- Implement "Save" menu
|
||||
|
||||
Functionality:
|
||||
- Context menu in symbol navigator
|
||||
- Delete symbols before/after selected
|
||||
- Shift all symbols on code line (change symbol codes)
|
||||
- Specify starting code (extends the shift)
|
||||
- "Only numbers" range in the New dialog
|
||||
- "Specify range" in the New dialog
|
||||
- "Single frame", "only numbers" and "specify range" as radio buttons
|
||||
- Button to Clear/Fill a block
|
||||
- Undo/Redo
|
||||
- Image import from a file
|
||||
- Import from a text array
|
||||
- Copy-paste to a symbol with different size
|
||||
- Rectangle selection to mass-paint, shift and mirror pixels
|
||||
- Change height of variable width fonts with ability to choose which side to add pixels to
|
||||
- Make it possible to have zero width chars in VarWidth fonts
|
||||
- "Packed" fonts export
|
||||
|
||||
Bugs:
|
||||
- Every char changes its width to default on VarWidth font height change!
|
Binary file not shown.
BIN
examples/haxrcorp_4089_cyrillic_altgr.mbf
Normal file
BIN
examples/haxrcorp_4089_cyrillic_altgr.mbf
Normal file
Binary file not shown.
BIN
examples/helvB08_PREFAB.mbf
Normal file
BIN
examples/helvB08_PREFAB.mbf
Normal file
Binary file not shown.
BIN
examples/helvB08_t_cyrillic.mbf
Normal file
BIN
examples/helvB08_t_cyrillic.mbf
Normal file
Binary file not shown.
Reference in New Issue
Block a user