diff --git a/McBitFont/Form1.Designer.cs b/McBitFont/Form1.Designer.cs
index 1b25674..319c9cd 100644
--- a/McBitFont/Form1.Designer.cs
+++ b/McBitFont/Form1.Designer.cs
@@ -85,6 +85,7 @@
removeSymbolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
removeBeforeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
removeAfterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ zerofyWidthToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
CodeShiftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
previousSymbolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -119,7 +120,6 @@
dlgSavePNG = new System.Windows.Forms.SaveFileDialog();
pnlRightButtons = new System.Windows.Forms.Panel();
pnlInfo = new System.Windows.Forms.Panel();
- zerofyWidthToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)nudX).BeginInit();
((System.ComponentModel.ISupportInitialize)nudY).BeginInit();
panel1.SuspendLayout();
@@ -661,7 +661,7 @@
undoToolStripMenuItem.Image = Properties.Resources.arrow_undo;
undoToolStripMenuItem.Name = "undoToolStripMenuItem";
undoToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z;
- undoToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
+ undoToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
undoToolStripMenuItem.Text = "Undo";
undoToolStripMenuItem.ToolTipText = "Undo last canvas change";
undoToolStripMenuItem.Click += undoToolStripMenuItem_Click;
@@ -671,7 +671,7 @@
redoToolStripMenuItem.Image = Properties.Resources.arrow_redo;
redoToolStripMenuItem.Name = "redoToolStripMenuItem";
redoToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y;
- redoToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
+ redoToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
redoToolStripMenuItem.Text = "Redo";
redoToolStripMenuItem.ToolTipText = "Redo canvas change";
redoToolStripMenuItem.Click += redoToolStripMenuItem_Click;
@@ -682,7 +682,7 @@
copyToolStripMenuItem.Name = "copyToolStripMenuItem";
copyToolStripMenuItem.ShortcutKeyDisplayString = "";
copyToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C;
- copyToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
+ copyToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
copyToolStripMenuItem.Text = "Copy";
copyToolStripMenuItem.ToolTipText = "Copy current symbol to clipboard";
copyToolStripMenuItem.Click += copyToolStripMenuItem_Click;
@@ -693,7 +693,7 @@
pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
pasteToolStripMenuItem.ShortcutKeyDisplayString = "";
pasteToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V;
- pasteToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
+ pasteToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
pasteToolStripMenuItem.Text = "Paste";
pasteToolStripMenuItem.ToolTipText = "Paste from clipboard to current symbol";
pasteToolStripMenuItem.Click += pasteToolStripMenuItem_Click;
@@ -703,7 +703,7 @@
selectToolStripMenuItem.Image = Properties.Resources.fam_rectt;
selectToolStripMenuItem.Name = "selectToolStripMenuItem";
selectToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R;
- selectToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
+ selectToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
selectToolStripMenuItem.Text = "Select";
selectToolStripMenuItem.ToolTipText = "Toggle Rectangle selection tool";
selectToolStripMenuItem.Click += selectToolStripMenuItem_Click;
@@ -714,7 +714,7 @@
selectAllToolStripMenuItem.Image = Properties.Resources.arrow_out;
selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
selectAllToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A;
- selectAllToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
+ selectAllToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
selectAllToolStripMenuItem.Text = "Select All";
selectAllToolStripMenuItem.ToolTipText = "Select entire canvas";
selectAllToolStripMenuItem.Click += selectAllToolStripMenuItem_Click;
@@ -793,6 +793,16 @@
removeAfterToolStripMenuItem.ToolTipText = "Remove all symbols after current one";
removeAfterToolStripMenuItem.Click += removeAfterToolStripMenuItem_Click;
//
+ // zerofyWidthToolStripMenuItem
+ //
+ zerofyWidthToolStripMenuItem.Enabled = false;
+ zerofyWidthToolStripMenuItem.Image = Properties.Resources.text_letterspacing2;
+ zerofyWidthToolStripMenuItem.Name = "zerofyWidthToolStripMenuItem";
+ zerofyWidthToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
+ zerofyWidthToolStripMenuItem.Text = "Make all blank symbols 0-width";
+ zerofyWidthToolStripMenuItem.ToolTipText = "Make width equals zero for all blank symbols (except code 32 (space))";
+ zerofyWidthToolStripMenuItem.Click += ZerofyBlankWidth;
+ //
// CodeShiftToolStripMenuItem
//
CodeShiftToolStripMenuItem.Image = Properties.Resources.z_align_center;
@@ -809,18 +819,22 @@
//
// previousSymbolToolStripMenuItem
//
+ previousSymbolToolStripMenuItem.Image = Properties.Resources.arrow_turn_left;
previousSymbolToolStripMenuItem.Name = "previousSymbolToolStripMenuItem";
previousSymbolToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.Left;
previousSymbolToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
previousSymbolToolStripMenuItem.Text = "Previous Symbol";
+ previousSymbolToolStripMenuItem.ToolTipText = "Select previous symbol";
previousSymbolToolStripMenuItem.Click += previousSymbolToolStripMenuItem_Click;
//
// nextSymbolToolStripMenuItem
//
+ nextSymbolToolStripMenuItem.Image = Properties.Resources.arrow_turn_right;
nextSymbolToolStripMenuItem.Name = "nextSymbolToolStripMenuItem";
nextSymbolToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.Right;
nextSymbolToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
nextSymbolToolStripMenuItem.Text = "Next symbol";
+ nextSymbolToolStripMenuItem.ToolTipText = "Select next symbol";
nextSymbolToolStripMenuItem.Click += nextSymbolToolStripMenuItem_Click;
//
// toolStripSeparator4
@@ -1141,13 +1155,6 @@
pnlInfo.Size = new System.Drawing.Size(103, 154);
pnlInfo.TabIndex = 28;
//
- // zerofyWidthToolStripMenuItem
- //
- zerofyWidthToolStripMenuItem.Name = "zerofyWidthToolStripMenuItem";
- zerofyWidthToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
- zerofyWidthToolStripMenuItem.Text = "Make all blank symbols 0-width";
- zerofyWidthToolStripMenuItem.Click += ZerofyBlankWidth;
- //
// MainForm
//
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
diff --git a/McBitFont/Form1.cs b/McBitFont/Form1.cs
index 1685256..65afe36 100644
--- a/McBitFont/Form1.cs
+++ b/McBitFont/Form1.cs
@@ -225,14 +225,8 @@ namespace McBitFont {
public void nudX_ValueChanged(object sender, EventArgs e) {
Cursor.Current = Cursors.WaitCursor;
if (monospaced) {
- Bitmap bmp;
for (int i = 0; i < frames.Count; i++) {
- frames[i] = FrameResize(frames[i], (int)nudX.Value, dotHeight);
- bmp = GetMiniPictue(frames[i]);
- string s = frames[i].code.ToString().PadLeft(3, '0');
- ilMiniatures.Images.RemoveByKey(s);
- ilMiniatures.Images.Add(s, (Image)bmp);
- miniList.Items[s].ImageKey = s;
+ frames[i] = FrameResize(frames[i], (int)nudX.Value, dotHeight, true);
}
SetModified(true, true);
}
@@ -249,14 +243,8 @@ namespace McBitFont {
public void nudY_ValueChanged(object sender, EventArgs e) {
Cursor.Current = Cursors.WaitCursor;
- Bitmap bmp;
for (int i = 0; i < frames.Count; i++) {
- frames[i] = FrameResize(frames[i], frames[i].width, (int)nudY.Value);
- bmp = GetMiniPictue(frames[i]);
- string s = frames[i].code.ToString().PadLeft(3, '0');
- ilMiniatures.Images.RemoveByKey(s);
- ilMiniatures.Images.Add(s, (Image)bmp);
- miniList.Items[s].ImageKey = s;
+ frames[i] = FrameResize(frames[i], frames[i].width, (int)nudY.Value, true);
}
if (nudY.Focused) {
SetModified();
@@ -268,7 +256,7 @@ namespace McBitFont {
Cursor.Current = Cursors.Default;
}
- private FrameMiniature FrameResize(FrameMiniature ff, int neww, int newh) {
+ private FrameMiniature FrameResize(FrameMiniature ff, int neww, int newh, bool updateMiniList = false) {
int oldw = ff.width;
int oldh = ff.height;
int di = 0, dj = 0;
@@ -293,6 +281,15 @@ namespace McBitFont {
}
ff.data = t;
+ // update miniList with images
+ if (updateMiniList) {
+ Bitmap bmp = GetMiniPictue(ff);
+ string s = ff.code.ToString().PadLeft(3, '0');
+ ilMiniatures.Images.RemoveByKey(s);
+ ilMiniatures.Images.Add(s, (Image)bmp);
+ miniList.Items[s].ImageKey = s;
+ }
+
return ff;
}
@@ -863,6 +860,7 @@ namespace McBitFont {
}
makeVarWidthToolStripMenuItem.Visible = monospaced;
tsmiMakeVarWidth.Visible = monospaced;
+ zerofyWidthToolStripMenuItem.Enabled = !monospaced;
CodeShiftToolStripMenuItem.Visible = !form.cbSingle.Checked;
tsmiCodeShift.Visible = !form.cbSingle.Checked;
lblType.Text = monospaced ? "Monospaced" : "Variable width / Single";
@@ -1013,6 +1011,7 @@ namespace McBitFont {
tsmiMakeVarWidth.Visible = monospaced;
makeVarWidthToolStripMenuItem.Visible = monospaced;
+ zerofyWidthToolStripMenuItem.Enabled = !monospaced;
tsmiCodeShift.Visible = frames.Count > 1;
CodeShiftToolStripMenuItem.Visible = frames.Count > 1;
Cursor.Current = Cursors.Default;
@@ -1266,6 +1265,7 @@ namespace McBitFont {
monospaced = false;
makeVarWidthToolStripMenuItem.Visible = false;
tsmiMakeVarWidth.Visible = false;
+ zerofyWidthToolStripMenuItem.Enabled = true;
lblType.Text = "Variable width / Single";
SetModified(true, true);
}
@@ -1649,20 +1649,19 @@ namespace McBitFont {
if (monospaced) return; // Does not work for monospaced fonts
if (frames.Count < 2) return; // Does not work for single images
+ bool flag = false;
for (int i = 0; i < frames.Count; i++) {
+
if (IsFrameBlank(frames[i])) {
- Bitmap bmp;
-
- frames[i] = FrameResize(frames[i], 0, dotHeight);
- bmp = GetMiniPictue(frames[i]);
- string s = frames[i].code.ToString().PadLeft(3, '0');
- ilMiniatures.Images.RemoveByKey(s);
- ilMiniatures.Images.Add(s, (Image)bmp);
- miniList.Items[s].ImageKey = s;
-
- SetModified(true, true);
+ frames[i] = FrameResize(frames[i], 0, dotHeight, true);
+
+ flag = true;
}
}
+ if (flag) {
+ SetModified(true, true);
+ MiniList_SelectedIndexChanged(miniList, EventArgs.Empty);
+ }
}
}
}
diff --git a/McBitFont/Properties/Resources.Designer.cs b/McBitFont/Properties/Resources.Designer.cs
index 99698dd..ee6c114 100644
--- a/McBitFont/Properties/Resources.Designer.cs
+++ b/McBitFont/Properties/Resources.Designer.cs
@@ -100,6 +100,26 @@ namespace McBitFont.Properties {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap arrow_turn_left {
+ get {
+ object obj = ResourceManager.GetObject("arrow_turn_left", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap arrow_turn_right {
+ get {
+ object obj = ResourceManager.GetObject("arrow_turn_right", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
@@ -320,6 +340,16 @@ namespace McBitFont.Properties {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap text_letterspacing2 {
+ get {
+ object obj = ResourceManager.GetObject("text_letterspacing2", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
diff --git a/McBitFont/Properties/Resources.resx b/McBitFont/Properties/Resources.resx
index a99b88d..b2051b4 100644
--- a/McBitFont/Properties/Resources.resx
+++ b/McBitFont/Properties/Resources.resx
@@ -136,18 +136,18 @@
..\Resources\Famfamfam-Silk-Page-copy.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- ..\Resources\font.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\picture_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\arrow_inout.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\font.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\redo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- ..\Resources\Famfamfam-Silk-Disk.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
..\Resources\icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -181,20 +181,20 @@
..\Resources\shading.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\arrow_turn_left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\icon_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- ..\Resources\arrow_undo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
..\Resources\tick.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- ..\Resources\delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\arrow_undo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
..\Resources\arrow_redo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -208,6 +208,15 @@
..\Resources\Famfamfam-Silk-Page-white.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\arrow_turn_right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\Famfamfam-Silk-Disk.16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\folder_table.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -232,7 +241,7 @@
..\Resources\icon_64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- ..\Resources\picture_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\text_letterspacing2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
\ No newline at end of file
diff --git a/McBitFont/Resources/arrow_turn_left.png b/McBitFont/Resources/arrow_turn_left.png
new file mode 100644
index 0000000..83328d9
Binary files /dev/null and b/McBitFont/Resources/arrow_turn_left.png differ
diff --git a/McBitFont/Resources/arrow_turn_right.png b/McBitFont/Resources/arrow_turn_right.png
new file mode 100644
index 0000000..629f20d
Binary files /dev/null and b/McBitFont/Resources/arrow_turn_right.png differ
diff --git a/McBitFont/Resources/text_letterspacing2.png b/McBitFont/Resources/text_letterspacing2.png
new file mode 100644
index 0000000..fcc0db3
Binary files /dev/null and b/McBitFont/Resources/text_letterspacing2.png differ
diff --git a/TODO.txt b/TODO.txt
index 777fbbc..744a3dc 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -5,6 +5,6 @@ V Buttons to select previous/next symbol with shortcuts
Functionality:
- Fix straight (Ctrl/Shift) lines paint to reset coordinate on mouse-up even if Ctrl/Shift is still held
-- Command to make all blank symbols zero-width
+V Command to make all blank symbols zero-width
Bugs:
diff --git a/icons/famfamfam/arrow_turn_left.png b/icons/famfamfam/arrow_turn_left.png
new file mode 100644
index 0000000..83328d9
Binary files /dev/null and b/icons/famfamfam/arrow_turn_left.png differ
diff --git a/icons/famfamfam/arrow_turn_right.png b/icons/famfamfam/arrow_turn_right.png
new file mode 100644
index 0000000..629f20d
Binary files /dev/null and b/icons/famfamfam/arrow_turn_right.png differ
diff --git a/icons/famfamfam/text_letterspacing2.png b/icons/famfamfam/text_letterspacing2.png
new file mode 100644
index 0000000..fcc0db3
Binary files /dev/null and b/icons/famfamfam/text_letterspacing2.png differ