How to download source for 5.3 version of font converter?

Description

Is there a repo with the source code for the 5.3 version of the font converter?
I’m worried that if I revert back to using 5.3 (mostly because of the fonts in 6.0) that I will have access to the font converter offline, in case the 5.3 version is removed.

What MCU/Processor/Board and compiler are you using?

IMXRT1052

What do you want to achieve?

Download 5.3 font converter source code

What have you tried so far?

Browsing the repo for the font converter, there are only 6.0 tags

Code to reproduce

N/A

Screenshot and/or video

N/A

Is there something you dislike about the fonts in 6.0? We’re open to feedback on that. Note that you should be able to reconvert the DejaVu font from 5.x and use it in 6.0.

The source code for the old font converter: https://github.com/littlevgl/lv_utils

I posted about it in another thread, but just a quick example of what 6.0 fonts look like:
TFT_Simulator_and_eclipse-workspace_-pc_simulator_engine_ui_c-_Eclipse_IDE

This is supposed to be one (random) single word: BELIBGUE and a number 208.0
This is with non aliased font at 14 pixels.

The kerning is very inconsistent and the conversion of the font is also inconsistent.
You can barely tell it is a single word, and the zero and eight digits are mostly indistinguishable.

On 5.3 it was perfect.

The font is Pixellari converted with the CLI using:

lv_font_conv --font ~/Downloads/Pixellari.ttf -r 0x20-0x7F --size 14 --format lvgl --bpp 1 -o ./pixellari_6_test_cli.c

Have you tried it with the newest font converter from https://github.com/littlevgl/lv_font_conv and the dev-6.1 branch? We have been aware of the issue for a few months and recently @puzrin attempted to fix it by reverting a component back to what we used in 5.3.

Yes, it is with the latest dev branch of the font converter, I had to remove .subpx = LV_FONT_SUBPX_NONE, from the font descriptor to get it to work with lvgl 6.0.

Here is the generated font file:
pixellari_6_test_cli.c (16.5 KB)

Here are some examples of the same font from 5.3. I had to use a photo of the actual display from an old version, as my dev environment has all been converted to lvgl 6.0 now.

128.0
MINILOGUE

Pixelary by your link is pixel-perfect 16px font. It’s impossible to show it well at 14 px. Also, kerning info does not seems available there.

5.3 convertor used metrics in very strange way. I’d suggest you use --size 16 prior to report anything.

PS. .subpx = removal temporary needed until branch merged to 6.1, or you can roll back last commit of convertor.

Agreed, on 5.3 I used 16px conversion, on 6.0 I had to switch to 14px to get it in the same size. Is it because of the way traverses (?) are handled in the 6.0 conversion? I admit to knowing almost zero about fonts.

Would limiting the character set to only capital letters change the way it handles the conversion?

I switched to 16px again, and it looks good except for the kerning. Is there some way to easily manipulate the font after conversion? Is it the bounding box defined per glyph?TFT_Simulator

What @puzrin is saying is that 14px is the wrong size. You need to use 16px or pixel information will be lost (as you found).

I’d suggest you to inspect what you really have on input, prior to decide is this LVGL problem or font should be changed to something better. About “good look in 5.3”… broken clock can show right time twice per day, but this is not very useful :).

Try this things:

  • Use FontForge to open source and see what your font has inside
  • In convertor, try --format dump to quick check bitmaps and glyph parameters (in separate json file)
  • In convertor, add env DEBUG=* before command with --format bin, to see more tech logs. For example, if kerning extracted or not and how table sizes depend on cli options.

What i see now:

  • Input font has no kerning info.
  • Letters are really drawn with such spaces (E, U, G have 2px space before + 1px after, and other letters have 1px before and 1 px after). That’s as on your screenshot.

So, convertor + lvgl display exactly what you have.

All manipulations should be done BEFORE conversion, with TTF font. Convertor + lvgl in 6.0+ try to display font exactly as is was designed by authors, without any unpredictable magick.

In theory, you can add kerning info in font editor, but i never tried to do so. FontForge has feature of space autoalign, you may try to play with it.

My personal recommendation is to find a “right” pixel-perfect font of desired size, which do not need hacking. We discussed this (with links) in tracker, but nobody had time to inspect existing collections. Also, you may find font links in u8g2 wiki.

OK, I poked around in FontForge, adjusting the bearings for the glyphs and I got it to look better.

Thanks!

TFT_Simulator