Skip to content

Fonts: make fonts part of InfiniTimeTheme#2427

Open
muesli wants to merge 1 commit intoInfiniTimeOrg:mainfrom
muesli:fonttheme
Open

Fonts: make fonts part of InfiniTimeTheme#2427
muesli wants to merge 1 commit intoInfiniTimeOrg:mainfrom
muesli:fonttheme

Conversation

@muesli
Copy link
Contributor

@muesli muesli commented Mar 16, 2026

Added a Fonts namespace to the InfiniTimeTheme, which provides references to the available standard fonts. Instead of directly referencing fonts in various code places, we can now rely on the Theme's settings. This makes it easier to try out different fonts and have the setting applied system-wide.

Added a Fonts namespace to the InfiniTimeTheme, which provides
references to the available standard fonts. Instead of directly
referencing fonts in various code places, we can now rely on the
Theme's settings. This makes it easier to try out different fonts
and have the setting applied system-wide.
@github-actions
Copy link

Build size and comparison to main:

Section Size Difference
text 385424B 192B
data 944B 0B
bss 22640B 0B

Run in InfiniEmu

Copy link
Member

@mark9064 mark9064 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A long needed refactor :) thanks

};

namespace Fonts {
static constexpr const lv_font_t* normal = &jetbrains_mono_bold_20;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's the option of something like static constexpr const lv_font_t &normal = jetbrains_mono_bold_20; to keep the type the same. But maybe it's better as ref anyway?

};

namespace Fonts {
static constexpr const lv_font_t* normal = &jetbrains_mono_bold_20;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel these should be capitalised (I know that disagrees with the entries above)

I don't think we have a clear standard for these kind of constants

Not something that needs changing to merge. Interested in everyone's opinions on this one, could be totally off base here :)

Copy link
Contributor Author

@muesli muesli Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I absolutely agree! Even felt weird writing them in lowercase, but I wanted to follow the convention from above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JF002 do you have a defined convention in mind? I don't mind too much either way, but we should probably add it to the coding standard

@mark9064 mark9064 added the maintenance Background work label Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Background work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants