NEW! Internationalization Support Announcement
#46
(yuvalt @ sep. 14 2004,07:17 Wrote:
(droopy @ sep. 13 2004,22:19 Wrote:i noted that smbdirectory.cpp unconditionally call g_charsetconverter.utf8tostringcharset(dirent->name, strfile), which convert unicode file name to native encoding, the file name then will be converted back from native encoding to unicode before it is displayed, this does not make much sense.
also xdk suggests using ttf font should be avoided since it degrades performance a lot. anyway bitmap font is for console and ttf font is for office application.
droopy,

since xbmc does not use wchar_t throughout the code we decided to use this method. if you are willing to volunteer and change all the code, add #define unicode and make it work, i'd be happy.

the xdk does not say that ttf should be avoided but say that it less performant. in tests i did, it consumes less memory than xpr font (since we use many fonts in the skin). i did not see any performance degradation.

any constructive ideas?

-yuval
most xbox kernel functions are ansi only. i think it is almost impossible to change xbmc to compile with unicode defined. but why don't treat every string as utf-8 string, it is ansi compatible and only need to convert back to unicode before displaying it.
with newest cvs build, it can not display unicode file name with chinese character in smb share properly. filenames in smb share come with two flavors unicode and native encoding(such as gbk), i think it should be treated differently in the program.
i made a gbk xpr font with 7000 charaters. it includes all level 1 and level 2 chinese chararters and all japanese characters. 3000 chinese characters in level 1 cover 99% of everyday used chars. it uses 2048x2048 texture in font buldler and takes 8m in file size. i'll be glad to submit it.
can you tell me where to submit it?
Reply
#47
(gwlip @ sep. 14 2004,15:05 Wrote:hi yuvalt,

great work again.  just a minor issue with the weather. the deg celsius symbols do not work correctly.
my settings are as follows:-
resolution:- ntsc 4:3
language:- english
skin fonts:- arial ttf (arialuni.ttf taken from msoffice 2003)
charset:- chinese traditional (big 5) or chinese simplified (gbk) both will display an unknown chinese character instead of the degrees celsius symbol.

hope you can fix this as well.. thanks a million again!
you cannot see the degrees character properly due how the unicode solution is working. maybe we should remove this sign from xbmc completely??

hmmm..

-yuval
Reply
#48
(droopy @ sep. 14 2004,15:44 Wrote:most xbox kernel functions are ansi only. i think it is almost impossible to change xbmc to compile with unicode defined. but why don't treat every string as utf-8 string, it is ansi compatible and only need to convert back to unicode before displaying it.
with newest cvs build, it can not display unicode file name with chinese character in smb share properly. filenames in smb share come with two flavors unicode and native encoding(such as gbk), i think it should be treated differently in the program.
i made a gbk xpr font with 7000 charaters. it includes all level 1 and level 2 chinese chararters and all japanese characters. 3000 chinese characters in level 1 cover 99% of everyday used chars. it uses 2048x2048 texture in font buldler and  takes 8m in file size.  i'll be glad to submit it.
can you tell me where to submit it?
you are right -- it probably be better of to change the internal encoing in xbmc to utf-8 instead of native one. i will think about it some more and may change the way it is implemented.

regarding the native character set smb shares -- how can i distinguish between them? is it a property of the share? basically smb is utf-8 (at least what i've seen).

regarding your xpr font -- you can upload it to this page.. problem with xpr fonts is that you need multiple sizes to work with the skin properly and it consumes a lot of memory. much more than ttf.

-yuval



Reply
#49
is it able to change the ttf fonts size to bigger? because it is too small to display on tv :verysad:

thanks xbmc team for the hard working :bowdown:
Reply
#50
you can edit xbmc\skin\project mayham\<resolution>\font.xml which contains the font sizes (under the arial.ttf fontset>

-yuval
Reply
#51
(lovebeta @ sep. 13 2004,14:37 Wrote:
(yuvalt @ sep. 13 2004,04:12 Wrote:please explain the detailed steps that do not work so i can try to reproduce.

thanks,

-yuval
the steps are fairly easy.

1. install the latest cvs build;
2. install the movie trailer python script (aqtbrowser2.py);
3. change the font to "arial ttf", (no need to change charset etc);  i'm using arialuni.ttf, but i think i tried original arial.ttf and i believe both didn't work;
4. launch the moive trailer, everything looks fine so far;
5. select any trailer to play, and select, say, medium quality;
6. oops, it will freeze at the popup box "enable mplayer osd".

sorry i don't have a screenshot though.
i'm experiencing this problem too. stream just stops at dialog box displaying "enable mplayer osd".

also it seems that font sizes can only be altered under <font101>. changing sizes other tags seem to have no effect on gui display. maybe i was wrong though so can someone give a little insight here?
Reply
#52
i looked again into the code and it seems that you were right. the size written in font.xml was not handled properly. it is now fixed and in cvs. this should resolve all the issues people had here with sizes, i hope.

-yuval
Reply
#53
is the cvs updated with the fix? the changelog says nothing about it though. can't wait to test it :nuts:
Reply
#54
forgot to ask one more thing. is it possible to have a mix of ttf and xpr display on the gui? the thing is i wanna use ttf just on filename display and put xpr for the rest. played with font.xml before, no go. perhaps i'm not as bright as i thought.
Reply
#55
(yuvalt @ sep. 15 2004,05:58 Wrote:you can edit xbmc\skin\project mayham\<resolution>\font.xml which contains the font sizes (under the arial.ttf fontset>

-yuval
ok, which part should i edit it? there has many part of arial.ttf
Quote:  <fontset id="arial ttf">
       <font>
         <name>font18</name>
         <filename>arial.ttf</filename>
         <size>20</size>
       </font>
     
       <font>
         <name>font13</name>
         <filename>arial.ttf</filename>
         <size>19</size>
       </font>
     
       <font>
         <name>font14</name>
         <filename>arial.ttf</filename>
         <size>19</size>
       </font>
     
       <font>
         <name>font64</name>
   <filename>common-font64.xpr</filename>
       </font>
     
       <font>
         <name>matrix8</name>
         <filename>matrix8.xpr</filename>
       </font>
     
       <font>
         <name>font04</name>
         <filename>arial.ttf</filename>
         <size>19</size>
       </font>
     
       <font>
         <name>font15</name>
         <filename>arial.ttf</filename>
         <size>19</size>
       </font>
     
       <font>
         <name>font10</name>
         <filename>arial.ttf</filename>
         <size>16</size>
       </font>
     
       <font>
         <name>font12</name>
         <filename>arial.ttf</filename>
         <size>16</size>
       </font>
     
       <font>
         <name>fontkb</name>
   <filename>common-font13.xpr</filename>
       </font>
     
       <font>
         <name>font101</name>
         <filename>arial.ttf</filename>
         <size>15</size>
       </font>
     </fontset>
Reply
#56
its there. since it was a quick fix for something that was only checked in two days ago i decided not to bother everyone about this.

-yuval
Reply
#57
Quote:ok, which part should i edit it? there has many part of arial.ttf

i suggest you take the cvs code from today. it fixed a major bug in reading font.xml so it might just work fine for you out-of-the-box.

-yuval
Reply
#58
(emefbiemef @ sep. 15 2004,16:23 Wrote:forgot to ask one more thing. is it possible to have a mix of ttf and xpr display on the gui? the thing is i wanna use ttf just on filename display and put xpr for the rest. played with font.xml before, no go. perhaps i'm not as bright as i thought.
sure you can. even today there are two or three fonts which are xpr. the thing is that the fonts are arranged by size and not by meaning, so you may need to modify the skin for that. look at the font in mymusic in the list control and change it to another font.

-yuval
Reply
#59
i looked into mymusicplaylist.xml and found the listcontrol tag but i can't find any reference that define the font and size used. i look again in myvideo.xml and myfiles.xml but again, none of them has font defined in their listcontrol tag.
this one is from mymusicplaylist.xml
Quote:    <control>
     <description>listcontrol</description>
     <type>listcontrol</type>
     <id>50</id>
     <posx>211</posx>
     <posy>121</posy>
     <onleft>51</onleft>
     <onright>51</onright>
     <onup>2</onup>
     <ondown>2</ondown>
   </control>
a little :help: please?
Reply
#60
that's because it is taking the defaults. the defaults are defined in references.xml. look in there what's the default. you can always override it in the component by adding <font>xxx</font>

-yuval
Reply

Logout Mark Read Team Forum Stats Members Help
NEW! Internationalization Support Announcement0