BUG? Problem with ListControl on some scripts
#1
seems like a few script have some problems. not sure when this started happening. here's two examples... it is happening to a few other too.

Image

Image
I'm not an expert but I play one at work.
Reply
#2
it's because they are relying on fonts existing in pm3, and the fonts were changed about a week or so ago.

i'm not sure of any way around this to be honest.

suggestions are most welcome.
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
Reply
#3
looks like the lists you show us here are displaying using a texture. furthermore, the texture used seems to be the 'onfocus button' texture used by pmiii

have a look inside the code to watch in the listcontrol declaration if it use a texture as background
Quote: controllist class.

controllist(
x, y, width, height, font, textcolor,
buttontexture, buttonfocustexture,
selectedcolor, imagewidth, imageheight,
itemtextxoffset, itemtextyoffset,
itemheight, space, alignmenty )

waouu
strange... it used to be a background parameter for the control list.... i can't see it anymore.... am i wrong Huh
Reply
#4
(jmarshall @ june 23 2006,04:14 Wrote:it's because they are relying on fonts existing in pm3, and the fonts were changed about a week or so ago.

i'm not sure of any way around this to be honest.

suggestions are most welcome.
so it breaks perhaps 40% of the scripts out there? or have i misunderstood? if "font13" etc is gone which is what i understood from this, isn't there a way to make them "shortcuts" to new similar font in the new system in order to keep compatability? i guess there's someplace i could educate myself on this, but got no time to search right now... Blush
xbmcscripts.com administrator
Reply
#5
we should be able to change the fonts being pointed to within the script, right?

jm,
the online manual seems to be "offline" right now (at least i cannot get to it this morning - was fine last night). can you point us to a list of usable fonts?
I'm not an expert but I play one at work.
Reply
#6
the situation is as follows:

the skinner defines the fonts that they want to use. they effectively define 2 separate things:

1. the font name. this is just a reference that they can use throughout the skin (eg 'font13').

2. the font file and any descriptions. this is the actual source font file (bitmap or ttf) and sizing info etc.

the name does not have to have anything to do with the size of the font.

the problem we now face is that pm3 has used a number of fonts (such as font13, font14 and font18) throughout it's life. recently font14 and font18 (i believe - i'm just going on what i've seen here) have been replaced with alternate names.

as python relies on requesting fonts by name (which makes the most sense) all scripts have come to rely on certain fonts being present.

if we were using just rescalable (ie ttf) fonts then there'd be no issue - we could easily just grab the one the script wanted and size it accordingly. unfortunately the majority of skins use xpr fonts (as they're pre-antialiased and look smoother on the whole) and these cannot be scaled to size.

one possible solution is for xbmc to request that the fontmanager finds a font that might be "suitable" for the script. we have issues here, however, with resolutions. what is set as a size 13 font in pal or ntsc is gonna be way smaller at that size in 720p.

i think the best we can do is just grab the "nearest" font size to the one chosen. we can look to add some sort of scaling to the request or we can let scripters handle that.

in order to do this we need to define the method that scripts should request fonts. a possibility that is probably backward compatible is font###.

i'll begin to look into the feasibility of this. it would be useful if scripters could give a list of the common fonts they request.

cheers,
jonathan
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
Reply
#7
i may not understood everything, but, why not give the opportunity to scripter to use, rather a font name according to the skin properties, a font file, which can be setted anywhere (for example in the script dir) and called in controls declarations ?
Quote:controllist( x, y, width, height, "q:\\scripts\\myscript\\arial.ttf")

if i'm totally wrong, please explain why it is not possible or what i did not understood...
Reply
#8
i think that xbmc should always select some fallback font if the requested can not be found. too bad if the size does not fit the gui,- it'll still be better than no font at all. another feature that would be nice: if we could specify a list of font-names instead of only one. xbmc could then use the first one that works. (sort of like how css stylesheets work)

it would also be really nice if there was a shared resource for fonts, so that the available ones didn't depend on the skin. perhaps this 'sharedfonts' directory could be in addition to the skins font directory. the default fallback fonts could be in the 'sharedfonts' dir. in ooba i would have liked to be able to select a monospaced font so that i could display guitar tabs. a few different fonts like that could also be there.

i also like solexalex suggestion that a scripter could use his own fonts. perhaps wingdings would be great for some strange scripts?

a question: if you use a ttf, how do you select what size you want?



Reply
#9
(phunck @ june 24 2006,06:52 Wrote:i think that xbmc should always select some fallback font if the requested can not be found. too bad if the size does not fit the gui,- it'll still be better than no font at all. another feature that would be nice: if we could specify a list of font-names instead of only one. xbmc could then use the first one that works. (sort of like how css stylesheets work)

it would also be really nice if there was a shared resource for fonts, so that the available ones didn't depend on the skin. perhaps this 'sharedfonts' directory could be in addition to the skins font directory. the default fallback fonts could be in the 'sharedfonts' dir. in ooba i would have liked to be able to select a monospaced font so that i could display guitar tabs. a few different fonts like that could also be there.

i also like solexalex suggestion that a scripter could use his own fonts. perhaps wingdings would be great for some strange scripts?

a question: if you use a ttf, how do you select what size you want?
like windows has... there should be a 'universal' font folder and a failback font.

the failback should be resolution dependant, or scale according to resolution since 1080i is a tough one!
I'm not an expert but I play one at work.
Reply
#10
today appear a first attempt ?
Quote:25-06-2006 added: font fallback to "font13" if a requested font isn't available.
Reply
#11
i know they did the failback code but i'd think it would be best if the scripters updated to using the current fonts?
I'm not an expert but I play one at work.
Reply
#12
i'm not sure it is a good idea as every skin can choose its own font names... you'll have to keep uptodate as many versions as people use skins...
i developped many scripts, but i don't know at all what font names are available
Reply
#13
(solexalex @ june 25 2006,13:38 Wrote:i'm not sure it is a good idea as every skin can choose its own font names... you'll have to keep uptodate as many versions as people use skins...
i developped many scripts, but i don't know at all what font names are available
that is a problem then... the fonts should be universal 'unless' the script or skin includes a font itself.

it should be like an standard os (windows and osx)... you have fonts available to all applications.
I'm not an expert but I play one at work.
Reply
#14
sure !
that would definetly be the solution !
Reply
#15
i was in the process of updating a script and i thought it would be a good idea to make it compatible with the latest font names, then i got all confused. do we have a final list on what we can rely on for font names?

maybe theres a routine we can knock up that would detect available fontnames in fonts.xml or check for actual files (eg. common-font14.xpr?)

or do you think it would be too much of a fudge?
Reply

Logout Mark Read Team Forum Stats Members Help
BUG? Problem with ListControl on some scripts0