Open source Nextion ZI-font tools and ZI-specification

Hi!

I just wanted to share my open source Nextion Font Editor project. The project includes a font generator, editor and previewer. It’s currently not as feature rich as some of the other third party font editors on the forum, but I’m actively developing the tools. As far as I know this is also the only open source ZI-font editor available.

4 Likes

OUTSTANDING WORK! This is exactly the sort of careful analysis that helps the community better use these devices. Great documentation, great presentation, and awesome code to accompany it all. Thanks @hag!

1 Like

This is Fantastic Thnx for that

1 Like

Wow, works real well.
Nice test feature !
Suggestion to easily fix errors :

  • allow copy/paste of whole characters from same/other font
  • Select per char size option so you can mix sizes when there are errors.

It would be nice to port and correct a few of fonts.google.com to .zi and host it on git.

Keep the work, anti-aliasing will be a great addition !
Thanks

1 Like

Hi, I’m new on the forum.
I found this forum when searching for a better fonts for my nextion project, I check this topic and downloadesd the font generator.
Sorry for the dumb question, how can I use the font editor? I can’t find any executable program.
Thanks.

You probably just downloaded the source code. Go to the Release-tab on the GitHub repo to download binaries. If you want the latest version you have to build the source code yourself though.

Thanks for the answer,.

1 Like

Hi,sry for this question but I can´t find any Button or similar thing to generate a new zi Font or save an edited. I can open the Fontgenerator (The big A+), can choose Size, Style and so on but can´t find any option to save this, so I can use this for my Nextion (where evere big W is always a small w).

greatings
Shadow

Are you using the “1.0.0.1-alpha”-version? Because I think that version is missing those features.

Try this build, from the latest commit.
https://ci.appveyor.com/project/hagronnestad/nextion-font-editor/build/artifacts

1 Like

Yes, that´s what was worng. With the other Version it works. Thank you.

p.s. What does it mean if a Letter is shown in a red box instead of a green (Preview Test in generator)? For me this seem to be those letters which are difficulty to draw on the display but I´m not sure.

1 Like

The red boxes highlights the characters that are too wide to fit inside the constraints of the ZI-font. So there are different sizing options to either make them smaller (looks weird in a word), resize the width or make all other characters smaller too so they’re all evenly sized.

That’s the plan anyway, I think some og these features are broken, because I’m still working on it.

2 Likes

Thank you for this contribution hag.

2 Likes

Looks cool, I tried it but gave me some errors. Is there a tutorial on youtube or a guide on how to use it?

Nvm. Got it to work.

A+ is to generator font. and Pen tool is to edit.

-In Editor Open and load a font first. then make changes and save it. Use it in Nextion.
Tested for v0.53. Works great.

Thanks Hag.:raised_hands:

1 Like

I have a script that can convert a otf/ttf into a .zi v5 file. It can take the google repository and batch convert them into HMI fonts. Is there a list of prefered fonts, size, encodings? I can make a repository for compiled HMI fonts if there is interest.

It’s in PowerShell for the moment, but I’m converting it to C# so it can be used in @hag 's font editor.

1 Like

Dozens of Google Fonts in v5 .zi format, for all codepages and various fontsizes.

@Flatpack2 We’re working on v5 support in the Editor. But it’ll takes some time.
If you’re on Discord, you can post the .zi there and I can have a look at doing some quick edits to the file.

1 Like

:point_up_2:
A new version of the HMI Font Pack v0.0.2 has been released on Github. It now includes 2 new UTF-8 fonts and a bug-fix that could crash the Editor when the HMI screen orientationt was rotated.

All .zi files are Version 5 fonts and I’ve also included a .png preview for each font.

1 Like

Awesome :clap:t2: You’re doing so much great work @fvanroie! I’ve made some comments on your PR’s on GitHub btw, I’m not sure if you’ve seen them. If you could take a look at that we could get them merged.

Hi

First of all, thank you for you work.

Its not clear for me is *.zi file spec officialy closed ?

Is it possible to make available just replace pixel picture for every letter from any input file ? ( PNG , for example may be same dimention X * Y )

It will be much better and faster. Cause a lot of good fonts letters images available.

It seems to me that *.zi fonts are not monochrome Font ’ ! ’ symbol in Editor

Thank you!

Font example:
Font1|690x6

It’s a proprietary file format, but V3 and V5/6 have been reverse engineered and the font editor can do basic copy/paste of characters.

Fonts only have 8 shades of gray (3-bit).

Converting to/from bitmap can be done with ZiLib from the font editor, but that will involve programming that part…