<?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; font</title>
	<atom:link href="http://www.numericalfactor.org/wp/tag/font/feed" rel="self" type="application/rss+xml" />
	<link>http://www.numericalfactor.org/wp</link>
	<description>Numerical Factor</description>
	<lastBuildDate>Sun, 02 May 2010 09:50:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Emacs23（GTK+, Xft）で綺麗なフォント表示</title>
		<link>http://www.numericalfactor.org/wp/archives/174</link>
		<comments>http://www.numericalfactor.org/wp/archives/174#comments</comments>
		<pubDate>Sun, 01 Apr 2007 15:58:16 +0000</pubDate>
		<dc:creator>line</dc:creator>
				<category><![CDATA[font]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.numericalfactor.org/wp/archives/174</guid>
		<description><![CDATA[前にも試したんですがうまくいかなくてあきらめたコレ。要は Emacs において、メニューやファイル選択ダイアログなどの widget に GTK+ を使い、テキストは Xft を使ってフォントにアンチエイリアスをかけて綺 [...]]]></description>
			<content:encoded><![CDATA[<p>前にも試したんですがうまくいかなくてあきらめたコレ。要は Emacs において、メニューやファイル選択ダイアログなどの widget に GTK+ を使い、テキストは Xft を使ってフォントにアンチエイリアスをかけて綺麗に表示! というもの。結果は次の画像をどうぞ。</p>

<p><a rel="lightbox" href='http://www.numericalfactor.org/wp/wp-content/uploads/emacs-xft.png' title='emacs-xft.png'><img src='http://www.numericalfactor.org/wp/wp-content/uploads/emacs-xft-small.png' alt='emacs-xft-small.png' /></a></p>

<p>日本語フォントに <samp>M+1VM+IPAG circle</samp> とか使いたかったんですが、何故か SEGV で落ちるので <samp>Bitstream Vera Sans Mono</samp> を指定してます。あともう少し良い配色募集。 color-theme.el とかにないでしょうか。</p>

<p>どうやってこの Emacs を手に入れるかというと… Xft/GTK+ 付きでコンパイルして Ubuntu 向けにリポジトリを公開してくれてる人がいるので、それをありがたく使わせてもらいます。具体的には <a href="http://peadrop.com/blog/2007/01/06/pretty-emacs/">Alexandre Vassalotti &gt;&gt; Pretty Emacs</a> を参照。バイナリは Dapper/Edgy/Feisty のそれぞれに用意されてるみたいです。</p>

<p>インストール出来たら次のコマンドで目的の Emacs が起動。</p>

<pre><code>$ emacs-snapshot-gtk
</code></pre>

<p>いまのところ <kbd>C-\</kbd> で uim/Anthy が反応しなかったりして若干不便ではありますが。なかなか良いです。
とりあえず <samp>emacs-goodies-el</samp> とか入れてあるので、 <samp>*.el</samp> にシンボリックリンク張っときました。</p>

<pre><code>$ cd /etc/emacs-snapshot/site-start.d/
$ sudo ln -s ../../emacs/site-start.d/*.el .
</code></pre>

<p>これでいいのかはイマイチ分からないですが、元々の Emacs で使うためインストールした YaTeX が使えてるので多分大丈夫。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numericalfactor.org/wp/archives/174/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>太字で表示</title>
		<link>http://www.numericalfactor.org/wp/archives/166</link>
		<comments>http://www.numericalfactor.org/wp/archives/166#comments</comments>
		<pubDate>Sun, 18 Mar 2007 08:24:09 +0000</pubDate>
		<dc:creator>line</dc:creator>
				<category><![CDATA[font]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.numericalfactor.org/wp/archives/166</guid>
		<description><![CDATA[Firefox@Ubuntu Edgy では日本語のフォントを bold 指定しても bold で表示されないのが長らく不思議だったのですが、最近 bold で表示させる方法を知りました。

参考: 俺の話を聞け！

上 [...]]]></description>
			<content:encoded><![CDATA[<p>Firefox@Ubuntu Edgy では日本語のフォントを bold 指定しても bold で表示されないのが長らく不思議だったのですが、最近 bold で表示させる方法を知りました。</p>

<p>参考: <a href="http://blogs.itmedia.co.jp/oreore/2005/10/fedora_core__fe_ca95.html">俺の話を聞け！</a></p>

<p>上のリンク先をみればそれで済みますが、要点を述べると。日本語フォントには bold 体が用意されていないことが多く、その場合フォント描画側が bold 体を自動生成する必要が有り、そのためには ~/.fonts.conf に以下を書き込めば良いようです。</p>

<pre><code>&lt;match target="font"&gt;
 &lt;test name="weight" compare="less_eq"&gt;
  &lt;const&gt;medium&lt;/const&gt;
 &lt;/test&gt;
 &lt;test target="pattern" name="weight" compare="more"&gt;
  &lt;const&gt;medium&lt;/const&gt;
 &lt;/test&gt;
 &lt;edit name="embolden" mode="assign"&gt;
  &lt;bool&gt;true&lt;/bool&gt;
 &lt;/edit&gt;
&lt;/match&gt;
</code></pre>

<p>~/.fonts.conf は XML ファイルなので、単純に追記するだけではダメですが、タグの対応関係を見れば簡単に分かるでしょう。</p>

<p>結果:</p>

<p><a title="bold 有効" href="http://www.numericalfactor.org/wp/wp-content/uploads/0318-bold-enabled.jpg" rel="lightbox[boldfont]"><img src="http://www.numericalfactor.org/wp/wp-content/uploads/0318-bold-enabled-small.png" alt="0318-bold-enabled-small.png" /></a>
<a title="bold 無効" href="http://www.numericalfactor.org/wp/wp-content/uploads/0318-bold-disabled.jpg" rel="lightbox[boldfont]"><img src="http://www.numericalfactor.org/wp/wp-content/uploads/0318-bold-disabled-small.png" alt="0318-bold-disabled-small.png" /></a></p>

<p>ちなみに使用フォントは <a href="http://mix-mplus-ipa.sourceforge.jp/">M+1P+IPAG circle</a> で、これは <a href="http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/">M+</a> と <a href="http://www.grass-japan.org/FOSS4G/readme-grass-i18n-ipafonts.eucjp.htm">IPA フォント</a>を合成したフォント。</p>

<p>最新の Xft/FreeType/Fontconfig が入っている環境だと普通に bold 体が出るらしい。ちなみに Windows などはこのへんを最初からやってくれてるそうで、便利ですね!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.numericalfactor.org/wp/archives/166/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
