Skip to content

Add support for uppercase/lowercase in the font.xml <style> tag #966

Merged
merged 3 commits into from Jun 2, 2012

6 participants

@jmarshallnz
Team Kodi member

Also allows more than one style to be set (they're OR'd internally) using a space separated list.

@HitcherUK

Very welcome addition Jonathan but one question - how does it handle accents?

Thanks.

Team Kodi member

It handles Australian, New Zealand, English, Scottish, Irish, Canadian (not Quebec though) and US at least :p

It's exactly the same as it's always been basically. The only way to get full accent support is through use of ICU or similar, which I don't think anyone is working on.

OK thanks.

@PatFrost

hi,
very cool, I tested under window work fine, but no accents uppercase in french eg: Quebec :)

but with this subText.ToUpper(std::locale("")); at line 407 and 427 in GUITextLayout.cpp it's ok

sorry for french quote
[quote]
toupper() retourne la version en masjuscules du caractère passé en paramètre.
Le second paramètre de la fonction, locale(""), permet de prendre en charge les caractères spéciaux comme les accents.
Aucun paramètre signifie l'anglais. Une chaîne vide correspondra à la localité utilisée sur la machine,
et vous pouvez forcer l'utilisation d'une localité en entrant le nom de celle-ci.
[quote/]

screenshot: http://imageshack.us/photo/my-images/26/screenshot007w.png/

@jmarshallnz
Team Kodi member

Thanks @PatFrost - will investigate further.

@jmarshallnz
Team Kodi member

@PatFrost - the problem is that the ctype facet isn't transferred when we set the global locale. So no need to set locale in the ToUpper()'s once this is fixed.

@PatFrost

ah ok :)
but this 44c1ac4
fixe uppercase accent. yes !

@JezzX
Team Kodi member
JezzX commented Jun 2, 2012

Right finally got around to trying this and works as expected I do have a few minor pokes at it.
First is the options to put into are case sensitive and don&#39;t really match what the normal skin code is (they are the same as what it used to be) for example uppercase works but UPPERCASE doesn&#39;t when in the skin we normally use [UNNPERCASE][/UPPERCASE] so might be something to look at to get some uniformity?</p> <p>Also on a side note and probably unrelated to this change font clipping is bad in italics and the font gets cut off <a href="http://img703.imageshack.us/img703/6327/screenshot063ye.png">http://img703.imageshack.us/img703/6327/screenshot063ye.png</a></p>

@JezzX
Team Kodi member
JezzX commented Jun 2, 2012

wow git but royally is screwing up my last comment

@jmarshallnz
Team Kodi member

The style tag has always been case-sensitive. Having it so is fine IMO.

@JezzX
Team Kodi member
JezzX commented Jun 2, 2012

yeah it was more of consistency between how its done in the rest of the files but probably not something we want to mess with this late in the game since its always been lower case in that 1 file and upper case in the rest of the uses :)

@jmarshallnz jmarshallnz was assigned Jun 2, 2012
@jmarshallnz jmarshallnz merged commit 0d2cd50 into xbmc:master Jun 2, 2012
@babca
babca commented Sep 24, 2012

XBMC Frodo looks pretty ugly after this merge, the uppercase feature doesn't work well at least with French, Czech, Slovak, Hungarian...

http://imageshack.us/a/img834/8011/screenshot000m.png
http://imageshack.us/a/img585/6621/screenshot20120924at221.png
http://imageshack.us/a/img802/6621/screenshot20120924at221.png

I hope there is an easy fix for this :-)

@JezzX
Team Kodi member
JezzX commented Sep 24, 2012

Its just the font and always was like it you need to go into Settings\appearance\skin\ and change the "- fonts" to either "arial" or "Default no caps"

@HitcherUK

Is this platform dependant because it works on Windows but not openelec for me?

Windows - https://dl.dropbox.com/u/19745842/Images/screenshot000.jpg

OE - https://dl.dropbox.com/u/19745842/Images/screenshot001.jpg

@babca
babca commented Sep 26, 2012

Apparently, it is. I'm using Raspberry Pi (OpenELEC ARM), OpenELEC @ i386, OS X and iPad, the same issue across devices. It handles accents fine only on Windows.

"Its just the font" - I don't understand, the default font does contain ÁÍÉĚŠČŘŽÝÁÍÉÚŮ characters... There is an issue in a function converting strings to caps.

If any fix is not planned, thank you for a workaround – "Default no caps" is better than nothing :-)

@HitcherUK

@jmarshallnz Can you confirm platform dependency please?

Thanks.

@jmarshallnz
Team Kodi member

While this commit here doesn't have anything to do with it, but 44c1ac4 does.

By the looks there is a difference with Linux (.UTF-8 is appended) but I don't know if that's the problem you're facing.

@HitcherUK

@jmarshallnz just curious as to whether there will be a fix for Frodo as this is currently only works on Windows platforms, and Confluence uses it for the home screen so you might get reports about it.

Windows -

Windows

OpenELEC -

OpenELEC

@jmarshallnz
Team Kodi member

I don't have an openelec system so can't really test it there. I dunno if the same thing applies on OSX or not - will try and test it later.

@babca
babca commented Nov 21, 2012

Yes it applies to OS X too.

@HitcherUK

@jmarshallnz friendly bump as I'd just like to know whether to revert back to using a separate caps only font set.

Thanks.

@jmarshallnz
Team Kodi member

See #1887

@HitcherUK

Thanks, missed that one.

@ronie
Team Kodi member
ronie commented Dec 5, 2012

same issue on linux btw.

@HitcherUK

Another solution would be to use a caps only font for the home items but I'm not sure how easy that will be.

@ronie
Team Kodi member
ronie commented Dec 18, 2012

isn't that how confluence used to do it, before this change?
if i'm not mistaken it did include an all caps fontfile at one point.

no idea if it contained all charsets for all the languages though.

@HitcherUK

Just checked Eden and you're correct but for Frodo the style of font has changed as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.