From 647e5f56012f86bbfd754f82e59d280bde684acf Mon Sep 17 00:00:00 2001 From: Anton Mukhin Date: Sat, 17 May 2025 02:03:58 +0300 Subject: [PATCH 01/10] Save implemented; Swapped Ctrl and Shift fow Zoom/horizontal scroll for frame matrix --- McBitFont/Form1.Designer.cs | 30 +++++++++++++++------ McBitFont/Form1.cs | 52 +++++++++++++++++++++++++++++++------ 2 files changed, 66 insertions(+), 16 deletions(-) diff --git a/McBitFont/Form1.Designer.cs b/McBitFont/Form1.Designer.cs index 54f7c22..8bfb15a 100644 --- a/McBitFont/Form1.Designer.cs +++ b/McBitFont/Form1.Designer.cs @@ -53,6 +53,7 @@ this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -403,6 +404,7 @@ this.newToolStripMenuItem, this.openToolStripMenuItem, this.saveToolStripMenuItem, + this.saveAsToolStripMenuItem, this.exitToolStripMenuItem}); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); @@ -414,7 +416,7 @@ this.newToolStripMenuItem.Name = "newToolStripMenuItem"; this.newToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+N"; this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); - this.newToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.newToolStripMenuItem.Size = new System.Drawing.Size(184, 22); this.newToolStripMenuItem.Text = "New"; this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click); // @@ -424,7 +426,7 @@ this.openToolStripMenuItem.Name = "openToolStripMenuItem"; this.openToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+O"; this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.openToolStripMenuItem.Size = new System.Drawing.Size(184, 22); this.openToolStripMenuItem.Text = "Open"; this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); // @@ -434,9 +436,20 @@ this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; this.saveToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+S"; this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); - this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.saveToolStripMenuItem.Text = "Save as"; - this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click); + this.saveToolStripMenuItem.Size = new System.Drawing.Size(184, 22); + this.saveToolStripMenuItem.Text = "Save"; + this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click_1); + // + // saveAsToolStripMenuItem + // + this.saveAsToolStripMenuItem.Image = global::McBitFont.Properties.Resources.Famfamfam_Silk_Disk_16; + this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; + this.saveAsToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Shift+S"; + this.saveAsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) + | System.Windows.Forms.Keys.S))); + this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(184, 22); + this.saveAsToolStripMenuItem.Text = "Save as"; + this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click); // // exitToolStripMenuItem // @@ -444,7 +457,7 @@ this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; this.exitToolStripMenuItem.ShortcutKeyDisplayString = "Alt+X"; this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.X))); - this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.exitToolStripMenuItem.Size = new System.Drawing.Size(184, 22); this.exitToolStripMenuItem.Text = "Exit"; this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // @@ -538,7 +551,7 @@ this.mirrorYToolStripMenuItem, this.exportToolStripMenuItem}); this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; - this.toolsToolStripMenuItem.Size = new System.Drawing.Size(46, 20); + this.toolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20); this.toolsToolStripMenuItem.Text = "Tools"; // // shiftUpToolStripMenuItem @@ -716,7 +729,7 @@ private System.Windows.Forms.MenuStrip menuStrip1; private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; @@ -739,6 +752,7 @@ private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem pasteToolStripMenuItem; private System.Windows.Forms.Button btnBaseline; + private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; } } diff --git a/McBitFont/Form1.cs b/McBitFont/Form1.cs index 842ba1b..8a83ea0 100644 --- a/McBitFont/Form1.cs +++ b/McBitFont/Form1.cs @@ -53,6 +53,7 @@ namespace McBitFont { bool prjModified = false; public const string version = "1.6"; public string prjName = "Untitled"; + public string prjFileName = ""; public int codepage = 1251; private FrameMiniature fbuf; private bool fbuffer = false; @@ -118,12 +119,12 @@ namespace McBitFont { private void dotPanel_MouseWheel(object sender, MouseEventArgs e) { int t = e.Delta / 120; if (e.Delta == 0) return; - if (ModifierKeys.HasFlag(Keys.Shift)) { + if (ModifierKeys.HasFlag(Keys.Control)) { t += cbZoom.SelectedIndex; if (t > cbZoom.Items.Count - 1) return; if (t < 0) return; cbZoom.SelectedIndex = t; - } else if (ModifierKeys.HasFlag(Keys.Control)) { + } else if (ModifierKeys.HasFlag(Keys.Shift)) { if (hScroll.Enabled) { t = t * -1 * (cellSize + gap) + hScroll.Value; if (t < hScroll.Minimum) t = hScroll.Minimum; @@ -595,6 +596,7 @@ namespace McBitFont { baseline = 0; prjName = "Untitled"; + prjFileName = ""; this.Text = "McBitFont " + version + " - " + prjName; modified = false; checkForAdd(); @@ -637,11 +639,7 @@ namespace McBitFont { } private void saveToolStripMenuItem_Click(object sender, EventArgs e) { - if (modified) { - if (MessageBox.Show("Current frame is modified.\nDo you want to apply the changes first?", "The frame was modified!", MessageBoxButtons.YesNo) == DialogResult.Yes) { - saveFrame(); - } - } + checkModifiedFrame(); if (dlgSave.ShowDialog() == DialogResult.OK) { SaveBlock sav; sav.monospaced = monospaced; @@ -655,6 +653,7 @@ namespace McBitFont { } prjModified = false; prjName = Path.GetFileNameWithoutExtension(dlgSave.FileName); + prjFileName = dlgSave.FileName; this.Text = "McBitFont " + version + " - " + prjName; } } @@ -693,16 +692,34 @@ namespace McBitFont { modified = false; prjModified = false; + prjFileName = filename; prjName = Path.GetFileNameWithoutExtension(filename); this.Text = "McBitFont " + version + " - " + prjName; checkForAdd(); fbuffer = false; } + private void saveProject(string filename) { + SaveBlock sav; + sav.monospaced = monospaced; + sav.frames = frames; + sav.codepage = codepage; + sav.baseline = baseline; + BinaryFormatter formatter = new BinaryFormatter(); + using (Stream ms = File.OpenWrite(filename)) { + formatter.Serialize(ms, sav); + ms.Close(); + } + prjModified = false; + prjName = Path.GetFileNameWithoutExtension(filename); + prjFileName = filename; + this.Text = "McBitFont " + version + " - " + prjName; + } + 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) { - saveToolStripMenuItem.PerformClick(); + saveAsToolStripMenuItem.PerformClick(); return; } } @@ -774,6 +791,25 @@ namespace McBitFont { set_base = !set_base; } + // Check modified / Save frame + private void checkModifiedFrame() { + if (modified) { + if (MessageBox.Show("Current frame is modified.\nDo you want to apply the changes first?", "The frame was modified!", MessageBoxButtons.YesNo) == DialogResult.Yes) { + saveFrame(); + } + } + } + + private void saveToolStripMenuItem_Click_1(object sender, EventArgs e) { + if (prjFileName == "") { + saveAsToolStripMenuItem.PerformClick(); + } else { + checkModifiedFrame(); + saveProject(prjFileName); + } + + } + private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { if (prjModified) { if (MessageBox.Show("The project is modified.\nAre you sure you want to quit?", "Are you sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { From 03ef799381fc42b1fa46379ba7c9825dbed9f13d Mon Sep 17 00:00:00 2001 From: Anton Mukhin Date: Sat, 17 May 2025 02:20:01 +0300 Subject: [PATCH 02/10] Bug fixed: VarWidth fonts height change resets all frames' width --- McBitFont/Form1.cs | 2 +- TODO.txt | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/McBitFont/Form1.cs b/McBitFont/Form1.cs index 8a83ea0..81766f4 100644 --- a/McBitFont/Form1.cs +++ b/McBitFont/Form1.cs @@ -162,7 +162,7 @@ namespace McBitFont { private void nudY_ValueChanged(object sender, EventArgs e) { Bitmap bmp; for (int i = 0; i < frames.Count; i++) { - frames[i] = frameResize(frames[i], dotWidth, (int)nudY.Value); + 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); diff --git a/TODO.txt b/TODO.txt index 7dc7c23..5015acf 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,5 +1,4 @@ Application: -- Implement "Save" menu Functionality: - Context menu in symbol navigator @@ -20,4 +19,3 @@ Functionality: - "Packed" fonts export Bugs: -- Every char changes its width to default on VarWidth font height change! \ No newline at end of file From d24143d1a657aae7d652dbde11d16145c342f585 Mon Sep 17 00:00:00 2001 From: Anton Mukhin Date: Sat, 17 May 2025 03:52:29 +0300 Subject: [PATCH 03/10] Bugs fixed and new functionality: Functionality: V "Only numbers" range in the New dialog V "Specify range" in the New dialog V "Single frame", "only numbers" and "specify range" as radio buttons Bugs: V App allows to create fonts with a gap in symbol cequence! V File -> New does not check for unsaveed changes! --- McBitFont/Form1.cs | 40 +++++++++++----------- McBitFont/New.Designer.cs | 70 ++++++++++++++++++++++++--------------- McBitFont/New.cs | 48 +++++++++++++-------------- TODO.txt | 11 ++++-- 4 files changed, 95 insertions(+), 74 deletions(-) diff --git a/McBitFont/Form1.cs b/McBitFont/Form1.cs index 81766f4..7155c19 100644 --- a/McBitFont/Form1.cs +++ b/McBitFont/Form1.cs @@ -532,6 +532,7 @@ namespace McBitFont { } private void newToolStripMenuItem_Click(object sender, EventArgs e) { + checkModifiedFrame(); if (prjModified) { if (MessageBox.Show("The project is modified.\nDo you want to save it first?", "Project was modified!", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { saveToolStripMenuItem.PerformClick(); @@ -556,28 +557,27 @@ namespace McBitFont { append = "Single"; monospaced = false; } else { - int i; - if (form.cbNotPrintable.Checked) { - for (i = 0; i < 32; i++) { - newf = new FrameMiniature(i, neww, newh); - if (form.cbFontBased.Checked) newf = fillFrame(newf, form.dlgFont.Font, (int)form.nudShiftX.Value, (int)form.nudShiftY.Value); - frames.Add(newf); - } + int i, imin, imax; + if (form.cbDigits.Checked) { + imin = 48; + imax = 57; + } else { + if (form.cbNotPrintable.Checked) imin = 0; + else if (form.cbLatin.Checked) imin = 32; + else imin = 128; + + if (form.cbExtended.Checked) imax = 255; + else if (form.cbLatin.Checked) imax = 127; + else imax = 31; } - if (form.cbLatin.Checked) { - for (i = 32; i < 128; i++) { - newf = new FrameMiniature(i, neww, newh); - if (form.cbFontBased.Checked) newf = fillFrame(newf, form.dlgFont.Font, (int)form.nudShiftX.Value, (int)form.nudShiftY.Value); - frames.Add(newf); - } - } - if (form.cbExtended.Checked) { - for (i = 128; i < 256; i++) { - newf = new FrameMiniature(i, neww, newh); - if (form.cbFontBased.Checked) newf = fillFrame(newf, form.dlgFont.Font, (int)form.nudShiftX.Value, (int)form.nudShiftY.Value); - frames.Add(newf); - } + + + for (i = imin; i <= imax; i++) { + newf = new FrameMiniature(i, neww, newh); + if (form.cbFontBased.Checked) newf = fillFrame(newf, form.dlgFont.Font, (int)form.nudShiftX.Value, (int)form.nudShiftY.Value); + frames.Add(newf); } + monospaced = form.rbMono.Checked; } lblType.Text = monospaced ? "Monospaced" : "Variable width / Single"; diff --git a/McBitFont/New.Designer.cs b/McBitFont/New.Designer.cs index 659a399..9587429 100644 --- a/McBitFont/New.Designer.cs +++ b/McBitFont/New.Designer.cs @@ -50,10 +50,11 @@ this.lblShiftX = new System.Windows.Forms.Label(); this.lblShiftY = new System.Windows.Forms.Label(); this.pnlFont = new System.Windows.Forms.Panel(); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); this.nudChar2 = new System.Windows.Forms.NumericUpDown(); this.nudChar1 = new System.Windows.Forms.NumericUpDown(); - this.label3 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); + this.cbDigits = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.nudNewX)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudNewY)).BeginInit(); this.panel1.SuspendLayout(); @@ -159,35 +160,37 @@ // cbNotPrintable // this.cbNotPrintable.AutoSize = true; - this.cbNotPrintable.Location = new System.Drawing.Point(140, 54); + this.cbNotPrintable.Location = new System.Drawing.Point(140, 77); this.cbNotPrintable.Name = "cbNotPrintable"; this.cbNotPrintable.Size = new System.Drawing.Size(116, 17); this.cbNotPrintable.TabIndex = 7; this.cbNotPrintable.Text = "0-31 (Not printable)"; this.cbNotPrintable.UseVisualStyleBackColor = true; + this.cbNotPrintable.CheckedChanged += new System.EventHandler(this.checkboxChanged); // // cbLatin // this.cbLatin.AutoSize = true; this.cbLatin.Checked = true; this.cbLatin.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbLatin.Location = new System.Drawing.Point(140, 77); + this.cbLatin.Location = new System.Drawing.Point(140, 100); this.cbLatin.Name = "cbLatin"; this.cbLatin.Size = new System.Drawing.Size(91, 17); this.cbLatin.TabIndex = 8; this.cbLatin.Text = "32-127 (Latin)"; this.cbLatin.UseVisualStyleBackColor = true; + this.cbLatin.CheckedChanged += new System.EventHandler(this.checkboxChanged); // // cbExtended // this.cbExtended.AutoSize = true; - this.cbExtended.Location = new System.Drawing.Point(140, 100); + this.cbExtended.Location = new System.Drawing.Point(140, 123); this.cbExtended.Name = "cbExtended"; this.cbExtended.Size = new System.Drawing.Size(119, 17); this.cbExtended.TabIndex = 9; this.cbExtended.Text = "128-255 (Extended)"; this.cbExtended.UseVisualStyleBackColor = true; - this.cbExtended.CheckedChanged += new System.EventHandler(this.cbExtended_CheckedChanged); + this.cbExtended.CheckedChanged += new System.EventHandler(this.checkboxChanged); // // btnOK // @@ -221,7 +224,7 @@ this.cbSingle.TabIndex = 12; this.cbSingle.Text = "Single frame"; this.cbSingle.UseVisualStyleBackColor = true; - this.cbSingle.CheckedChanged += new System.EventHandler(this.cbSingle_CheckedChanged); + this.cbSingle.CheckedChanged += new System.EventHandler(this.checkboxChanged); // // toolTip1 // @@ -235,7 +238,7 @@ this.cbEncoding.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbEncoding.Enabled = false; this.cbEncoding.FormattingEnabled = true; - this.cbEncoding.Location = new System.Drawing.Point(140, 123); + this.cbEncoding.Location = new System.Drawing.Point(140, 146); this.cbEncoding.Name = "cbEncoding"; this.cbEncoding.Size = new System.Drawing.Size(121, 21); this.cbEncoding.TabIndex = 13; @@ -294,7 +297,7 @@ this.cbFontBased.TabIndex = 16; this.cbFontBased.Text = "Based on a font"; this.cbFontBased.UseVisualStyleBackColor = true; - this.cbFontBased.CheckedChanged += new System.EventHandler(this.cbFontBased_CheckedChanged); + this.cbFontBased.CheckedChanged += new System.EventHandler(this.checkboxChanged); // // lblFont // @@ -371,6 +374,26 @@ this.pnlFont.TabIndex = 22; this.pnlFont.Visible = false; // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(112, 152); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(45, 13); + this.label4.TabIndex = 25; + this.label4.Text = "Sample:"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(14, 152); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(45, 13); + this.label3.TabIndex = 24; + this.label3.Text = "Sample:"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // // nudChar2 // this.nudChar2.Location = new System.Drawing.Point(161, 149); @@ -407,25 +430,16 @@ 0}); this.nudChar1.ValueChanged += new System.EventHandler(this.nudNewX_ValueChanged); // - // label3 + // cbDigits // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(14, 152); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(45, 13); - this.label3.TabIndex = 24; - this.label3.Text = "Sample:"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(112, 152); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(45, 13); - this.label4.TabIndex = 25; - this.label4.Text = "Sample:"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.cbDigits.AutoSize = true; + this.cbDigits.Location = new System.Drawing.Point(140, 54); + this.cbDigits.Name = "cbDigits"; + this.cbDigits.Size = new System.Drawing.Size(74, 17); + this.cbDigits.TabIndex = 23; + this.cbDigits.Text = "Digits only"; + this.cbDigits.UseVisualStyleBackColor = true; + this.cbDigits.CheckedChanged += new System.EventHandler(this.checkboxChanged); // // New // @@ -433,6 +447,7 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.CancelButton = this.btnCancel; this.ClientSize = new System.Drawing.Size(484, 211); + this.Controls.Add(this.cbDigits); this.Controls.Add(this.pnlFont); this.Controls.Add(this.cbFontBased); this.Controls.Add(this.cbEncoding); @@ -506,5 +521,6 @@ private System.Windows.Forms.Label label3; public System.Windows.Forms.NumericUpDown nudChar2; public System.Windows.Forms.NumericUpDown nudChar1; + public System.Windows.Forms.CheckBox cbDigits; } } \ No newline at end of file diff --git a/McBitFont/New.cs b/McBitFont/New.cs index add3740..e41d0ec 100644 --- a/McBitFont/New.cs +++ b/McBitFont/New.cs @@ -36,25 +36,13 @@ namespace McBitFont { this.Width = 300; this.Height = 250; } - private void cbSingle_CheckedChanged(object sender, EventArgs e) { - bool c = !cbSingle.Checked; - bool f = cbFontBased.Checked; - cbNotPrintable.Enabled = c; - cbLatin.Enabled = c; - cbExtended.Enabled = c; - cbFontBased.Enabled = c; - rbMono.Enabled = c; - rbVar.Enabled = c; - pnlFont.Visible = c && f; - this.Width = c && f ? 500 : 300; - } - private void New_Load(object sender, EventArgs e) { toolTip1.SetToolTip(nudNewX, "Frame Width;\nCharacter width;\nDefault character width for Variable width fonts"); toolTip1.SetToolTip(nudNewY, "Frame Height;\nCharacter height"); toolTip1.SetToolTip(rbMono, "Monospaced font"); toolTip1.SetToolTip(rbVar, "Variable width font"); toolTip1.SetToolTip(cbSingle, "Create one single frame"); + toolTip1.SetToolTip(cbDigits, "Only digits characters with codes 48 - 57"); toolTip1.SetToolTip(cbNotPrintable, "Add not printable characters with codes 0 - 31"); toolTip1.SetToolTip(cbLatin, "Add Latin characters with codes 32 - 127"); toolTip1.SetToolTip(cbExtended, "Add Extended characters with codes 128 - 255"); @@ -157,17 +145,6 @@ namespace McBitFont { nud.Select(0, nud.Text.Length); } - private void cbExtended_CheckedChanged(object sender, EventArgs e) { - cbEncoding.Enabled = cbExtended.Checked; - } - - private void cbFontBased_CheckedChanged(object sender, EventArgs e) { - bool c = !cbSingle.Checked; - bool f = cbFontBased.Checked; - pnlFont.Visible = c && f; - this.Width = c && f ? 500 : 300; - } - private void btnFont_Click(object sender, EventArgs e) { if (dlgFont.ShowDialog() == DialogResult.OK) { lblFont.Text = dlgFont.Font.Name + " " + dlgFont.Font.Size.ToString(); @@ -178,5 +155,28 @@ namespace McBitFont { private void nudNewX_ValueChanged(object sender, EventArgs e) { updateChars(); } + + private void checkboxChanged(object sender, EventArgs e) { + if (!(sender as CheckBox).Focused) return; + + bool c = !cbSingle.Checked; + bool d = !cbDigits.Checked; + bool p = cbNotPrintable.Checked; + bool x = cbExtended.Checked; + bool f = cbFontBased.Checked; + + cbDigits.Enabled = c; + cbNotPrintable.Enabled = c && d; + cbLatin.Enabled = c && d; + cbExtended.Enabled = c && d; + cbFontBased.Enabled = c; + cbEncoding.Enabled = c && d && x; + rbMono.Enabled = c; + rbVar.Enabled = c; + pnlFont.Visible = c && f; + if (p && x) cbLatin.Checked = true; + this.Width = c && f ? 500 : 300; + btnOK.Enabled = !c || !d || x || p || cbLatin.Checked; + } } } diff --git a/TODO.txt b/TODO.txt index 5015acf..acb02d4 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,13 +1,15 @@ Application: +v 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 +V "Only numbers" range in the New dialog +V "Specify range" in the New dialog +V "Single frame", "only numbers" and "specify range" as radio buttons +- Ability to make monospaced font variable width one - Button to Clear/Fill a block - Undo/Redo - Image import from a file @@ -19,3 +21,6 @@ Functionality: - "Packed" fonts export Bugs: +V Every char changes its width to default on VarWidth font height change! +V App allows to create fonts with a gap in symbol cequence! +V File -> New does not check for unsaveed changes! \ No newline at end of file From 0aeec8bd19da690db9b88e88005c8a7cdad17c00 Mon Sep 17 00:00:00 2001 From: Anton Mukhin Date: Sat, 17 May 2025 03:58:00 +0300 Subject: [PATCH 04/10] It is now possible to have zero width chars in VarWidth fonts --- McBitFont/Form1.Designer.cs | 5 ----- TODO.txt | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/McBitFont/Form1.Designer.cs b/McBitFont/Form1.Designer.cs index 8bfb15a..e97f839 100644 --- a/McBitFont/Form1.Designer.cs +++ b/McBitFont/Form1.Designer.cs @@ -106,11 +106,6 @@ 0, 0, 0}); - this.nudX.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); this.nudX.Name = "nudX"; this.nudX.Size = new System.Drawing.Size(55, 20); this.nudX.TabIndex = 1; diff --git a/TODO.txt b/TODO.txt index acb02d4..bbb0bea 100644 --- a/TODO.txt +++ b/TODO.txt @@ -17,7 +17,7 @@ V "Single frame", "only numbers" and "specify range" as radio buttons - 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 +V Make it possible to have zero width chars in VarWidth fonts - "Packed" fonts export Bugs: From 2a940c8933d2b8285ce919721ec35e4ca71ca8ee Mon Sep 17 00:00:00 2001 From: Anton Mukhin Date: Sun, 18 May 2025 00:50:05 +0300 Subject: [PATCH 05/10] TODO feature: Copy-paste to a symbol with different size --- McBitFont/Form1.cs | 26 ++++++++++++++++---------- TODO.txt | 3 ++- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/McBitFont/Form1.cs b/McBitFont/Form1.cs index 7155c19..f6e3901 100644 --- a/McBitFont/Form1.cs +++ b/McBitFont/Form1.cs @@ -221,8 +221,6 @@ namespace McBitFont { w = pixelOffset + dotWidth * (cellSize + gap); h = pixelOffset + dotHeight * (cellSize + gap); cbZoom_SelectedIndexChanged(cbZoom, null); - - fbuffer = false; } private void cbZoom_SelectedIndexChanged(object sender, EventArgs e) { @@ -607,12 +605,7 @@ namespace McBitFont { private void miniList_SelectedIndexChanged(object sender, EventArgs e) { if (miniList.FocusedItem == null) return; - if (modified) { - if (MessageBox.Show("Current symbol is modified.\nDo you want to save the changes?", "Symbol was modified!", MessageBoxButtons.YesNo) == DialogResult.Yes) { - saveFrame(); - } - modified = false; - } + checkModifiedFrame(); if (miniList.SelectedItems.Count == 0) { removeSymbolToolStripMenuItem.Enabled = false; copyToolStripMenuItem.Enabled = false; @@ -777,7 +770,19 @@ namespace McBitFont { } private void pasteToolStripMenuItem_Click(object sender, EventArgs e) { - Array.Copy(fbuf.data, f.data, fbuf.data.Length); + if (fbuf.width == f.width && fbuf.height == f.height) { + Array.Copy(fbuf.data, f.data, fbuf.data.Length); + } else { + var wmax = (fbuf.width > f.width) ? f.width : fbuf.width; + var hmax = (fbuf.height > f.height) ? f.height : fbuf.height; + + for (int i = 0; i < wmax; i++) { + for (int j = 0; j < hmax; j++) { + f.data[i,j] = fbuf.data[i,j]; + } + } + } + dotPanel.Refresh(); modified = true; } @@ -794,9 +799,10 @@ namespace McBitFont { // Check modified / Save frame private void checkModifiedFrame() { if (modified) { - if (MessageBox.Show("Current frame is modified.\nDo you want to apply the changes first?", "The frame was modified!", MessageBoxButtons.YesNo) == DialogResult.Yes) { + if (MessageBox.Show("Current symbol is modified.\nDo you want to save the changes?", "Symbol was modified!", MessageBoxButtons.YesNo) == DialogResult.Yes) { saveFrame(); } + modified = false; } } diff --git a/TODO.txt b/TODO.txt index bbb0bea..8c64334 100644 --- a/TODO.txt +++ b/TODO.txt @@ -14,11 +14,12 @@ V "Single frame", "only numbers" and "specify range" as radio buttons - Undo/Redo - Image import from a file - Import from a text array -- Copy-paste to a symbol with different size +V 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 V Make it possible to have zero width chars in VarWidth fonts - "Packed" fonts export +- Tooltips on main form Bugs: V Every char changes its width to default on VarWidth font height change! From 6fb5a1f773be24e25e83f2d51cd0aa9f7bd0d660 Mon Sep 17 00:00:00 2001 From: Anton Mukhin Date: Sun, 18 May 2025 01:13:40 +0300 Subject: [PATCH 06/10] TODO feature: Tooltips on main form --- McBitFont/Export.Designer.cs | 12 ++++++++++++ McBitFont/Export.resx | 6 ++++++ McBitFont/Form1.Designer.cs | 21 +++++++++++++++++++++ McBitFont/Form1.resx | 3 +++ 4 files changed, 42 insertions(+) diff --git a/McBitFont/Export.Designer.cs b/McBitFont/Export.Designer.cs index c53b8b5..6853331 100644 --- a/McBitFont/Export.Designer.cs +++ b/McBitFont/Export.Designer.cs @@ -23,6 +23,7 @@ /// the contents of this method with the code editor. /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.txtOutput = new System.Windows.Forms.RichTextBox(); this.gbScan = new System.Windows.Forms.GroupBox(); this.cbVDir = new System.Windows.Forms.ComboBox(); @@ -43,6 +44,7 @@ this.cbFormat = new System.Windows.Forms.ComboBox(); this.btnGenerate = new System.Windows.Forms.Button(); this.btnClose = new System.Windows.Forms.Button(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.gbScan.SuspendLayout(); this.gbOptions.SuspendLayout(); this.gbNumbers.SuspendLayout(); @@ -138,6 +140,7 @@ this.cbZeroes.Size = new System.Drawing.Size(98, 17); this.cbZeroes.TabIndex = 2; this.cbZeroes.Text = "Leading zeroes"; + this.toolTip1.SetToolTip(this.cbZeroes, "Add leading zeroes: 0x01 / 0x1"); this.cbZeroes.UseVisualStyleBackColor = true; // // cbHeader @@ -150,6 +153,7 @@ this.cbHeader.Size = new System.Drawing.Size(86, 17); this.cbHeader.TabIndex = 1; this.cbHeader.Text = "Meta header"; + this.toolTip1.SetToolTip(this.cbHeader, "Add meta header with meta data"); this.cbHeader.UseVisualStyleBackColor = true; this.cbHeader.CheckedChanged += new System.EventHandler(this.cbFormat_SelectedIndexChanged); // @@ -163,6 +167,7 @@ this.cbComments.Size = new System.Drawing.Size(75, 17); this.cbComments.TabIndex = 0; this.cbComments.Text = "Comments"; + this.toolTip1.SetToolTip(this.cbComments, "Add descriptive comments"); this.cbComments.UseVisualStyleBackColor = true; // // gbNumbers @@ -309,6 +314,12 @@ this.btnClose.Text = "Close"; this.btnClose.UseVisualStyleBackColor = true; // + // toolTip1 + // + this.toolTip1.AutoPopDelay = 10000; + this.toolTip1.InitialDelay = 500; + this.toolTip1.ReshowDelay = 100; + // // Export // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -362,5 +373,6 @@ private System.Windows.Forms.Button btnGenerate; private System.Windows.Forms.Button btnClose; private System.Windows.Forms.CheckBox cbZeroes; + private System.Windows.Forms.ToolTip toolTip1; } } \ No newline at end of file diff --git a/McBitFont/Export.resx b/McBitFont/Export.resx index 1af7de1..d54ad1e 100644 --- a/McBitFont/Export.resx +++ b/McBitFont/Export.resx @@ -117,4 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + + + 17, 17 + \ No newline at end of file diff --git a/McBitFont/Form1.Designer.cs b/McBitFont/Form1.Designer.cs index e97f839..2ec8806 100644 --- a/McBitFont/Form1.Designer.cs +++ b/McBitFont/Form1.Designer.cs @@ -75,6 +75,7 @@ this.dlgSave = new System.Windows.Forms.SaveFileDialog(); this.dlgOpen = new System.Windows.Forms.OpenFileDialog(); this.btnBaseline = new System.Windows.Forms.Button(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); ((System.ComponentModel.ISupportInitialize)(this.nudX)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudY)).BeginInit(); this.panel1.SuspendLayout(); @@ -109,6 +110,7 @@ this.nudX.Name = "nudX"; this.nudX.Size = new System.Drawing.Size(55, 20); this.nudX.TabIndex = 1; + this.toolTip1.SetToolTip(this.nudX, "Symbol width"); this.nudX.Value = new decimal(new int[] { 32, 0, @@ -133,6 +135,7 @@ this.nudY.Name = "nudY"; this.nudY.Size = new System.Drawing.Size(55, 20); this.nudY.TabIndex = 2; + this.toolTip1.SetToolTip(this.nudY, "Symbol height"); this.nudY.Value = new decimal(new int[] { 32, 0, @@ -193,6 +196,7 @@ this.cbZoom.Size = new System.Drawing.Size(59, 21); this.cbZoom.TabIndex = 6; this.cbZoom.TabStop = false; + this.toolTip1.SetToolTip(this.cbZoom, "Canvas zoom level"); this.cbZoom.SelectedIndexChanged += new System.EventHandler(this.cbZoom_SelectedIndexChanged); // // label4 @@ -229,6 +233,7 @@ this.btnMirrorY.Size = new System.Drawing.Size(30, 30); this.btnMirrorY.TabIndex = 6; this.btnMirrorY.Text = "⩥"; + this.toolTip1.SetToolTip(this.btnMirrorY, "Mirror by Y axis (vertical)"); this.btnMirrorY.UseVisualStyleBackColor = true; this.btnMirrorY.Click += new System.EventHandler(this.btnMirrorY_Click); // @@ -240,6 +245,7 @@ this.btnMirrorX.Size = new System.Drawing.Size(30, 30); this.btnMirrorX.TabIndex = 5; this.btnMirrorX.Text = "◮"; + this.toolTip1.SetToolTip(this.btnMirrorX, "Mirror by X axis (horizontal)"); this.btnMirrorX.UseVisualStyleBackColor = true; this.btnMirrorX.Click += new System.EventHandler(this.btnMirrorX_Click); // @@ -251,6 +257,7 @@ this.btnInvert.Size = new System.Drawing.Size(30, 30); this.btnInvert.TabIndex = 4; this.btnInvert.Text = "◪"; + this.toolTip1.SetToolTip(this.btnInvert, "Invert pixel colors"); this.btnInvert.UseVisualStyleBackColor = true; this.btnInvert.Click += new System.EventHandler(this.btnInvert_Click); // @@ -262,6 +269,7 @@ this.btnShiftDown.Size = new System.Drawing.Size(30, 30); this.btnShiftDown.TabIndex = 3; this.btnShiftDown.Text = "▼"; + this.toolTip1.SetToolTip(this.btnShiftDown, "Shift pixels down"); this.btnShiftDown.UseVisualStyleBackColor = true; this.btnShiftDown.Click += new System.EventHandler(this.btnShiftDown_Click); // @@ -273,6 +281,7 @@ this.btnShiftUp.Size = new System.Drawing.Size(30, 30); this.btnShiftUp.TabIndex = 2; this.btnShiftUp.Text = "▲"; + this.toolTip1.SetToolTip(this.btnShiftUp, "Shift pixels up"); this.btnShiftUp.UseVisualStyleBackColor = true; this.btnShiftUp.Click += new System.EventHandler(this.btnShiftUp_Click); // @@ -284,6 +293,7 @@ this.btnShiftRight.Size = new System.Drawing.Size(30, 30); this.btnShiftRight.TabIndex = 1; this.btnShiftRight.Text = "▶"; + this.toolTip1.SetToolTip(this.btnShiftRight, "Shift pixels right"); this.btnShiftRight.UseVisualStyleBackColor = true; this.btnShiftRight.Click += new System.EventHandler(this.btnShiftRight_Click); // @@ -295,6 +305,7 @@ this.btnShiftLeft.Size = new System.Drawing.Size(30, 30); this.btnShiftLeft.TabIndex = 0; this.btnShiftLeft.Text = "◀"; + this.toolTip1.SetToolTip(this.btnShiftLeft, "Shift pixels left"); this.btnShiftLeft.UseVisualStyleBackColor = true; this.btnShiftLeft.Click += new System.EventHandler(this.btnShiftLeft_Click); // @@ -306,6 +317,7 @@ this.btnExport.Size = new System.Drawing.Size(75, 23); this.btnExport.TabIndex = 10; this.btnExport.Text = "Export"; + this.toolTip1.SetToolTip(this.btnExport, "Configure and export data"); this.btnExport.UseVisualStyleBackColor = true; this.btnExport.Click += new System.EventHandler(this.button1_Click); // @@ -345,6 +357,7 @@ this.btnApply.Size = new System.Drawing.Size(75, 23); this.btnApply.TabIndex = 13; this.btnApply.Text = "Apply"; + this.toolTip1.SetToolTip(this.btnApply, "Apply changes made to the symbol"); this.btnApply.UseVisualStyleBackColor = true; this.btnApply.Click += new System.EventHandler(this.button2_Click); // @@ -653,9 +666,16 @@ this.btnBaseline.Size = new System.Drawing.Size(75, 23); this.btnBaseline.TabIndex = 18; this.btnBaseline.Text = "Baseline"; + this.toolTip1.SetToolTip(this.btnBaseline, "Set irtual base line for the font"); this.btnBaseline.UseVisualStyleBackColor = true; this.btnBaseline.Click += new System.EventHandler(this.btnBaseline_Click); // + // toolTip1 + // + this.toolTip1.AutoPopDelay = 10000; + this.toolTip1.InitialDelay = 500; + this.toolTip1.ReshowDelay = 100; + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -748,6 +768,7 @@ private System.Windows.Forms.ToolStripMenuItem pasteToolStripMenuItem; private System.Windows.Forms.Button btnBaseline; private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; + private System.Windows.Forms.ToolTip toolTip1; } } diff --git a/McBitFont/Form1.resx b/McBitFont/Form1.resx index 4266cbc..840ae1f 100644 --- a/McBitFont/Form1.resx +++ b/McBitFont/Form1.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 436, 17 + 17, 17 From 68bce8e14e43d6175d1437aea4caef8dce37bd24 Mon Sep 17 00:00:00 2001 From: Anton Mukhin Date: Sun, 18 May 2025 01:30:32 +0300 Subject: [PATCH 07/10] TODO feature: Button to Clear/Fill a block --- McBitFont/Form1.Designer.cs | 15 +++++++++++++++ McBitFont/Form1.cs | 6 ++++++ TODO.txt | 6 +++--- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/McBitFont/Form1.Designer.cs b/McBitFont/Form1.Designer.cs index 2ec8806..43838bf 100644 --- a/McBitFont/Form1.Designer.cs +++ b/McBitFont/Form1.Designer.cs @@ -76,6 +76,7 @@ this.dlgOpen = new System.Windows.Forms.OpenFileDialog(); this.btnBaseline = new System.Windows.Forms.Button(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.btnClear = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.nudX)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudY)).BeginInit(); this.panel1.SuspendLayout(); @@ -213,6 +214,7 @@ // this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.btnClear); this.panel1.Controls.Add(this.btnMirrorY); this.panel1.Controls.Add(this.btnMirrorX); this.panel1.Controls.Add(this.btnInvert); @@ -676,6 +678,18 @@ this.toolTip1.InitialDelay = 500; this.toolTip1.ReshowDelay = 100; // + // btnClear + // + this.btnClear.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.btnClear.Location = new System.Drawing.Point(7, 8); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(30, 30); + this.btnClear.TabIndex = 7; + this.btnClear.Text = "○"; + this.toolTip1.SetToolTip(this.btnClear, "Clear canvas"); + this.btnClear.UseVisualStyleBackColor = true; + this.btnClear.Click += new System.EventHandler(this.btnClear_Click); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -769,6 +783,7 @@ private System.Windows.Forms.Button btnBaseline; private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.Button btnClear; } } diff --git a/McBitFont/Form1.cs b/McBitFont/Form1.cs index f6e3901..3c2b151 100644 --- a/McBitFont/Form1.cs +++ b/McBitFont/Form1.cs @@ -816,6 +816,12 @@ namespace McBitFont { } + private void btnClear_Click(object sender, EventArgs e) { + Array.Clear(f.data, 0, f.data.Length); + modified = true; + dotPanel.Refresh(); + } + private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { if (prjModified) { if (MessageBox.Show("The project is modified.\nAre you sure you want to quit?", "Are you sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { diff --git a/TODO.txt b/TODO.txt index 8c64334..4c0d3db 100644 --- a/TODO.txt +++ b/TODO.txt @@ -9,8 +9,8 @@ Functionality: V "Only numbers" range in the New dialog V "Specify range" in the New dialog V "Single frame", "only numbers" and "specify range" as radio buttons -- Ability to make monospaced font variable width one -- Button to Clear/Fill a block +- Ability to make monospaced font a variable width one +V Button to Clear/Fill a block - Undo/Redo - Image import from a file - Import from a text array @@ -19,7 +19,7 @@ V Copy-paste to a symbol with different size - Change height of variable width fonts with ability to choose which side to add pixels to V Make it possible to have zero width chars in VarWidth fonts - "Packed" fonts export -- Tooltips on main form +V Tooltips on main form Bugs: V Every char changes its width to default on VarWidth font height change! From 5164060ffc070c0777bd898d253b13c055f9c381 Mon Sep 17 00:00:00 2001 From: Anton Mukhin Date: Sun, 18 May 2025 01:36:47 +0300 Subject: [PATCH 08/10] Menu for Clear canvas Tool --- McBitFont/Form1.Designer.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/McBitFont/Form1.Designer.cs b/McBitFont/Form1.Designer.cs index 43838bf..14b8cfa 100644 --- a/McBitFont/Form1.Designer.cs +++ b/McBitFont/Form1.Designer.cs @@ -77,6 +77,7 @@ this.btnBaseline = new System.Windows.Forms.Button(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.btnClear = new System.Windows.Forms.Button(); + this.ClearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.nudX)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudY)).BeginInit(); this.panel1.SuspendLayout(); @@ -552,6 +553,7 @@ // toolsToolStripMenuItem // this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ClearToolStripMenuItem, this.shiftUpToolStripMenuItem, this.shiftDownToolStripMenuItem, this.shiftLeftToolStripMenuItem, @@ -690,6 +692,15 @@ this.btnClear.UseVisualStyleBackColor = true; this.btnClear.Click += new System.EventHandler(this.btnClear_Click); // + // ClearToolStripMenuItem + // + this.ClearToolStripMenuItem.Name = "ClearToolStripMenuItem"; + this.ClearToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+W"; + this.ClearToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W))); + this.ClearToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.ClearToolStripMenuItem.Text = "Clear canvas"; + this.ClearToolStripMenuItem.Click += new System.EventHandler(this.btnClear_Click); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -784,6 +795,7 @@ private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.Button btnClear; + private System.Windows.Forms.ToolStripMenuItem ClearToolStripMenuItem; } } From f2b01d4a276dc02c03cf91dce8bea90c10f67bff Mon Sep 17 00:00:00 2001 From: Anton Mukhin Date: Sun, 18 May 2025 03:15:10 +0300 Subject: [PATCH 09/10] TODO feature: Change height of variable width fonts with ability to choose which side to add pixels to --- McBitFont/Form1.Designer.cs | 44 ++++++++++++++++++++++++++++++------- McBitFont/Form1.cs | 32 +++++++++------------------ TODO.txt | 2 +- 3 files changed, 47 insertions(+), 31 deletions(-) diff --git a/McBitFont/Form1.Designer.cs b/McBitFont/Form1.Designer.cs index 14b8cfa..44226b7 100644 --- a/McBitFont/Form1.Designer.cs +++ b/McBitFont/Form1.Designer.cs @@ -78,6 +78,8 @@ this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.btnClear = new System.Windows.Forms.Button(); this.ClearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.chkLeftSide = new System.Windows.Forms.CheckBox(); + this.chkTopSide = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.nudX)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudY)).BeginInit(); this.panel1.SuspendLayout(); @@ -103,14 +105,14 @@ // nudX // this.nudX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.nudX.Location = new System.Drawing.Point(717, 27); + this.nudX.Location = new System.Drawing.Point(666, 27); this.nudX.Maximum = new decimal(new int[] { 255, 0, 0, 0}); this.nudX.Name = "nudX"; - this.nudX.Size = new System.Drawing.Size(55, 20); + this.nudX.Size = new System.Drawing.Size(40, 20); this.nudX.TabIndex = 1; this.toolTip1.SetToolTip(this.nudX, "Symbol width"); this.nudX.Value = new decimal(new int[] { @@ -123,7 +125,7 @@ // nudY // this.nudY.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.nudY.Location = new System.Drawing.Point(717, 49); + this.nudY.Location = new System.Drawing.Point(666, 49); this.nudY.Maximum = new decimal(new int[] { 255, 0, @@ -135,7 +137,7 @@ 0, 0}); this.nudY.Name = "nudY"; - this.nudY.Size = new System.Drawing.Size(55, 20); + this.nudY.Size = new System.Drawing.Size(40, 20); this.nudY.TabIndex = 2; this.toolTip1.SetToolTip(this.nudY, "Symbol height"); this.nudY.Value = new decimal(new int[] { @@ -149,7 +151,7 @@ // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(673, 29); + this.label1.Location = new System.Drawing.Point(622, 29); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(38, 13); this.label1.TabIndex = 3; @@ -159,7 +161,7 @@ // this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(670, 51); + this.label2.Location = new System.Drawing.Point(619, 51); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(41, 13); this.label2.TabIndex = 4; @@ -193,7 +195,7 @@ "40", "45", "50"}); - this.cbZoom.Location = new System.Drawing.Point(605, 45); + this.cbZoom.Location = new System.Drawing.Point(554, 45); this.cbZoom.Name = "cbZoom"; this.cbZoom.Size = new System.Drawing.Size(59, 21); this.cbZoom.TabIndex = 6; @@ -205,7 +207,7 @@ // this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(604, 29); + this.label4.Location = new System.Drawing.Point(553, 29); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(62, 13); this.label4.TabIndex = 7; @@ -701,11 +703,35 @@ this.ClearToolStripMenuItem.Text = "Clear canvas"; this.ClearToolStripMenuItem.Click += new System.EventHandler(this.btnClear_Click); // + // chkLeftSide + // + this.chkLeftSide.AutoSize = true; + this.chkLeftSide.Location = new System.Drawing.Point(712, 29); + this.chkLeftSide.Name = "chkLeftSide"; + this.chkLeftSide.Size = new System.Drawing.Size(66, 17); + this.chkLeftSide.TabIndex = 19; + this.chkLeftSide.Text = "Left side"; + this.toolTip1.SetToolTip(this.chkLeftSide, "Width changes will be made on Left/Right side"); + this.chkLeftSide.UseVisualStyleBackColor = true; + // + // chkTopSide + // + this.chkTopSide.AutoSize = true; + this.chkTopSide.Location = new System.Drawing.Point(712, 50); + this.chkTopSide.Name = "chkTopSide"; + this.chkTopSide.Size = new System.Drawing.Size(67, 17); + this.chkTopSide.TabIndex = 20; + this.chkTopSide.Text = "Top side"; + this.toolTip1.SetToolTip(this.chkTopSide, "Height changes will be made on Top/Bottom side"); + this.chkTopSide.UseVisualStyleBackColor = true; + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(784, 561); + this.Controls.Add(this.chkTopSide); + this.Controls.Add(this.chkLeftSide); this.Controls.Add(this.btnBaseline); this.Controls.Add(this.btnApply); this.Controls.Add(this.btnExport); @@ -796,6 +822,8 @@ private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.Button btnClear; private System.Windows.Forms.ToolStripMenuItem ClearToolStripMenuItem; + private System.Windows.Forms.CheckBox chkLeftSide; + private System.Windows.Forms.CheckBox chkTopSide; } } diff --git a/McBitFont/Form1.cs b/McBitFont/Form1.cs index 3c2b151..d03f549 100644 --- a/McBitFont/Form1.cs +++ b/McBitFont/Form1.cs @@ -177,20 +177,24 @@ namespace McBitFont { private FrameMiniature frameResize(FrameMiniature ff, int neww, int newh) { int oldw = ff.width; int oldh = ff.height; + int di = 0, dj = 0; int imax, jmax; bool[,] t; - if (neww < oldw) imax = neww; - else imax = oldw; - if (newh < oldh) jmax = newh; - else jmax = oldh; + if (chkLeftSide.Checked) di = oldw - neww; + if (chkTopSide.Checked) dj = oldh - newh; + + imax = (neww < oldw) ? neww : oldw; + jmax = (newh < oldh) ? newh : oldh; + if (neww > oldw) imax -= di; + if (newh > oldh) jmax -= dj; ff.width = neww; ff.height = newh; t = new bool[neww, newh]; for (int i=0; i= 0 && j+dj >= 0) t[i, j] = ff.data[i + di, j + dj]; } } ff.data = t; @@ -199,23 +203,7 @@ namespace McBitFont { } private void dotResize(int ww, int hh) { - int imax, jmax; - bool[,] t; - - if (ww < dotWidth) imax = ww; - else imax = dotWidth; - if (hh < dotHeight) jmax = hh; - else jmax = dotHeight; - - f.width = ww; - f.height = hh; - t = new bool[ww, hh]; - for (int i=0; i Date: Tue, 20 May 2025 04:45:45 +0300 Subject: [PATCH 10/10] v 1.7 dev release Application: V Implement "Save" menu V Implement new saved font file format Functionality: V "Only numbers" range in the New dialog V "Specify range" in the New dialog V "Single frame", "only numbers" and "specify range" as radio buttons V Button to Clear/Fill a block V Copy-paste to a symbol with different size V Change height of variable width fonts with ability to choose which side to add pixels to V Make it possible to have zero width chars in VarWidth fonts V Tooltips on main form Bugs: V Every char changes its width to default on VarWidth font height change! V App allows to create fonts with a gap in symbol cequence! V File -> New does not check for unsaveed changes! --- McBitFont/App.config | 10 ++- McBitFont/Form1.Designer.cs | 69 +++++++++++++------- McBitFont/Form1.cs | 98 +++++++++++++++++++++++++--- McBitFont/Form1.resx | 3 + McBitFont/McBitFont.csproj | 41 ++++++++++++ McBitFont/Properties/AssemblyInfo.cs | 4 +- McBitFont/packages.config | 14 ++++ TODO.txt | 3 +- 8 files changed, 206 insertions(+), 36 deletions(-) create mode 100644 McBitFont/packages.config diff --git a/McBitFont/App.config b/McBitFont/App.config index 56efbc7..7d84477 100644 --- a/McBitFont/App.config +++ b/McBitFont/App.config @@ -1,6 +1,14 @@ - + + + + + + + + + \ No newline at end of file diff --git a/McBitFont/Form1.Designer.cs b/McBitFont/Form1.Designer.cs index 44226b7..9a10dc0 100644 --- a/McBitFont/Form1.Designer.cs +++ b/McBitFont/Form1.Designer.cs @@ -34,6 +34,7 @@ this.cbZoom = new System.Windows.Forms.ComboBox(); this.label4 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); + this.btnClear = new System.Windows.Forms.Button(); this.btnMirrorY = new System.Windows.Forms.Button(); this.btnMirrorX = new System.Windows.Forms.Button(); this.btnInvert = new System.Windows.Forms.Button(); @@ -52,6 +53,7 @@ this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveDEVToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -63,6 +65,7 @@ this.removeSymbolToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.applyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ClearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.shiftUpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.shiftDownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.shiftLeftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -76,10 +79,9 @@ this.dlgOpen = new System.Windows.Forms.OpenFileDialog(); this.btnBaseline = new System.Windows.Forms.Button(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.btnClear = new System.Windows.Forms.Button(); - this.ClearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.chkLeftSide = new System.Windows.Forms.CheckBox(); this.chkTopSide = new System.Windows.Forms.CheckBox(); + this.openDEVToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); ((System.ComponentModel.ISupportInitialize)(this.nudX)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudY)).BeginInit(); this.panel1.SuspendLayout(); @@ -230,6 +232,18 @@ this.panel1.Size = new System.Drawing.Size(120, 121); this.panel1.TabIndex = 9; // + // btnClear + // + this.btnClear.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.btnClear.Location = new System.Drawing.Point(7, 8); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(30, 30); + this.btnClear.TabIndex = 7; + this.btnClear.Text = "○"; + this.toolTip1.SetToolTip(this.btnClear, "Clear canvas"); + this.btnClear.UseVisualStyleBackColor = true; + this.btnClear.Click += new System.EventHandler(this.btnClear_Click); + // // btnMirrorY // this.btnMirrorY.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); @@ -416,6 +430,8 @@ this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.newToolStripMenuItem, this.openToolStripMenuItem, + this.openDEVToolStripMenuItem, + this.saveDEVToolStripMenuItem, this.saveToolStripMenuItem, this.saveAsToolStripMenuItem, this.exitToolStripMenuItem}); @@ -443,6 +459,13 @@ this.openToolStripMenuItem.Text = "Open"; this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); // + // saveDEVToolStripMenuItem + // + this.saveDEVToolStripMenuItem.Name = "saveDEVToolStripMenuItem"; + this.saveDEVToolStripMenuItem.Size = new System.Drawing.Size(184, 22); + this.saveDEVToolStripMenuItem.Text = "Save as (new format)"; + this.saveDEVToolStripMenuItem.Click += new System.EventHandler(this.saveJSONToolStripMenuItem_Click); + // // saveToolStripMenuItem // this.saveToolStripMenuItem.Image = global::McBitFont.Properties.Resources.Famfamfam_Silk_Disk_16; @@ -568,6 +591,15 @@ this.toolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20); this.toolsToolStripMenuItem.Text = "Tools"; // + // ClearToolStripMenuItem + // + this.ClearToolStripMenuItem.Name = "ClearToolStripMenuItem"; + this.ClearToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+W"; + this.ClearToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W))); + this.ClearToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.ClearToolStripMenuItem.Text = "Clear canvas"; + this.ClearToolStripMenuItem.Click += new System.EventHandler(this.btnClear_Click); + // // shiftUpToolStripMenuItem // this.shiftUpToolStripMenuItem.Image = global::McBitFont.Properties.Resources.arrow_top; @@ -657,7 +689,7 @@ // dlgSave // this.dlgSave.DefaultExt = "mbf"; - this.dlgSave.Filter = "McBitFont files|*.mbf|All files|*.*"; + this.dlgSave.Filter = "McBitFont files|*.mbf|McBitFont new format|*.mbfont|All files|*.*"; // // dlgOpen // @@ -682,27 +714,6 @@ this.toolTip1.InitialDelay = 500; this.toolTip1.ReshowDelay = 100; // - // btnClear - // - this.btnClear.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.btnClear.Location = new System.Drawing.Point(7, 8); - this.btnClear.Name = "btnClear"; - this.btnClear.Size = new System.Drawing.Size(30, 30); - this.btnClear.TabIndex = 7; - this.btnClear.Text = "○"; - this.toolTip1.SetToolTip(this.btnClear, "Clear canvas"); - this.btnClear.UseVisualStyleBackColor = true; - this.btnClear.Click += new System.EventHandler(this.btnClear_Click); - // - // ClearToolStripMenuItem - // - this.ClearToolStripMenuItem.Name = "ClearToolStripMenuItem"; - this.ClearToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+W"; - this.ClearToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W))); - this.ClearToolStripMenuItem.Size = new System.Drawing.Size(197, 22); - this.ClearToolStripMenuItem.Text = "Clear canvas"; - this.ClearToolStripMenuItem.Click += new System.EventHandler(this.btnClear_Click); - // // chkLeftSide // this.chkLeftSide.AutoSize = true; @@ -725,6 +736,14 @@ this.toolTip1.SetToolTip(this.chkTopSide, "Height changes will be made on Top/Bottom side"); this.chkTopSide.UseVisualStyleBackColor = true; // + // openDEVToolStripMenuItem + // + this.openDEVToolStripMenuItem.Name = "openDEVToolStripMenuItem"; + this.openDEVToolStripMenuItem.Size = new System.Drawing.Size(184, 22); + this.openDEVToolStripMenuItem.Text = "Open DEV"; + this.openDEVToolStripMenuItem.Visible = false; + this.openDEVToolStripMenuItem.Click += new System.EventHandler(this.openDEVToolStripMenuItem_Click); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -824,6 +843,8 @@ private System.Windows.Forms.ToolStripMenuItem ClearToolStripMenuItem; private System.Windows.Forms.CheckBox chkLeftSide; private System.Windows.Forms.CheckBox chkTopSide; + private System.Windows.Forms.ToolStripMenuItem saveDEVToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem openDEVToolStripMenuItem; } } diff --git a/McBitFont/Form1.cs b/McBitFont/Form1.cs index d03f549..4bc2635 100644 --- a/McBitFont/Form1.cs +++ b/McBitFont/Form1.cs @@ -1,25 +1,29 @@ -using System; +using MessagePack; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; +using System.Diagnostics; using System.Drawing; +using System.Drawing.Drawing2D; +using System.IO; using System.Linq; using System.Reflection; +using System.Runtime.InteropServices; +using System.Runtime.InteropServices.ComTypes; +using System.Runtime.Serialization.Formatters.Binary; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Windows.Forms.VisualStyles; -using System.Runtime.InteropServices; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; -using System.Runtime.InteropServices.ComTypes; -using System.Diagnostics; -using System.Drawing.Drawing2D; + namespace McBitFont { public partial class MainForm : Form { + [Serializable] + [MessagePackObject] public struct FrameMiniature { public FrameMiniature(int cc, int ww, int hh) { code = cc; @@ -27,17 +31,26 @@ namespace McBitFont { height = hh; data = new bool[ww, hh]; } + [Key(0)] public int code; + [Key(1)] public int width; + [Key(2)] public int height; + [Key(3)] public bool[,] data; }; [Serializable] + [MessagePackObject] public struct SaveBlock { + [Key(4)] public bool monospaced; + [Key(5)] public int codepage; + [Key(6)] public int baseline; + [Key(7)] public List frames; } @@ -51,7 +64,7 @@ namespace McBitFont { public bool monospaced = false; bool modified = false; bool prjModified = false; - public const string version = "1.6"; + public const string version = "1.7"; public string prjName = "Untitled"; public string prjFileName = ""; public int codepage = 1251; @@ -810,6 +823,75 @@ namespace McBitFont { dotPanel.Refresh(); } + private void saveJSONToolStripMenuItem_Click(object sender, EventArgs e) { + checkModifiedFrame(); + if (dlgSave.ShowDialog() == DialogResult.OK) { + SaveBlock sav; + sav.monospaced = monospaced; + sav.frames = frames; + sav.codepage = codepage; + sav.baseline = baseline; + using (Stream ms = File.OpenWrite(dlgSave.FileName)) { + // TODO: Serializer here + MessagePackSerializer.Serialize(ms, sav); + ms.Close(); + } + prjModified = false; + prjName = Path.GetFileNameWithoutExtension(dlgSave.FileName); + prjFileName = dlgSave.FileName; + this.Text = "McBitFont " + version + " - " + prjName; + } + } + + private void openDEVToolStripMenuItem_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) { + saveAsToolStripMenuItem.PerformClick(); + return; + } + } + if (dlgOpen.ShowDialog() == DialogResult.OK) { + SaveBlock sav; + + var filename = dlgOpen.FileName; + using (FileStream fs = File.Open(filename, FileMode.Open)) { + sav = MessagePackSerializer.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; + + prjFileName = filename; + prjName = Path.GetFileNameWithoutExtension(filename); + this.Text = "McBitFont " + version + " - " + prjName; + checkForAdd(); + fbuffer = false; + } + } + private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { if (prjModified) { if (MessageBox.Show("The project is modified.\nAre you sure you want to quit?", "Are you sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { diff --git a/McBitFont/Form1.resx b/McBitFont/Form1.resx index 840ae1f..398ee74 100644 --- a/McBitFont/Form1.resx +++ b/McBitFont/Form1.resx @@ -132,6 +132,9 @@ 336, 17 + + 436, 17 + diff --git a/McBitFont/McBitFont.csproj b/McBitFont/McBitFont.csproj index bd0e30d..8d5ff44 100644 --- a/McBitFont/McBitFont.csproj +++ b/McBitFont/McBitFont.csproj @@ -27,6 +27,8 @@ false false true + + AnyCPU @@ -51,8 +53,39 @@ icon_64.ico + + ..\packages\MessagePack.3.1.3\lib\net472\MessagePack.dll + + + ..\packages\MessagePack.Annotations.3.1.3\lib\netstandard2.0\MessagePack.Annotations.dll + + + ..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll + + + ..\packages\Microsoft.NET.StringTools.17.11.4\lib\net472\Microsoft.NET.StringTools.dll + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll + + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + @@ -112,6 +145,7 @@ Resources.resx True + SettingsSingleFileGenerator Settings.Designer.cs @@ -205,4 +239,11 @@ + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + \ No newline at end of file diff --git a/McBitFont/Properties/AssemblyInfo.cs b/McBitFont/Properties/AssemblyInfo.cs index 1c9ea79..cb38638 100644 --- a/McBitFont/Properties/AssemblyInfo.cs +++ b/McBitFont/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // Можно задать все значения или принять номера сборки и редакции по умолчанию // используя "*", как показано ниже: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.6.0.0")] -[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyVersion("1.7.0.0")] +[assembly: AssemblyFileVersion("1.7.0.0")] diff --git a/McBitFont/packages.config b/McBitFont/packages.config new file mode 100644 index 0000000..bb9683a --- /dev/null +++ b/McBitFont/packages.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TODO.txt b/TODO.txt index 383408f..ba8f222 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,5 +1,6 @@ Application: -v Implement "Save" menu +V Implement "Save" menu +V Implement new saved font file format Functionality: - Context menu in symbol navigator