Skip to content

Conversation

@0x0000ff
Copy link

I've enabled support for subpixel fonts in the lv_conf.h file and the generate.py script. The "subpixel" boolean option can be added to the options in the fonts.json file to generate subpixel fonts.

@github-actions
Copy link

github-actions bot commented Dec 25, 2023

Build size and comparison to main:

Section Size Difference
text 370824B 1040B
data 940B 0B
bss 63516B 0B

@0x0000ff
Copy link
Author

0x0000ff commented Dec 25, 2023

I thought I'd just add this as well for your future consideration.

I wanted to use this to get the text smaller whilst keeping it's readability, in order to get more test and more usable screen space.

I lowered the size of the main font to 15, with and without subpixels, and and there is a noticeable difference:
InfiniSim_2023-12-16_110531 InfiniSim_2023-12-16_110707

I then lowered the font to 12, just to see what would happen, and the differences are more notable with this enabled:
InfiniSim_2023-12-16_111309 InfiniSim_2023-12-16_111110

I also tried using a different font. I changed it to Open_Sans_light and put the size back to 15:
InfiniSim_2023-12-25_125816 InfiniSim_2023-12-25_125901

The characters are very thin with it enabled, and they also don't seem to be vary visible in bright backgrounds:
InfiniSim_2023-12-25_125811 InfiniSim_2023-12-25_125854

So I used the medium version of OpenSans, which made the text readable again:
InfiniSim_2023-12-25_151240 InfiniSim_2023-12-25_151115
InfiniSim_2023-12-25_151512 InfiniSim_2023-12-25_141206

I flashed it onto my watch and I still find the text legible from arms length when I'm wearing it.
2023-12-25-15-37-20-402

@0x0000ff 0x0000ff closed this Dec 25, 2023
@0x0000ff 0x0000ff reopened this Dec 25, 2023
@0x0000ff
Copy link
Author

0x0000ff commented Dec 31, 2023

I should probably add a comparison between this and anti-aliasing at 2bpp
InfiniSim_2023-12-31_114613InfiniSim_2023-12-31_114449InfiniSim_2023-12-31_123941

@escoand
Copy link

escoand commented Dec 31, 2023

The first image looks much better, at least on my mobile display.

@0x0000ff
Copy link
Author

You'll likely see vivid colour banding on the fonts on some screens due to the nature of subpixles and how a display's pixels are arranged. On the watch's screen it is rendered correctly.

This is using the subpixel font
IMG_20231231_161706
...And this is one with anti-aliasing
2023-12-31-16-20-30-068

They look similar to each other, but I think the subpixel fonts are more sharper and brighter. It does increase the filesize and has some colours banding, but I think it would be good for makeing small fonts legible.

@FintasticMan FintasticMan added the UI/UX User interface/User experience label Jan 10, 2024
@kieranc
Copy link
Contributor

kieranc commented Jan 14, 2024

I like this, AA or similar for fonts has been something nice to have which we haven't had the space for for ages.

I'm wondering how much additional space it consumes, both vs current setup and vs 2bpp AA, and also how jarring it'll be if only some fonts are smoothed and others not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI/UX User interface/User experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants