Dynamic loading of fonts in window xml
#1
Hi,

I know this issue may be as old as XBMC/Kodi but I wanted to give it another try. 

My addon is a script addon with a custom xml gui. As most addons of this type it is designed to match the look and feel of Kodis default skin Estuary. To imitate the look and feel of other skins I am planning to implement color schemes that work similar to the color.xml files that can be used by skins.

Basically I am using this code to set colors in my window xml:
Code:
<textcolor>$INFO[Skin.String(rcb_text_heading_color)]</textcolor>

In python I load an xml file that defines the skin specific colors and use them like this:
Code:
xbmc.executebuiltin("Skin.SetString(%s, %s)" % ('rcb_text_heading_color', 'FF12A0C7'))

This works fine for colors and I wanted to use the same approach for fonts:
Code:
xml:
<font>$INFO[Skin.String(rcb_text_heading_font)]</font>

python:
xbmc.executebuiltin("Skin.SetString(%s, %s)" % ('rcb_text_heading_font', 'LargeBold'))
Unfortunately this doesn't work. My question is: is there any way to make this working?

I could imagine that this could be a smaller change than most other font loading solutions that have been discussed in the past.

Regards
Malte
Reply

Logout Mark Read Team Forum Stats Members Help
Dynamic loading of fonts in window xml0