Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fat clock font #169

Merged
merged 10 commits into from
May 6, 2022
Merged

Fat clock font #169

merged 10 commits into from
May 6, 2022

Conversation

rozza-m
Copy link
Contributor

@rozza-m rozza-m commented May 1, 2022

image

This change implements a big fat clock font font for better readability / more impact - intended really for situations where there's a big bezel and the individual pixels are hidden - so there's no need for any whitespace within the matrix, might as well use all the pixels! Basically I wanted a really big, fat time display :)

In doing so it has to make a few additions:

  • new option in API (clockFatFont) and webUI
  • new font (only numerals, ":" and "." , this does use up PROGMEM but there's plenty left even on ESP8266)
  • weekday bars aren't visible when Big Clock Font is active, seconds aren't visible and AM/PM isn't visible even in 12h mode. They don't fit!
  • alternating between time and date is still possible, but because the FatFont is proportional width, it draws in a different way using CenterText (just for Big Clock Font, the existing font draws the same way). This function doesn't have a Y argument so rather than messing around with even more of the code I just implemented a fade between the screens rather than a vertical scroll. When Big Clock Font is unselected, the transition is still a vertical scroll.

@o0shojo0o - I appreciate this is quite a big change. If it doesn't match where you want the project to go that's fine, reject the change and I'll keep my fork alive. If you do accept - I've updated the .vue for the webUI but I don't believe I can actually compile it and commit the new version because it's linked to your github. You will also definitely want to look through the change to the webUI to make sure it works as expected as I haven't been able to test it.

image

@foorschtbar
Copy link
Member

Nice PR! What about only a "fat clock"-option? Then only some numbers a needed and less changes of the other code?

@rozza-m
Copy link
Contributor Author

rozza-m commented May 1, 2022

Sorry, I don't quite follow? Do you mean don't do the date bit and just make it so that Big Clock Font is not compatible with the alternating date feature? If so - could do, but it wouldn't really make that much difference in terms of code.

I've edited my comment very slightly - it doesn't change much in terms of existing code, apart from a few "if"s in the clock string build and rendering. It's mostly adding new stuff just to support this new number style.

@rozza-m
Copy link
Contributor Author

rozza-m commented May 1, 2022

Oh I think perhaps I get what you mean! It is only a fat clock font. The notification stuff is unchanged. I will make that clearer!

@rozza-m rozza-m changed the title Fat font Fat clock font May 1, 2022
@o0shojo0o
Copy link
Member

Hi and thanks for your PR, I will definitely look at that and test.
So right away I see no problem to accept the PR.

rozza-m and others added 4 commits May 3, 2022 10:12
Although the characters "A" and "P" aren't rendered, the space (" ") is, which nudges the text over making it misaligned. This change fixes that.
@o0shojo0o o0shojo0o merged commit 2c7c179 into pixelit-project:main May 6, 2022
@o0shojo0o
Copy link
Member

Thank you for contribution :)

@rozza-m
Copy link
Contributor Author

rozza-m commented May 6, 2022

You're really welcome, thanks for accepting my PR, and I'm sorry you had to spend time fixing the json (and lots of formatting...clearly your standards are higher than mine!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants