Kodi Community Forum
Adding some fonts for addon developers - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Adding some fonts for addon developers (/showthread.php?tid=214140)

Pages: 1 2 3 4 5 6


Adding some fonts for addon developers - ronie - 2015-01-07

the most requested functionality from addon developers is the ability to use custom fonts in their addons.
currently they can't use different font sizes in their addons, at least not in a way that will work in all skins.

since i don't think there is gonna be a proper solution for the issue anytime soon,
it might be a good idea if all skins would add a couple of font definitions that addon devs can use.

if every skin dev could add this to their skin, then addon devs would at least have a couple of font sizes to pick from:

Code:
<fonts>
    <fontset id="Default">
        <font>
            <name>Addon-XS</name>
            <filename>font.ttf</filename>
            <size>xx</size>
        </font>
        <font>
            <name>Addon-S</name>
            <filename>font.ttf</filename>
            <size>xx</size>
        </font>
        <font>
            <name>Addon-M</name>
            <filename>font.ttf</filename>
            <size>xx</size>
        </font>
        <font>
            <name>Addon-L</name>
            <filename>font.ttf</filename>
            <size>xx</size>
        </font>
        <font>
            <name>Addon-XL</name>
            <filename>font.ttf</filename>
            <size>xx</size>
        </font>

thoughts and ideas from both skin and addon devs are most welcome.


RE: [RFC] Adding some fonts for addon developers - Montellese - 2015-01-07

PR4743 should be a step into the direction so that addons could provide and load their own Font.xml etc.


RE: [RFC] Adding some fonts for addon developers - wyrm - 2015-01-07

(2015-01-07, 17:16)ronie Wrote: the most requested functionality from addon developers is the ability to use custom fonts in their addons.
currently they can't use different font sizes in their addons, at least not in a way that will work in all skins.

since i don't think there is gonna be a proper solution for the issue anytime soon,
it might be a good idea if all skins would add a couple of font definitions that addon devs can use.

if every skin dev could add this to their skin, then addon devs would at least have a couple of font sizes to pick from:

Code:
<fonts>
    <fontset id="Default">
        <font>
            <name>Addon-XS</name>
            <filename>font.ttf</filename>
            <size>xx</size>
        </font>
        <font>
            <name>Addon-S</name>
            <filename>font.ttf</filename>
            <size>xx</size>
        </font>
        <font>
            <name>Addon-M</name>
            <filename>font.ttf</filename>
            <size>xx</size>
        </font>
        <font>
            <name>Addon-L</name>
            <filename>font.ttf</filename>
            <size>xx</size>
        </font>
        <font>
            <name>Addon-XL</name>
            <filename>font.ttf</filename>
            <size>xx</size>
        </font>

thoughts and ideas from both skin and addon devs are most welcome.
Ronie,

I'm certainly happy to do this. My only question is who would decide on the relevant sizing for each of these fonts, the skin writers or addon writers? I ask this as most of my font sizing tends to be bigger than most other skins (nothing shits me faster than some clown at the TV station rendering text on screen at 3pt Flyspeck).

Probably worth kicking around at the same time is the idea of consistent naming of certain skin image files that addon writers could use in their scripts. I guess on this score we would all have to agree to a standard sizing.

