Adding some fonts for addon developers
#1
Lightbulb 
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.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#2
PR4743 should be a step into the direction so that addons could provide and load their own Font.xml etc.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
(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)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#4
Probably a silly idea but why can't there be a <fontsize>nn</fontsize> tag for labels?
Reply
#5
(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.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#6
(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?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#7
+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.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#8
(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.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#9
(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
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#10
(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.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#11
Or font addons? Huh
Reply
#12
(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?
My skins:

Amber
Quartz

Reply
#13
So they don't have to use font13 for everything I guess.
Reply
#14
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.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#15
(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.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply

Logout Mark Read Team Forum Stats Members Help
Adding some fonts for addon developers1
This forum uses Lukasz Tkacz MyBB addons.