Adding some fonts for addon developers
#31
I have no issue adding these lines to my skin, but the skinner selecting the sizes that "best suit their skin" is almost impossible. Different fonts look different at the same size- ie: The word "KODI" in the font Roboto size 18 may be 70 x 10 pixels, but in the font Arial size 18 may be 60 x 15 pixels. If the add-on builders can select their own font, this will likely still not work well.
bit(ten) skin (Thread) (Project Site)
metroTV skin (Thread) (Project Site)

Reply
#32
May I suggest looking at html for inspiration, I know that its very hard to standardize typography so it fits perfectly (have this exact problem at work too).

So basically equivalents to h1, h2, h3, h4, h5, h6, small, large, italic, bold, p?

http://getbootstrap.com/css/#type
http://foundation.zurb.com/docs/componen...raphy.html
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#33
(2015-01-11, 19:02)ZexisStryfe Wrote: I have no issue adding these lines to my skin, but the skinner selecting the sizes that "best suit their skin" is almost impossible. Different fonts look different at the same size- ie: The word "KODI" in the font Roboto size 18 may be 70 x 10 pixels, but in the font Arial size 18 may be 60 x 15 pixels. If the add-on builders can select their own font, this will likely still not work well.
What is needed is a range of non-caps fonts that are roughly the same size. They don't need to be exactly the same size or font, but width and height as close as possible.

For instance say we made 5 fonts in Confluence called addon_1, addon_2, etc using DejaVuSans. Skinners could then add 5 fonts with the same name making an attempt to match the size of the Confluence addon fonts. If the font doesn't match well then a smaller size could be chosen so if the Confluence is 60x15 and you have a choice of a 60x18 and a 56x14 you could use the latter so at least text will fit in the target control.

While this isn't perfect and not a real solution, it will improve the situation for skinned addons and make them look better when the user has your skin installed than with the current situation.

Hopefully someone can actually add the ability for addons to use their own fonts in their skins so this sort of workaround won't be necessary.
Reply
#34
(2015-01-11, 19:23)topfs2 Wrote: May I suggest looking at html for inspiration, I know that its very hard to standardize typography so it fits perfectly (have this exact problem at work too).

So basically equivalents to h1, h2, h3, h4, h5, h6, small, large, italic, bold, p?

http://getbootstrap.com/css/#type
http://foundation.zurb.com/docs/componen...raphy.html

While basically this is a good idea, it doesn't work the same, as our controls do not scale for their contents like html, so size differences are even more problematic.
Reply
#35
(2015-01-11, 19:41)ruuk Wrote: While basically this is a good idea, it doesn't work the same, as our controls do not scale for their contents like html, so size differences are even more problematic.

Well you'll have that problem with the original proposal too. And we could possibly circumvent this by standardizing a few layouts too (via the macro/variable feature).
Another option would be to actually allow html blocking or QML anchoring within our guilib too.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#36
(2015-01-11, 21:39)topfs2 Wrote:
(2015-01-11, 19:41)ruuk Wrote: While basically this is a good idea, it doesn't work the same, as our controls do not scale for their contents like html, so size differences are even more problematic.

Well you'll have that problem with the original proposal too.

I know, I was just bringing it up because of the html comparison.

(2015-01-11, 21:39)topfs2 Wrote: And we could possibly circumvent this by standardizing a few layouts too (via the macro/variable feature).
Another option would be to actually allow html blocking or QML anchoring within our guilib too.

Things like this would be nice, but require actual coding to be done, which is why we don't have addon skin fonts yet, and why we have the skin workaround proposal in the first place Smile
Reply
#37
And nobody likes my suggestion of Confluence fonts inheritance? I guess it's to simple Smile
My skins:

Amber
Quartz

Reply
#38
Perhaps if they could be used without having to add them to every skin.
Reply
#39
(2015-01-12, 02:47)Hitcher Wrote: Perhaps if they could be used without having to add them to every skin.

That was the idea - if fonts or textures are not in script DIR, fallback to active skin and Confluence eventually.
My skins:

Amber
Quartz

Reply
#40
(2015-01-12, 11:10)pecinko Wrote:
(2015-01-12, 02:47)Hitcher Wrote: Perhaps if they could be used without having to add them to every skin.

That was the idea - if fonts or textures are not in script DIR, fallback to active skin and Confluence eventually.

Thought we did this already? Or perhaps we do it the other way around? Skin -> Script -> Confluence?
(2015-01-11, 21:51)ruuk Wrote:
(2015-01-11, 21:39)topfs2 Wrote: And we could possibly circumvent this by standardizing a few layouts too (via the macro/variable feature).
Another option would be to actually allow html blocking or QML anchoring within our guilib too.

Things like this would be nice, but require actual coding to be done, which is why we don't have addon skin fonts yet, and why we have the skin workaround proposal in the first place Smile

I think the macro/varible feature thing would be doable already, without any code changes to guilib. But I'll defer that to ronnie and phil65 Smile
And yeah, the anchoring needs code. I wonder if it would be overly much though, I've read through QML anchoring code which was ported to javascript and its not more than a few hundred lines and is very powerful (dare I say its more powerful than html Tongue)
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#41
Wait a minute, Kodi comes with arial.ttf why can't any addon use that?
Reply
#42
(2015-01-12, 11:21)Hitcher Wrote: Wait a minute, Kodi comes with arial.ttf why can't any addon use that?

I think the point about the suggestion is that the addon could do simple windows which aligns with the current skin nicely. So if one skin uses greenish 72px roboto as header and another 64px white times new roman they'd could use the same label via font="header" as an example.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#43
I *think* we don't fallback to Confluence ATM.

Skins use various graphic elements, how do we solve that? We will end up with confluence graphics and sizes used with active skin fonts. Does this really sound as an improvement to you guys?
My skins:

Amber
Quartz

Reply
#44
What exactly is holding back a true solution for this anyway? All this is just fighting symptoms instead of getting to the root of the problem, and possibly pushing that even further because the "solution" is "good enough". If this is such a problem for script developers then surely it should get prioritised as such?
Reply
#45
What we probably need is a few more default controls to stick in the defaults.xml (ie fullscreen texture, dialog texture, header label, etc) and then hopefully everything will look correct in all skins.
Reply

Logout Mark Read Team Forum Stats Members Help
Adding some fonts for addon developers1