Bug 16812 - Cyrillic characters in Artist name can corrupt display while browsing
: Cyrillic characters in Artist name can corrupt display while browsing
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Display
: 7.6.0
: PC Debian Linux
: P2 normal (vote)
: 7.6.0
Assigned To: Alan Young
: charset_issues
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-19 23:47 UTC by Alan Young
Modified: 2011-05-12 09:53 UTC (History)
2 users (show)

See Also:
Category: Bug


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Young 2011-01-19 23:47:23 UTC
This is a spin-off from bug 14832.

The ip3k player-UI display can be corrupted when browsing an Artist with a cyrillic name. Presumably the same issues occur for albums and genres.

To recreate, browse: My Music / Artists / Συλλογές
There are several issues:
1. the all-caps version of "Συλλογές" in line-1 of the display is wrong
when in that display-mode (standard).
2. the album name in line-2 is corrupted (overlayed) with some other glyphs in
display-mode standard.
3. The artist name ("Συλλογές"), which should be on line-1 in 2-line
mode, is instead superimposed on the album name in line-2.
Comment 1 Andy Grundman 2011-01-20 05:15:03 UTC
This is more likely related to the new use of Font::FreeType which replaced GD for font rendering.
Comment 2 Adrian Smith 2011-01-30 14:21:19 UTC
Alan, does the following help?

(the LRU cache is currently caching by ord and hence being reused for the same ord even if it should be a different size or line)

--- Slim/Display/Lib/Fonts.pm   (revision 31864)
+++ Slim/Display/Lib/Fonts.pm   (working copy)
@@ -415,7 +415,7 @@
 
                        if ($ord > 255 && $useTTFNow) {
 
-                               my $char_bits = $TTFCache{$ord};
+                               my $char_bits = $TTFCache{"$FTFontSize.$FTBaseline.$ord"};
 
                                if ( !$char_bits ) {
 
@@ -467,7 +467,7 @@
 
                                        $char_bits = pack "B*", $bits_tmp;
 
-                                       $TTFCache{$ord} = $char_bits;
+                                       $TTFCache{"$FTFontSize.$FTBaseline.$ord"} = $char_bits;
                                }
 
                                if ($cursorpos) {
Comment 3 Alan Young 2011-02-01 23:03:22 UTC
This thread also seems to be relevant: http://forums.slimdevices.com/showthread.php?t=84163
Comment 4 SVN Bot 2011-02-01 23:07:07 UTC
 == Auto-comment from SVN commit #31872 to the slim repo by ayoung ==
 == http://svn.slimdevices.com/slim?view=revision&revision=31872 ==

Fixed bug 16812: Cyrillic characters in Artist name can corrupt display while browsing 
Patch from Triode to ensure render cache takes into account font size and position (line).
Comment 5 Alan Young 2011-02-01 23:13:48 UTC
Thanks Triode.
Comment 6 Paul Chandler 2011-05-12 09:53:48 UTC
Verified using that same artist name --pasted into the artist tag of a Russion mp3. Artists name displays correctly on classic and touch
7.6.0. 32407