Start a new topic

Font top spacing

Working on a Dashboard and like to compact stuff to push as much info as possible on the screen.

No I'm stuck on the "spax" or "top spacing" of the text/number font.

Here I pointed out some white spaces which I can't get rid of...

Hope somebody has some tips/tricks on how to get rid of those "expensive" unusable pixels :)


On all object the "spax" and "spay" parameter is set to 0.

So yes, Someone can  indeed design their own font according to their needs




Thanks for the constructive answer!

Pitty that its not possible to move the text :(


Most of the text/numbers are dynamically altered by Modbus device values through Arduino.

Reading xstr is only printing text and not using containers which make it impossible to change the text.

Wrong thinking - xstr will render the font at exact pixel positioning.

only 11 parameters to work out.

Writing xstr, not reading xstr

Also, your need is special

 - ignore the 33% readability whitespace of a latin based font

 - render differently than the traditional font behaviours.

This is not a standard process

  - so when you have special requirements

  - then you have to make special procedures

As an MCU programmer, in Arduino C++

this could indeed be handled with a "specialized" routine.

- instead of parsing page1.n0.val=19ÿÿÿ

  one can indeed parse xstr 284,227,70,70,6,0,65535,1,1,1,19ÿÿÿ

- instead of calling setValue() with number as parameter

  one can indeed call mySetValue() with the same number as parameter.   

So not that it can not be done

 - several paths lead to Rome

One could also create font subset graphically


And xpic the desired as required, so indeed not that it can not be done

Just modified the Arial Basic Latin and removed all "strange" nodes/signs/etc/etc. also changed the fonts (total) height/units.

Then added the font to the Nextion Editor and applied the font to an Text field;


I still see the white spaces :(

Also thanks for the explanation of "xstr". I didn't understand it and was thinking I could only be used as event code in the editor. I'm not planning to use the xst through MCU(Arduino), this because I was sick of using x/y/w/h coords on "normal" LCD screen. I Just want to write to an object and not want to be bother with were that object is placed on the screen. 

11 parameters :)

Hi Marco,

Tell me how do you modify the font?
What program do you use?
Thank you in advance ,

programming is not "click, copy and paste" ...

programming is also no "workaround" for a beloved missing "feature" ...

programming is an universal way to let things happen as you like ...


programming is indeed something you must do by yourself ...


(42.4 KB)


Edit the ZI Font (*.zi) post generation and not the pregeneration Windows Font 

Login or Signup to post a comment