Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Truetype fonts and japanese vertical text (was: Re: [BUG] libass: Japanese font with '@'-Prefix rendered wrong])
- Date: Mon, 15 Sep 2008 15:31:57 +0200
- From: Tobias Diedrich <ranma@example.com>
- Subject: [tlug] Truetype fonts and japanese vertical text (was: Re: [BUG] libass: Japanese font with '@'-Prefix rendered wrong])
- User-agent: Mutt/1.5.18 (2008-05-17)
Hi all, maybe someone knowledgeable here can/wants to comment on this? The substation alpha subtitle rendering engine used in MPlayer currently handles vertical fonts wrong. (@-prefixed Truetype fonts) Thanks, Tobias ----- Forwarded message from Evgeniy Stepanov <eugeni.stepanov@example.com> ----- Message-Id: <200809141809.13391.eugeni.stepanov@example.com> User-Agent: KMail/1.10.1 (Linux/2.6.27-2-generic; KDE/4.1.1; i686; ; ) Date: Sun, 14 Sep 2008 18:09:12 +0400 From: Evgeniy Stepanov <eugeni.stepanov@example.com> To: Tobias Diedrich <ranma+mplayer@example.com> Cc: mplayer-dev-eng@example.com Subject: Re: [BUG] libass: Japanese font with '@'-Prefix rendered wrong Hi, On Monday 08 September 2008 23:31:28 Tobias Diedrich wrote: > I noticed that libass renders japanese 'top to bottom' text wrong: > > This is what mplayer does: > http://uguu.de/~ranma/macrossf_18_lunar_mkv_libass_bug.png > > This is Aegisub (which for some unknown reason renders 声 as the > completely wrong character even though it's ok in the script...): > http://uguu.de/~ranma/macrossf_18_lunar_mkv_substationalpha.png > > Apparently, if a japanese fontname starts with @, the @ is stripped > and all characters of the font are prerotated by 90 degree. > This only happens for CJK characters though: > http://uguu.de/~ranma/macrossf_18_lunar_mkv_substationalpha2.png > > Here are two screenshots of the font dialog to illustrate that: > Font with @-Prefix (Note the sample area (サンプル)): > http://uguu.de/~ranma/macrossf_18_lunar_mkv_substationalpha3.png > Same font without @-Prefix: > http://uguu.de/~ranma/macrossf_18_lunar_mkv_substationalpha4.png > > This is the fansubs I used for the screenshots and where I extracted the > script+fonts from: > http://a.scarywater.net/lunar/%5BLunar%5D%20Macross%20Frontier%20-%2018%20% >5B1280x720%5D%5Bx264%5D%5BBF46689A%5D.mkv.torrent > > I had a cursory glance at the code and I think it might be a bit > more involving to add rotation based on fontname (and so far I haven't > found the time to dig into the code a bit more), so I'm posting it > to the list now. :) It seems, according to http://blogs.msdn.com/michkap/archive/2005/08/04/447759.aspx not all CJK glyphs have to be rotated. It is probably controlled by "vrt2" feature in GSUB table. This feature defines substitution of glyphs for vertical writing. As I guess, one needs to apply this substitution and then rotate all glyphs by 90 degrees. This article http://www.microsoft.com/OpenType/OTSpec/features_uz.htm#vrt2 suggests that latin characters (among others) should be substituted by themselves rotated 90 degrees _clockwise_. Thus, the described procedure will result in horizontally oriented glyphs. Can anyone confirm that this is the right way to deal with vertical text? Unfortunately, FreeType does not parse GSUB table, so it has to be done in libass (or an OpenType library like HarfBuzz should be used). Or we could go the easy way and define a set of characters that should not be rotated (in addition to non-CJK characters, it includes half-width kana, various CJK punctuation marks and probably more). This is not reliable, but might work in practice. ----- End forwarded message ----- -- Tobias PGP: http://9ac7e0bc.uguu.de このメールは十割再利用されたビットで作られています。
- Follow-Ups:
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Setting up a RAID 1 with Ubuntu (Was: Hard Drive Failure)
- Next by Date: Re: [tlug] Dinky computers
- Previous by thread: [tlug] ECO mode and microphone on the Let's Note Y7
- Next by thread: Re: [tlug] Truetype fonts and japanese vertical text (was: Re: [BUG] libass: Japanese font with '@'-Prefix rendered wrong])
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links