Bugzilla – Bug 6341
Chinese charactors shows up as blocks in Jive.
Last modified: 2011-05-16 16:53:35 UTC
Jive FW: 1 r1123 (from Richard) Problem: There are many Chinese songs have their titles, artists, and albums show up on SlimServer and MS MidiaPlayer as mumbo jumboes. This problem has been around for a while. Now, they show up on Jive as mumbo jumboes also. That is bad, but not totally unexpected. However, this user has finally aquired a Chinese song that shows on SqueezeCenter correctly, but the charactors show on Jive as blocks.
Created attachment 2511 [details] Chinese charactors are fine on SC but not on Jive.
Created attachment 2513 [details] Chinese show as mubo jumboes on MediaPlayer, SlimServer, and Jive.
andy i'm not sure how the shoutcast stations are imported, can you comment on this.
opps, commenting on wrong bug. Marking this for future, Chinese fonts are not yet supported.
Reset priority
Created attachment 4129 [details] Script to concatenate font files I ran into this limitation, and have come up with a temporary solution. Attached is a script that will combine two font files. When invoked as, fontcat.pl FontA.ttf FontB.ttf Out.ttf it will copy across any characters in FontB that are missing in FontA, and write the output to Out.ttf. The range of characters it attempts to copy can be limited by appending one or more ranges of the form U+1234-U+5678 to the argument list. The output font is a little buggy, for example, Character Map doesn't show the missing characters, and there are some structures that I'm not sure how to combine correctly. Nevertheless, combining FreeSans and CODE2000 yields a font that seems to work perfectly happily in Jive. I've not attached the resulting font file because CODE2000 isn't freely redistributable. Instead, here's an overview of the necessary steps to recreate it: Download fontcat.pl Install Font::TTF from http://search.cpan.org/~mhosken/Font-TTF-0.45/ Obtain FreeSans.ttf and FreeSansBold.ttf from http://www.gnu.org/software/freefont/index.html and place them in the same dir as fontcat.pl Obtain CODE2000.ttf from http://www.code2000.net/code2000_page.htm and place it in the same dir as well. Combine the two fonts: (be prepared to wait a few minutes) ./fontcat.pl FreeSans.ttf CODE2000.ttf FreeSans_CODE2000.ttf ./fontcat.pl FreeSansBold.ttf CODE2000.ttf FreeSansBold_CODE2000.ttf Copy the resulting files to the squeezebox controller: scp FreeSans_CODE2000.ttf root@SqueezeboxControllerIP:/usr/share/jive/fonts/FreeSans.ttf scp FreeSansBold_CODE2000.ttf root@SqueezeboxControllerIP:/usr/share/jive/fonts/FreeSansBold.ttf Reboot the Controller Done
Created attachment 4130 [details] Script to concatenate font files Bugfix: Compound glyphs weren't always copied correctly.
Resetting bug target/assigned
*** Bug 13624 has been marked as a duplicate of this bug. ***
The main problem is the included font not supporting asian languages. It is probably due to file-size and license issue that logitech decided not to include this support. However, we found that the open-source Google Android font is small in size, displays very well on small screens and supports a wide range of languages and character sets. It works perfectly fine. Please see details in this thread in the forum: http://forums.slimdevices.com/showthread.php?t=74977 It would be great if this could be incorporated in the firmware upgrade in the near future.
I have tried the Android font and there are still two problems, one minor but one grave: Minor: Some German 'Umlaute' are missing. Grave: Scrolling still becomes terribly slow and almost unusable on the Controller when CJK fonts are displayed, scrolling is fine otherwise.
As the name implies, the DroidSansFallback font seems to be intended to be used as a secondary font, filling in the gaps of the regular DroidSans font. You would have to combine DroidSans and DroidSansFallback into one to get the full Unicode range. Does anybody know whether the license allows derivative works?
I don't think there is any licensing issue here. The fonts can be used as is.
Unfortunately not. DroidSansFallback lacks many characters from the normal iso-8859-1 (western) range, for example the German letters ä and ö. That is unacceptable for German, Swiss, and Austrian users, so these would have to be added first.
DroidSansFallback has the issues with German and other characters and also results in slow scrolling of CJK characters in the playlists for me. I found and use another font, which needs to be licensed in commercial use but is free for personal use: Bitstream Cyberbit Logitech might want to buy a license for the future - but we as users should be allowed to put it now ourselves. - Downloaded here: http://aol-4.vo.llnwd.net/pub/communicator/extras/fonts/windows/ (link is taken from Wikipedia entry http://en.wikipedia.org/wiki/Bitstream_Cyberbit ) - The font is contained in the Cyberbit.ZIP, named Cyberbit.ttf It is rather large (13MB) but can be used in the /jive/fonts folder with two symbolic links (same method as for the Android font). Scrolling appears much faster than Android whilst supporting any characters I tried so far (German, Englisch, CJK, Spanish,...)
I've installed DroidSansFallback.ttf on the Touch. Chinese characters now display properly on the Now Playing screen, as well as when browsing directories when it's connected to SBS. However, when the Touch is connected to its own server, I am unable to browse to any directories where there is a file with Chinese characters. It just sits there showing a spinning icon when I press Right, instead of opening the directory. I can still Play the entire directory though, and the Now Playing screen would still display correctly.
Bitstream Cyberbit is too big for the Squeezebox Radio, and trying to copy it over will make you end up having to do a factory reset. But, being a little disappointed with the bugs in DroidSansFallback.ttf (missing certain characters, etc.) I decided to do some digging. You can use the open-source program FontForge to merge FreeSans.ttf with DroidSansFallback, so you can have the best of both worlds. Steps: 1. Open DroidSansFallback.ttf with FontForge. Go to Element >> Font Info >> General and then adjust the Ascent to 948 -- the Em Size will now be 1000. This ensures that DroidSansFallback and FreeSans are the same sizes when merged. Click OK, and wait while the conversion takes place. 2. File >> Generate Fonts. Turn off verification, and save the modified DroidSansFallback font (with a different name, if you like). 3. Now close that font, and load FreeSans.ttf (you can copy it from your Radio, or download it freely on the net). Go to Element >> Merge Fonts. Select the modified DroidSansFallback font. 4. Now, File >> Generate Fonts and save the merged font. Mine was 3.8MB -- small enough to fit on the Radio. Now copy it to Radio in the same way you do with the DroidSansFallback font. Works perfectly so far.
Wow, Julian-- very cool info
(In reply to comment #18) > Wow, Julian-- very cool info Additionally, I just realized that there's still space left over in the Radio for a modified FreeSansBold.ttf that also contains all the characters from DroidSansFB. Just added that, and now the Radio looks just the same as factory default, only can display everything :) Scrolling Chinese characters is still slower than regular latin text, though -- but that's not really a big deal for me.
For production firmware to the masses we will need to take a more detailed look at the memory implications of the merged font, particularly on Radio and Controller where memory is more at a premium. Also on the table is moving to the Droid font exclusively Thanks again for the font merging idea, it's an intriguing one
I've created a 3rd party applet to deliver the merged FreeSans/DroidSansFallback and FreeSansBold/DroidSansFallback. I'm going to contact the 3rd party devs to see about getting it included in the applet installer list. If I can get the applet in that set, it will be installable via Settings->Advanced->Applet Installer->Font Replacer (and after bug 17155 is resolved, that will change to App Gallery->3rd Party Apps->Font Replacer) The way the applet works is the following: Applet Installer installs the applet and restarts the squeezebox. An item is displayed on the top of the home menu for Font Replacer Follow this item and follow the steps to copy the font files to the correct location Squeezebox will restart, and after reboot the new font files will be loaded. Font Replacer item will no longer appear on the home menu
I should note that there was much consideration using this font in the stock firmware, but the CJK character set increases the size of the font file by about 8x, which is not going to be a good solution given some of our devices tight memory constraints. What I'm attempting to do to resolve this is provide a fairly simple means for people desiring a fuller font, esp. with regards to CJK characters, to achieve that goal.
I posted to the forums about getting the FontReplacer distributed via the 3rd party Applet Installer http://forums.slimdevices.com/showthread.php?p=627028#post627028
The FontReplacer applet is live now, and can be accessed via Settings->Advanced->Applet Installer->Font Replacer (make sure you uncheck the box for "recommended applets" as this applet has not yet been vetted into the reocmmended list) Font Replacer will overwrite the stock FreeSans and FreeSansBold fonts with the merged fonts as described by Julian in comment#17. After the font has been copied and the squeezebox restarted, the new fonts will be in use. If you perform a Factory reset, this will put the system back to the stock fonts again.
INstalled the Font Replacer on both the TOuch and the Jive: was able to view Chinese characters. 7.6.0 r 32419