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

2023.9.1 Replace Time Date Text #104

Merged
merged 9 commits into from
Oct 11, 2023
Merged

2023.9.1 Replace Time Date Text #104

merged 9 commits into from
Oct 11, 2023

Conversation

trip5
Copy link
Contributor

@trip5 trip5 commented Oct 9, 2023

Perhaps you were thinking I wouldn't... but I did. How do you feel about this? (My Korean wife loves it.)

Korean Time

Replaces any text used by strftime in all 4 screens that show date or time functions (clock, date, icon clock, icon date).

Useable in the YAML as so (if it works with Korean, it should work with anything):

  replace_time_date_from: "AM PM Sun Mon Tue Wed Thu Fri Sat Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"
  replace_time_date_to: "오전 오후 일 월 화 수 목 금 토 1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월"

A pre-release of the Koreanized font used in the above picture:
8X Fonts (K TimeDate chars).zip

For a demonstration of the code:
https://onlinegdb.com/-Rg8UZN-8

Safety measures included in the python file to prevent users from making mistakes: it counts & check the number of words are equal and not more than 50 (the fixed size of the array), that both settings are included... and triggers a bool to leave the function unused if there was a problem.

I had to include 1 more dependency #include <algorithm> because replace was malfunctioning on the 1st character... in any case, it also uses vector so it should be faster.

In the future, I'll take a look and see if what I added here can be used to speed up the recent addition to the weekdays because I'm pretty sure that GetWeekdayCharCount and GetWeekdayChar can be optimized using vector.

@lubeda
Copy link
Owner

lubeda commented Oct 10, 2023

I didn't check this PR in total, but some lines of documentation in the readme or the wiki are missing.

@trip5
Copy link
Contributor Author

trip5 commented Oct 10, 2023

Indeed, you're right. I trusted Visual Studio to do its thing and it didn't sync a few files. I'll have to manually download them and put them back in after work...

@andrewjswan
Copy link

A pre-release of the Koreanized font used in the above picture

Why make a separate font? TTF supports many languages, it would be more convenient and easier to have one font with everything you need.

@trip5
Copy link
Contributor Author

trip5 commented Oct 10, 2023

Nope. Not a special font. Just added a few Korean characters to my Chunky8X as a personal test. Figured I'd include that test font here. There's already adjustments made to the characters with my wife's advice and consulting other pixel fonts online...

I think I misunderstood lubeda earlier. I've made the wiki file for this function and cleaned up some other parts of the wiki... minor changes really.

@trip5
Copy link
Contributor Author

trip5 commented Oct 10, 2023

Sorry this is typically me. Too many commits.

@andrewjswan
Copy link

Just added a few Korean characters to my Chunky8X as a personal test

I'll be waiting for those letters in the MatrixChunky font. :)

@lubeda lubeda merged commit 99d3c4c into lubeda:2023.9.1 Oct 11, 2023
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