PDA

View Full Version : Japanese Fonts



waka
2005-07-24, 21:11
Hello.

I'm a Japanese SqueeseBox2 user.

I made a patch for SlimServer that allows to show Japanese characters on SqueezeBox2 by using GD::StringFT().

I'll attach it with some screen shots.

If SlimServer development team is under programming of this feature, I'm sorry to expose my poor imprementation.

Thanks.

dean
2005-07-25, 05:49
OUTSTANDING! BRILLIANT!

We'd love to see your patch. Please post.

Thanks!


On Jul 24, 2005, at 9:11 PM, waka wrote:

>
> Hello.
>
> I'm a Japanese SqueeseBox2 user.
>
> I made a patch for SlimServer that allows to show Japanese characters
> on SqueezeBox2 by using GD::StringFT().
>
> I'll attach it with some screen shots.
>
> If SlimServer development team is under programming of this feature,
> I'm sorry to expose my poor imprementation.
>
> Thanks.
>
>
> +-------------------------------------------------------------------+
> |Filename: 2.gif |
> |Download: http://forums.slimdevices.com/attachment.php?
> attachmentid=199|
> +-------------------------------------------------------------------+
>
> --
> waka
>

waka
2005-07-25, 07:48
OUTSTANDING! BRILLIANT!

We'd love to see your patch. Please post.


Yes. Here is the patch and instruction.
(This is almost same as previously attached .tar.gz. But I removed blank-only differnce.)

I think it is useful to display another Asian Languages such as Chinese and Korean.

Dan Sully
2005-07-25, 15:43
* waka shaped the electrons to say...

>dean Wrote:
>> OUTSTANDING! BRILLIANT!
>>
>> We'd love to see your patch. Please post.

Waka - looks good. I'm going to be integrating this in a more generic way, so
it's not so Japanese-centric. I've already gotten in working against a
Unicode TTF.

Question - why are you doing a Encode::guess on the title coming out of the DB?

The data going into the DB should be UTF-8. Is that not the case for you?

Thanks.

-D
--
<dr.pox> NO, NETBSD IS NOT REALLY BUILT WITH ELITE FORTRAN77!!@$#$

waka
2005-07-25, 17:16
> Question - why are you doing a Encode::guess on the title coming out of the DB?
>
> The data going into the DB should be UTF-8. Is that not the case for you?

# To handling Japanese encoding is not easy...

Because, if the song has no title in ID3 tag, its filename is used for title. The filename will be encoded by OS locale (euc-jp if Linux, shiftjis(cp932) if Windows). Others are not sure, so I tried to use Encode::guess.
It is better to do these processes during scanning of music library. It is wrong encoded (confused) in DB now.

Dan Sully
2005-07-27, 15:13
* waka shaped the electrons to say...

># To handling Japanese encoding is not easy...
>
>Because, if the song has no title in ID3 tag, its filename is used for
>title. The filename will be encoded by OS locale (euc-jp if Linux,
>shiftjis(cp932) if Windows). Others are not sure, so I tried to use
>Encode::guess.
>It is better to do these processes during scanning of music library. It
>is wrong encoded (confused) in DB now.

Ok - I'm still hesitant about that part of the patch - it would be much
better to do it as part of the scanning process.

Could you send me a zipped file who's filename is encoded as euc-jp or shiftjis?

I've adding a LRU cache for the rendered characters, so we have a memory bound on that.

We're also looking at using a Unicode TTF, so we get a lot of glyphs, not
just Japanese ones.

Thanks.

-D
--
Adobe Photoshop - When you want the truth. Real bad.

waka
2005-07-27, 16:44
I'll make some mp3 files that have Japanese filename and ID3tag later.

The patch for Slim::DataStores::DBI::DataModel is not needed.
Now I can see Japanese filename or song information almost perfectly. Please see this patch. (It's not include around TTF issue)

I found a important bug in MP3::Info::mp3_gettag() at ID3v1 parsing. It uses Encode::encode but it should be Encode::decode. (But I added some Encode::Guess feature...)

Dan Sully
2005-07-27, 17:08
* waka shaped the electrons to say...

>I found a important bug in MP3::Info::mp3_gettag() at ID3v1 parsing. It
>uses Encode::encode but it should be Encode::decode. (But I added some
>Encode::Guess feature...)

Could you send me an example file that demonstrates the bug?

Thanks.

-D
--
<jwb> burning substations is manifestly the desire of the free market. hooray for utility deregulation
<jwb> the government would never be able to set fires with such brutal efficiency

Dan Sully
2005-07-27, 17:12
Also - what's the purpose of this line in Slim/Display/Graphics.pm ?

+ # Convert local encodings (euc-jp, shift_jis, ...) to UTF-8
+ $string = Slim::Utils::Misc::utf8decode_guess($string);

It doesn't appear to do anything - is this again a not-UTF-8 in the DB issue?

-D
--
<jwb> burning substations is manifestly the desire of the free market. hooray for utility deregulation
<jwb> the government would never be able to set fires with such brutal efficiency

waka
2005-07-28, 17:14
Also - what's the purpose of this line in Slim/Display/Graphics.pm ?

+ # Convert local encodings (euc-jp, shift_jis, ...) to UTF-8
+ $string = Slim::Utils::Misc::utf8decode_guess($string);


That's right. It's out of date.
All strings are UTF-8 at this stage.

dean
2005-07-28, 17:32
Waka,

I've been trying to email you directly without success. Can you send
me an email to dean (AT) slimdevices (DOT) com?

Thanks,

dean

waka
2005-07-28, 17:55
Yes. I received your mail.
I send you a reply just while ago.

Thanks :)

Dan Sully
2005-07-29, 13:56
* waka shaped the electrons to say...

>> + # Convert local encodings (euc-jp, shift_jis, ...) to
>> UTF-8
>> + $string =
>> Slim::Utils::Misc::utf8decode_guess($string);
>
>That's right. It's out of date.
>All strings are UTF-8 at this stage.

Ok - thanks. Are you needing the changes to Misc.pm encode_guess /
encode_locale for ID3v1.x or v2.1 tags that aren't in UTF-16 or UTF-8 already?

-D
--
"It has become appallingly obvious that our technology has exceeded our humanity." - Albert Einstein

waka
2005-07-30, 00:34
Hello.



Ok - thanks. Are you needing the changes to Misc.pm encode_guess /
encode_locale for ID3v1.x or v2.1 tags that aren't in UTF-16 or UTF-8 already?


The encode functions (UTF8 -> shiftjis, euc, ... and other encodings) are not necessary for slimserver, I think.