vdb86 / screensaver.digitalclock

Digital clock screensaver for Kodi
https://forum.kodi.tv/showthread.php?tid=237338
GNU General Public License v2.0
10 stars 10 forks source link

With OSMC skin the font size of hours and minutes is wrong #60

Closed petroid closed 8 months ago

petroid commented 8 months ago

The font size of hh:mm line is the same as other information and its elements are wide apart like

11 : 45

I'm using this screensaver with OSMC for more than 2 years and only recently found out that it supposed to look differently.

vdb86 commented 8 months ago

Hi! It used to work OK, which means they changed the name of the fonts in font.xml in the osmc skin. Screensavers are forced to use whatever fonts are defined in skins, so when they get changed I need to update the screensaver. I've just checked and the osmc skin doesn't have the old font name that I used and the current font sizes are too small. Unfortunately there's nothing I can do about this. You can ask Sam to inslude the old font names that I used, or to add bigger fonts in font.xml and submit a pull request to me with those new font names in the skin.osmc.xml

petroid commented 8 months ago

I see that you are using "Clock", "Small" and "font14" font names. Could you please provide more detail on where are they come from. Because I've checked commit history in skin.osmc repo and these don't seem to have ever existed in font.xml.

vdb86 commented 8 months ago

I've made this screensaver quite a few years ago, at that point I made sure all relevant skins were supported. Afterwards some updates were made either for adding new functionality, to update skins that have changed (based on user complaints) or add new skins (again based on user feedback). The font names that are used for osmc skin came from font.xml. They surely existed, it's just a question why they're not showing up now in commit history.

vdb86 commented 8 months ago

Just checked on my end, it was skin osmc 3.0.8

petroid commented 8 months ago

Okay, I found 3.0.8 version of osmc skin locally. According to font.xml: Font "Clock" had size 120 Font "Small" had size 33 And there still was no "font14". There was "font13" though which had size 21. Maybe a typo?

So, should I edit font.xml to include these fonts and request a pull to skin.osmc repo? Or rather edit skin.osmc.xml according to current standard osmc fonts and request a pull to your repo? Or both?

petroid commented 8 months ago

Largest font they have now is "font72" with size 68 (🀯) and there is no font with size 33 but there are 31 and 34 though.

vdb86 commented 8 months ago

The easiest solution would be to update the font.xml and add the font sizes that were originally used.

vdb86 commented 8 months ago

Just a heads up, I had to take a look at this as I haven't really played with this screenaver for a while. There's only 2 font sizes needed. Big one for the clock and small one for the other text. So all you need is Clock and Small font size.

The rest of the elements are just color control, and the font size doesn't matter as the elements are invisible.

Ch1llb0 commented 8 months ago

Hi! It used to work OK, which means they changed the name of the fonts in font.xml in the osmc skin.

Hey there - I'm the skinner responsible for the OSMC Skin. Fun fact: There never were any fonts defined in font.xml of our skin bigger than size 68, which is true until today (I've checked the entire skin's git history). I'm wondering how this might've ever worked.

As explained to @petroid already, I'm really not happy with this whole system... Having to add code to a skin that the skin never uses is not how things are meant to work - especially considering the back and forth between skins and addons necessary for this (possible again after either side changes anything). I'm wondering why Kodi (or TK for that matter) wouldn't allow addons that need fonts to define them themselves - seems counterproductive. That it works with e.g. Estuary is a coincidence as it uses a size 120 font itself (WeatherTemp). Our skin doesn't and from the skin side there's absolutely no need to add this.

What I can do is, like Estuary does, define a specific font with size 120 following our skin's font naming scheme which can be picked up by any addon like this one... The change necessary on the addon side would be something I'd like to ask you guys to do as I'm short on time atm ☺️ The names to pick up will be: Front120 and for the smaller one you could pick up Font36 πŸ‘πŸ»

vdb86 commented 8 months ago

Hello! Thank you for your message. I've just checked my old backup files (when I was making the screensaver) and the OSMC skin version that I've got is 3.1.0, that's where I got the font names/sizes.

I agree with you and I had a long discussion with the Kodi team while I was still in early stages of creating this screensaver. Essentially Skins define everything as they want to have the same UX across the board - I've highlighted that for screensavers this makes no sense and complicates development severely. Unfortunately they were not interested in changing their logic.

Thank you for adding those fonts, I'll add them to the osmc xml now!

petroid commented 8 months ago

I suppose we can close this now as fixed with 75c4217 Thank you guys!

Ch1llb0 commented 8 months ago

I've just checked my old backup files (when I was making the screensaver) and the OSMC skin version that I've got is 3.1.0, that's where I got the font names/sizes.

Thx for explaining! This is the old OSMC Skin which was last in use 9 years ago... The newer skin never had the respective fonts. Was just wondering whether I had overlooked anything in the skin that I should be fairly familiar with πŸ˜‚

Great we've got this sorted now πŸ‘πŸΌ

vdb86 commented 8 months ago

@Ch1llb0 any chance I could ask you for a bit of help with the screensaver? I've got one lingering problem that I'm unable to resolve, the bouncy movement choppyness. It used to work ok, but then, between Kodi 17.0 and 17.1 they introduced this change: https://github.com/xbmc/xbmc/pull/11651 And the bouncy movement became choppy. I've already communicated with popcornmix and Milhouse, and they were able to help me find the change that broke the movement, but unable to help me fix it. popcornmix suggested that the screensaver was calling Kodi too often - "A few calls close together (e.g. within a vsync interval) is what's likely to provoke the stutter." I've then created a minimalist version: https://github.com/vdb86/screensaver.digitalclock/tree/test-for-choppy-movement Which had almost no code, and yet the choppiness was still there.

I know this screensaver is used by a huge crowd, and that most of them loved the bouncy movement - while it was working well of course, and it kills me that I can't get it to work like it used to.

If you're knowledgeable, or know someone else that could potentially help, please help :)