hagronnestad / nextion-font-editor

🔠📄 Extensive Nextion .zi font format documentation, file parser, font generator and simple font editor.
59 stars 18 forks source link

No Save Button #17

Closed Ikswoknib closed 4 years ago

Ikswoknib commented 4 years ago

I tried the Alpha 1.0.0.1 Stable Version but there is no Save Button....

I also tried the Master Branch Version, looks good, I am able to save, but there I have the Problem that if I want to open a font to edit it, I only get the following Error Message:

Informationen über das Aufrufen von JIT-Debuggen
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.

************** Ausnahmetext **************
System.InvalidOperationException: Die Sequenz enthält keine Elemente.
   bei System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   bei NextionFontEditor.FormFontEditor.UpdateCharacter() in C:\projects\nextion-font-editor\NextionFontEditor\NextionFontEditor\FormFontEditor.cs:Zeile 55.
   bei NextionFontEditor.FormFontEditor.numChar_ValueChanged(Object sender, EventArgs e) in C:\projects\nextion-font-editor\NextionFontEditor\NextionFontEditor\FormFontEditor.cs:Zeile 67.
   bei System.Windows.Forms.NumericUpDown.OnValueChanged(EventArgs e)
   bei System.Windows.Forms.NumericUpDown.set_Value(Decimal value)
   bei NextionFontEditor.FormFontEditor.UpdateCharacter() in C:\projects\nextion-font-editor\NextionFontEditor\NextionFontEditor\FormFontEditor.cs:Zeile 46.
   bei NextionFontEditor.FormFontEditor.numChar_ValueChanged(Object sender, EventArgs e) in C:\projects\nextion-font-editor\NextionFontEditor\NextionFontEditor\FormFontEditor.cs:Zeile 67.
   bei System.Windows.Forms.NumericUpDown.OnValueChanged(EventArgs e)
   bei System.Windows.Forms.NumericUpDown.set_Value(Decimal value)
   bei NextionFontEditor.FormFontEditor.btnOpenFont_Click(Object sender, EventArgs e) in C:\projects\nextion-font-editor\NextionFontEditor\NextionFontEditor\FormFontEditor.cs:Zeile 85.
   bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   bei System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Geladene Assemblys **************
mscorlib
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.7.3416.0 built by: NET472REL1LAST_B.
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll.
----------------------------------------
NextionFontEditor
    Assembly-Version: 1.0.0.0.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///D:/Downloads/NextionFontEditro/NextionFontEditor.exe.
----------------------------------------
System.Windows.Forms
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.7.3324.0 built by: NET472REL1LAST_C.
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.7.3416.0 built by: NET472REL1LAST_B.
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
System.Drawing
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.7.3056.0 built by: NET472REL1.
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
System.Configuration
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.7.3056.0 built by: NET472REL1.
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
----------------------------------------
System.Core
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.7.3362.0 built by: NET472REL1LAST_C.
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll.
----------------------------------------
System.Xml
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.7.3056.0 built by: NET472REL1.
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
ZiLib
    Assembly-Version: 1.0.0.0.
    Win32-Version: 1.0.0.0.
    CodeBase: file:///D:/Downloads/NextionFontEditro/ZiLib.DLL.
----------------------------------------
System.Core.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.7.3056.0 built by: NET472REL1.
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Core.resources.dll.
----------------------------------------
System.Windows.Forms.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.7.3056.0 built by: NET472REL1.
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------
mscorlib.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.7.3056.0 built by: NET472REL1.
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll.
----------------------------------------

************** JIT-Debuggen **************
Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
Konfigurationsdatei der Anwendung oder des Computers
(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.

Zum Beispiel:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
Ausnahmen an den JIT-Debugger gesendet, der auf dem
Computer registriert ist, und nicht in diesem Dialogfeld behandelt.

Otherwise it looks quite good. I am able to create a font in the Master Branch and i am able to edit a font in the Alpha Version. But there i can't save.....

hagronnestad commented 4 years ago

Maybe @fvanroie can chime in here, I have to admit that I've lost track over what's implemented and not. 🙈

fvanroie commented 4 years ago

Alpha 1.0.0.1 is the old version, which only supports V3 fonts. There should be a Save button in any case, so I'm not sure which screen you are referring to. Could you post a screenshot?

The master branch added support for V5/V6 fonts, but I've noticed that it crashes when trying to open a V3 font in the Font Editor. I believe you are opening a V3 font, which currently will cause an exception in the application.

I'll look into adding V3 support for backwards compatibility to the Font Editor as that was an oversight on my part.

Ikswoknib commented 4 years ago

I created a font with the master branch and than tried to open it for editing in the master branch. Than it crashed. I can load the font in the actual nextion editor and it looks okay. So it must be an v5 font i think. But i must edit it because some chars look bad...

fvanroie commented 4 years ago

Creating a font in the application is still V3 in the current master version, the Font Generator part hasn't been updated to V5 yet. However, the Font Editor can only edit V5 fonts due to that bug... It's a bit confusing, I know.

So, if you create a V5 font in Nextion v0.55+ you can then open it in the Font Editor and edit it. Meanwhile I've been working on a fix for that error when opening a V3 font.

Ikswoknib commented 4 years ago

Hmm, okay, my problem is that i would like to make an 12 point font. But in Nextion i only can chosse 16 at least. So any idea how i could do that at the moment ?

fvanroie commented 4 years ago

You could start with a 12pt V5 font from the HMI Font Pack. Then open that in the Font Editor, use the 'add character' dialog to change the font to another fonttype. You can then edit the characters in detail there.

Ikswoknib commented 4 years ago

Thanks, with the Font Packs i was able to get it to work as i want. But there seems to be some problems with the fonts ? If i load a font in the Nextion Editor i only got an error message. I had to delete some chars in the font with the editor. Some of the chars were not shown correctly in the editor, so them i deleted and it worked. So thanks a lot.

fvanroie commented 4 years ago

You're welcome. Glad to hear you could achieve your goal. I think this issue can be closed. I'll post some code updates later.

fvanroie commented 4 years ago

Meanwhile I've been working on a fix for that error when opening a V3 font.

This has been implemented in PR #18.

hagronnestad commented 4 years ago

Thank you @fvanroie, closing this issue. 👍