Font shaping function - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Font shaping function (/showthread.php?tid=13230) Pages:
1
2
|
- Nibras - 2005-07-02 hi all, i have the code for implementing font shaping. it is a simple method of "lookup and replace". the function the do the font shaping takes a string as an argument and returns the string with the proper font shape. can someone give me a few pointer on how subtitles are displayed. this was mint to be a helper function for fribidi. as fribidi does not support font shaping and the developers are working on that issue for version 2. the code for the function Quote:#define n_distinct_characters 36 thanks in advance for any help ps : orginal coder mohamed abdel-monem - jmarshall - 2005-07-02 the code to display subs is in xbmc/guiwindowfullscreen.cpp. it runs a routine in the charsetconvertor - that would probably be the place to put it. let me know how it goes. cheers, jonathan font shaping integration - Nibras - 2008-03-12 Sorry for the huge delay, I have finished integrating the font shaping functionality of Arabic characters in XBMC ( thanks "jmarshall" for the help ) . XBMC can now display CP1256 and UTF-8 characters set (using arial.ttf) in skins and subtitles with font shaping. However, there are some problems still exist for iso8859-6 charset. I'll try looking into it as soon as I can. Ps: I uploaded a patch into the SVN. XBMC Skin before Arabic font shaping XBMC Subtitles before Arabic font shaping XBMC after Arabic font shaping XBMC Skin using Arabic CP1256 XBMC subtitle in Arabic CP1256 XBMC subtitle in Arabic UTF-8 More reading material... - Gamester17 - 2008-03-12 For reference, more discussion about character joining/shaping for Semitic languages files (Amharic, Tigrinya, Hebrew, Farsi...) here: http://forum.xbmc.org/showthread.php?tid=12637 and here: http://forum.xbmc.org/showthread.php?tid=31425 and here: http://forum.xbmc.org/showthread.php?tid=21599 - Nibras - 2008-03-30 I have altered the rss handling routine so it can now handle RSS feeds in Arabic correctly. However, the feed is scrolling from right to left and it should be for RTL languages (at least Arabic) left to right. Can someone point me how I can achieve this. code for handling bidi RSS feeds Code: if (m_shouldFlip) moreover, if the RSS feed is encoded in UTF-8, the bidi routin isn't called so I had to add an optional gui setting to force bidi that only affects the RSS display routine. Or perhaps the routing should see if the displayed Charest in xbmc is bidi then it should force bidi conversation!? Code: if (g_charsetConverter.isBidiCharset(m_encoding) || g_guiSettings.GetBool("locale.forcbidi")) RSS feed in complex Arabic script (using arial.ttf unicode) the GUI option to force RSS feeds to be handled by the bidi implementation. Ps. It goes without saying that to have complex Arabic script in xbmc gui and subtitles, arial.tff Unicode must be used And the original fribidi implementation in xbmc hasn't been altered. - napox - 2008-05-14 ^ Please inform if you find a way to change the movement of the RSS from right to left. thanks ahead. - exxo - 2008-07-11 Did this go any further? Didnt it get to the SVN? Im curious because i want to translate XBMC to pashto - yuvalt - 2008-07-27 I just committed this patch. It's a modified version of nirbas but performs the same. Let me know if there are any issues with it. RSS is still scrolling in the "wrong" way. -Yuval - exxo - 2008-07-27 Sooo... Does that mean that font shaping will work in the next build of XBMC? - yuvalt - 2008-07-27 Yes, for linux/windows/mac. For XBOX someone will need to backport it. - exxo - 2008-07-27 I'm not really a programmer but is that a hard task? - yuvalt - 2008-07-27 Shouldn't be too difficult. Just look the change set in SVN. - exxo - 2008-07-27 I don't really have a hold of these kind of things so i wanted to ask if you could have a look at it if you can do it. - yuvalt - 2008-07-27 Ah, sorry I don't have XDK nor an environment to fix it. Some other devs might. - exxo - 2008-07-27 Alright... thanks for all your help. Anybody else up for helping me out? |