Oh, and standard view numbering probably would not hurt as well (I always thought id 50 was meant for list views, but don't recall any other view having a set id)

Wyrm (AppTV)


RE: [RFC] Adding some fonts for addon developers - Hitcher - 2015-01-07

Probably a silly idea but why can't there be a <fontsize>nn</fontsize> tag for labels?


RE: [RFC] Adding some fonts for addon developers - ronie - 2015-01-08

(2015-01-07, 17:25)Montellese Wrote: PR4743 should be a step into the direction so that addons could provide and load their own Font.xml etc.

true, a proper core solution would certainly be preferable.
but until such a feature is merged, i think we should be looking for alternatives.


RE: [RFC] Adding some fonts for addon developers - ronie - 2015-01-08

(2015-01-07, 18:05)wyrm Wrote: I'm certainly happy to do this. My only question is who would decide on the relevant sizing for each of these fonts, the skin writers or addon writers? I ask this as most of my font sizing tends to be bigger than most other skins (nothing shits me faster than some clown at the TV station rendering text on screen at 3pt Flyspeck).

you as a skinner would decide. you pick 5 sizes that fit your skin, ranging from very small to extra large.

as for your other suggestions, image standardization is going to be tough i think. the main problem is the image border imo.
your background-panel or focused-button may need a border="5" while mine needs a border="20,4,12,8" for instance.


i'm not sure why a standard view numbering would be beneficial to addon devs?


RE: [RFC] Adding some fonts for addon developers - bossanova808 - 2015-01-08

+1 on some basic standard sizes! You can wait forever for a permanent solution (I first asked about this back in '09 I think!) - but some basic size support would be a very handy first step.


RE: [RFC] Adding some fonts for addon developers - ronie - 2015-01-08

(2015-01-07, 22:15)Hitcher Wrote: Probably a silly idea but why can't there be a <fontsize>nn</fontsize> tag for labels?

silly answer, i don't know :-)

i can only guess it's to save us a lot of code. now you can use a <font> definition in a label control,
i would take three times as much code to define <fontsize>, <fontstyle>, <fontfile> all separately in the label control.


RE: [RFC] Adding some fonts for addon developers - wyrm - 2015-01-08

(2015-01-08, 01:41)ronie Wrote: as for your other suggestions, image standardization is going to be tough i think. the main problem is the image border imo.
your background-panel or focused-button may need a border="5" while mine needs a border="20,4,12,8" for instance.


i'm not sure why a standard view numbering would be beneficial to addon devs?

Ronie,

In answer to both these points see here , points 2.1, 2.2 and 2.4. I have no idea on how it is useful to the addon writers as my Python is rudimentary at best, but as it has been requested and it's no major issue to provide this in the skin I don't see why we should not look after this all in one go.

Wyrm


RE: [RFC] Adding some fonts for addon developers - Montellese - 2015-01-08

(2015-01-08, 00:58)ronie Wrote:
(2015-01-07, 17:25)Montellese Wrote: PR4743 should be a step into the direction so that addons could provide and load their own Font.xml etc.

true, a proper core solution would certainly be preferable.
but until such a feature is merged, i think we should be looking for alternatives.

I didn't mean to say that your approach isn't a good idea. I just came across that PR/branch when going through some of Jonathan's unfinished work and thought I'd bring it up here since it seems to be more or less on topic.


RE: [RFC] Adding some fonts for addon developers - Hitcher - 2015-01-08

Or font addons? Huh


RE: [RFC] Adding some fonts for addon developers - pecinko - 2015-01-08

(2015-01-07, 17:16)ronie Wrote: the most requested functionality from addon developers is the ability to use custom fonts in their addons.

Be careful what you wish for.

What is the reasoning behind this? They would like them bigger or smaller than the rest of the skin? Why would they/we want to have that? What is the real problem driving this request by add-on developers; real world use case scenario that proves this request as a valid one?


RE: [RFC] Adding some fonts for addon developers - Hitcher - 2015-01-08

So they don't have to use font13 for everything I guess.


RE: [RFC] Adding some fonts for addon developers - ronie - 2015-01-09

yup, this proposal is meant to help out addon devs who create a script that comes with a script window.

currently they cannot use different font sizes in their windows, all labels will have the same size.
just as us skinners, they also would like the present their work in the best possible way, but they currently lack the tools to do so.


RE: [RFC] Adding some fonts for addon developers - ronie - 2015-01-09

(2015-01-08, 09:14)Hitcher Wrote: Or font addons? Huh

all nice ideas. but all that need a c++ dev.

as i said above, a proper core implementation would be preferred,
but reality tells me we should not wait for one.


This forum uses Lukasz Tkacz MyBB addons.