<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>风叶 &#187; 字体下载</title>
	<atom:link href="http://blog.myhnet.cn/tag/%e5%ad%97%e4%bd%93%e4%b8%8b%e8%bd%bd/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.myhnet.cn</link>
	<description>秋湍泻石髓 风叶聚云根</description>
	<lastBuildDate>Fri, 20 Aug 2010 15:05:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>mplayer中文字幕乱码问题解决</title>
		<link>http://blog.myhnet.cn/2009/01/13/how-to-resolve-the-chinese-character-set-problem/</link>
		<comments>http://blog.myhnet.cn/2009/01/13/how-to-resolve-the-chinese-character-set-problem/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 13:04:08 +0000</pubDate>
		<dc:creator>myhnet</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[gb2312]]></category>
		<category><![CDATA[gbk]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[utf]]></category>
		<category><![CDATA[字符集]]></category>
		<category><![CDATA[字幕]]></category>
		<category><![CDATA[字体下载]]></category>
		<category><![CDATA[中文字体下载]]></category>
		<category><![CDATA[乱码]]></category>

		<guid isPermaLink="false">http://blog.myhnet.cn/?p=534</guid>
		<description><![CDATA[长期以后，最烦我的事情就是mplayer不能显示中文字幕。追朔原因，当然是字符集的问题。linux下的中文字符集都是utf的字符集，但是几乎所有的字幕文件用的都是GBK或者GB2312的字符集。再加上mplayer的字体设置问题，我的mplayer一直都看不到中文字幕。 不过，今天总算在网上找到答案了。 原来根本不复杂的，在mplayer的窗口点右键，选择Preference，然后设置Font，随便选一个，并设置字体的Code，比如用ubuntu自带的字体，就选unicode，然后把OSD/Sub编码选为字幕文件的编码，一般是Cp936。这样就OK了。 如下图所示： 如果你找不到相关的中文字体，可以用我的这个，点击下载字体。 附上官方的解决方法 配置中文字幕显示(可选) mkdir ~/.mplayerln -sf /usr/share/fonts/truetype/arphic/uming.ttf ~/.mplayer/subfont.ttfgedit ~/.mplayer/gui.conf sub_cp = &#34;cp936&#34;font_text_scale = &#34;4.000000&#34;font_osd_scale = &#34;4.000000&#34;sub_fuzziness=2 如果按照上的方法不行，无论GUI窗口还是命令行播放视频字幕都是横线，就请尝试下面的方法。 对于命令行播放 ～/.mplayer/config文件里加上 subcp=&#34;cp936&#34;font = &#34;/usr/share/fonts/truetype/arphic/uming.ttf&#34;subfont = &#34;/usr/share/fonts/truetype/arphic/uming.ttf&#34; 对于GUI窗口播放 在 MPlayer 点右键 Preferences -> Subtitle &#038; OSD -> Encoding，选择 Simplified Chinese charset (CP936)。 Preferences -> Font， 在 Font 处输入/usr/share/fonts/truetype/arphic/uming.ttf，在 Encoding 处选择 Unicode 如果还不行，就用以下的方法。只是不知道ubuntu 9.10用的是哪个版本的mplayer（据说是svn库里面的），最近中文字幕老是搞不定，折腾了一个晚上终于解决了。 解决方法其实很简单：方法一：修改LC_CTYPE，在/etc/environment文件中加入一行 [...]]]></description>
			<content:encoded><![CDATA[<p>长期以后，最烦我的事情就是mplayer不能显示中文字幕。追朔原因，当然是字符集的问题。linux下的中文字符集都是utf的字符集，但是几乎所有的字幕文件用的都是GBK或者GB2312的字符集。再加上mplayer的字体设置问题，我的mplayer一直都看不到中文字幕。</p>
<p>不过，今天总算在网上找到答案了。<br />
原来根本不复杂的，在mplayer的窗口点右键，选择Preference，然后设置Font，随便选一个，并设置字体的Code，比如用ubuntu自带的字体，就选unicode，然后把OSD/Sub编码选为字幕文件的编码，一般是Cp936。这样就OK了。</p>
<p>如下图所示：</p>
<p><a href="http://blog.myhnet.cn/wp-content/uploads/2009/01/screenshot-preferences-1.png" rel="lightbox[534]"><img src="http://blog.myhnet.cn/wp-content/uploads/2009/01/screenshot-preferences-1.png" alt="screenshot-preferences-1" title="screenshot-preferences-1" width="505" height="497" class="alignnone size-full wp-image-535" /></a></p>
<p><a href="http://blog.myhnet.cn/wp-content/uploads/2009/01/screenshot-preferences-font.png" rel="lightbox[534]"><img src="http://blog.myhnet.cn/wp-content/uploads/2009/01/screenshot-preferences-font.png" alt="screenshot-preferences-font" title="screenshot-preferences-font" width="505" height="497" class="alignnone size-full wp-image-536" /></a></p>
<p>如果你找不到相关的中文字体，可以用我的这个，点击<a href='http://blog.myhnet.cn/wp-content/uploads/2009/01/simfang.ttf'>下载字体</a>。</p>
<p><b>附上官方的解决方法</b><br />
配置中文字幕显示(可选)</p>
<div class="hl-surround"><div class="hl-main">mkdir ~/.mplayer<br />ln -sf /usr/share/fonts/truetype/arphic/uming.ttf ~/.mplayer/subfont.ttf<br />gedit ~/.mplayer/gui.conf</div></div>
<div class="hl-surround"><div class="hl-main">sub_cp = &quot;cp936&quot;<br />font_text_scale = &quot;4.000000&quot;<br />font_osd_scale = &quot;4.000000&quot;<br />sub_fuzziness=2</div></div>
<p>如果按照上的方法不行，无论GUI窗口还是命令行播放视频字幕都是横线，就请尝试下面的方法。</p>
<p>对于命令行播放</p>
<p>～/.mplayer/config文件里加上</p>
<div class="hl-surround"><div class="hl-main">subcp=&quot;cp936&quot;<br /><br />font = &quot;/usr/share/fonts/truetype/arphic/uming.ttf&quot;<br /><br />subfont = &quot;/usr/share/fonts/truetype/arphic/uming.ttf&quot;</div></div>
<p>对于GUI窗口播放 在 MPlayer 点右键<br />
Preferences -> Subtitle &#038; OSD -> Encoding，选择 Simplified Chinese charset (CP936)。<br />
Preferences -> Font， 在 Font 处输入/usr/share/fonts/truetype/arphic/uming.ttf，在 Encoding 处选择 Unicode 如果还不行，就用以下的方法。只是不知道ubuntu 9.10用的是哪个版本的mplayer（据说是svn库里面的），最近中文字幕老是搞不定，折腾了一个晚上终于解决了。</p>
<p>解决方法其实很简单：方法一：修改LC_CTYPE，在/etc/environment文件中加入一行 LC_CTYPE=zh_CN.utf8</p>
<p>方法二：在mplayer的preference的subtitles &#038; OSD中勾选上SSA/ASS subtitle rendering 这样也可以。</p>
<p>上述两种方法都可以解决中文字幕为横杠的问题，只是字体是系统的，不是你指定的。</p>
<p>方法三：哈哈，自己发现的，原来在mplayer的preferences的font页中，在选择字体的时候不能选择具体的字体文件，而是要输入字体名称。例如我用的是准圆字体，就不应该填写 ~/.fonts/ZhunYuan.ttf 而应该填写 ZhunYuan</p>
<p>如此这般，mplayer又恢复常态了。 </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.myhnet.cn/2009/01/13/how-to-resolve-the-chinese-character-set-problem/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
