I grabbed a non-monospaced font from the web and I made all the digits the same width in fontforge and I saved it as a ttf. If I double click on the ttf in windows, I can see the extra space around the ‘1’ so I know that has saved correctly. When I convert to a binary and then load the font in lvgl, the space has gone from around the ‘1’. The original font is not monospaced and I want that for text, but all digits on our device will be monospaced as digital displays can’t change width.
Am I missing something?
Edit: I installed the ttf into windows and word displays it properly. I noticed in LVGL that the ‘1’ does have the space around it. If I display “111.23” then change it to “322.12” the text moves sideways.
The first screenshot is word, you can see the decimal point alignes in all cases. When I show it in LVGL, I can see the space around the ‘1’ but the decimal point moves as I scroll through the numbers. This doesn’t happen with a true monspaced font.
I did some more testing. I did some more testing. The ‘1’ and the ‘7’ are changing where the decimal point is displayed. It moves sideways. The ‘1’ changes the display when it is displayed in the position after the decimal point. It does not change it when displayed in front. The ‘7’ changes the display when it is displayed in front of the decimal point. It does not change it when displayed after it. Neither changes the display when displayed in the last position. The display is X.XX. No other digits change the display in any position. Would this be something to do with the decimal point? I made the decimal point the same width as the digits but that had no effect.