v21 Bug with fonts in Omega when in windowed mode
#1
When using Kodi Omega in fullscreen (windows PC), sometimes I need to put it in windowed mode using the keyboard shortcut, so as to see something else in the desktop. Sometimes there's no problem at all, but often I get this:

Image
As you can see the fonts are gigantic, but sometimes it's the other way round, they're tiny. When going back to fullscreen everything is ok again. This didn't happen in Nexus. For me it's not a big problem, since it doesn't always happen and in addition I don't intend to use Kodi in windowed mode in a regular basis, it's just to let devs know. Thanks!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#2
It's not happening here using the \ key. How do you go to windowed mode? Anything out of the ordinary on that computer, or non-default Windows settings?
Looks like the font keeps its fullscreen size.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
Yeah, I've had it happen a lot lately while skinning because you're always switching between windowed and fullscreen mode. Luckily a simple refresh ReloadSkin() fixes it.
Reply
#4
Need some steps for repro. I don't know the skinning process that may trigger this.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
(2024-03-05, 06:24)CrystalP Wrote: It's not happening here using the \ key. How do you go to windowed mode? Anything out of the ordinary on that computer, or non-default Windows settings?
Looks like the font keeps its fullscreen size.
Yes, that's the same method that I use, the \ key. Nothing extraordinary, I only use a lot ReloadSkin, because I'm editing the skin, and I need to go to windowed mode frequently to open another file. I've tried a lot of times, so as to give you clues about what triggers that behaviour, but it seems almost randomly, sometimes it doesn't happen at all, sometimes it happens the first time you go to windowed mode... note that it's not always that the fonts are bigger that expected, sometimes they are minute, so the problem it's not that they keep size like in fullscreen, but that they don't follow the right scale of the screen (although the images do scale perfectly). Sorry not been able to provide you more information, I know that trying to fix an issue that one doesn't even have in his own device is frustrating.
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#6
(2024-03-05, 14:26)CrystalP Wrote: Need some steps for repro. I don't know the skinning process that may trigger this.
It's so random there's no way to reproduce unfortunately apart from hitting the \ key.
Reply
#7
Ok, I think that I found a way to reproduce the issue. You need to have at least two skins installed. I tested on Windows, Kodi Omega RC1 and with Estuary and Aeon Nox Silvo, since it's already available in the official repo. Steps:

- Start Kodi on Estuary (fullscreen)
- Change the skin to Aeon Nox Silvo and go to Home screen.
- Shift to windowed mode hitting the \ key.

Following these steps always results in this:

Image
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#8
Confirmed. Also starting windowed in one skin, switching to another, and then \ results in small labels until a skin refresh.
Reply
#9
That was a weird one. You'll find lines such as this in your logs and that was the important clue:
Quote:2024-03-17 17:48:36.938 T:19912   error <general>: GUIFontManager::ReloadTTFFonts: Couldn't re-load font file: 'E:\Devpt\kodi\kodi-build\Debug\portable_data\addons\skin.aeon.nox.silvo\fonts\robotocondensed-regular.ttf'

... but the file exists, just with a different case (RobotoCondensed-Regular.ttf for this example).

The problem is that the cache stores file names and directories with original case, but when loading a skin font, something converts the skin font name to lower case first, so there is no match.

The fonts are loaded successfully when starting Kodi because the skin font directory hasn't been added to the cache yet.

However, when switching skin, both old skin font dir and new skin font dir seem to be cached, so the fonts are not found because of the case and can't be recreated.
Kodi then reuses an already loaded font (in the wrong size), and you get the strange problem of your screenshot.

As a workaround, rename the font files to lower case for both skins, and the problem goes away... It's not an ideal solution of course.

I'm not sure at which level to fix this, it's a new subsystem to me.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#10
Digging in the history, looks like a bug introduced in 2013 in a big refactor of ToLower. The fix seems clear now.

edit: actually not. tolower() was added in 2012, not sure why, maybe because of case-insensitive filesystems of the time?
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#11
Thanks CrystalP.
Reply

Logout Mark Read Team Forum Stats Members Help
Bug with fonts in Omega when in windowed mode0