XFree86 Font Deuglification HOWTO を推敲するスレ
■ このスレッドは過去ログ倉庫に格納されています
0001調整人
NGNG2ch 翻訳第 2 段の SGML 化が完了したので、新しくスレを作らせてもらいました。
URI は
http://linuxlovers.yi.org/softarc/FDU.sgml
http://linuxlovers.yi.org/softarc/FDU.html
です。
web だといちいちダウンするのが面倒かもしれないので、
このスレの 2 以降に SGML をコピペしますので、校正はそいつで
お願いします。
0002調整人
NGNG<Title>XFree86 のフォントを汚なくなくする HOWTO</Title>
<!--
<Para>
How to improve ugly and unreadable X Window fonts. Various tips for
improving font handling for XFree86, including sections on font servers,
TrueType fonts, Netscape, and related topics.
</Para>
-->
<Para>
ここでは X Window System での汚くて読みづらいフォント環境を改善する方法や
XFree86 においてフォントの取り扱いを改善する為のいろいろなヒントを紹介します。
またフォントサーバ、TrueType フォント、Netscape とそれらに関連する
話題にふれます。
</Para>
0003調整人
NGNG<!-- <Title>Introduction</Title> -->
<!-- <Para>
One of the most annoying problems many of us are faced with is the
poor default fonts and font settings of X as implemented by many
distributions. I'm talking specifically about <Ulink
url="http://www.xfree.org">XFree86</Ulink>, other versions of X may be
better. Many programs use fixed width default fonts when a variable width
font would be more appropriate. Other programs use fonts that are
so small as to be practically unreadable. The fonts that are bundled with
XFree86 are not of the same quality as found on some other platforms. XFree86
does come with a halfway decent courier font, but its Times and Helvetica
fonts are simple bitmap fonts that pixelize when they are scaled. Yuck!
</Para> -->
<Para>
我々の多くが直面するもっとも悩ましい問題の一つは、多くのディストリビューションで
実行される X のデフォルトフォントとフォント設定が貧弱であることです。
私はここで <Ulink url="http://www.xfree86.org">XFree86</Ulink> について話しています。
他のバージョンの X では改善されているかもしれません。
多くのプログラムでは可変幅のフォントがふさわしいだろう時でも
等幅なデフォルトフォントを使っています。
また他のプログラムではほとんど読めないほど小さいフォントを使っていたりします。
XFree86 に付属しているフォントは、いくつかの他のプラットフォームで見られるのと
同じ程度の品質はありません。courier については少しはまともなフォントがついてきますが、
Times と Helvetica にいたっては単なるビットマップフォントしかついてこないので、
拡大させるとぎざぎざが目立ってしまいます。逝ってよし!
</Para>
0004調整人
NGNGfonts, and do other things that should greatly improve the appearance and
readability of fonts on the X Window Desktop. This is done by adjusting the
<Literal>FontPath</Literal> in the <FileName>XF86Config</FileName> file, by
adding switches to X server command line in <Command>startx</Command> or
<Command>xdm</Command> (and variants), by adding new fonts, and by installing
a TrueType font server and fonts. TrueType does indeed make a huge
difference.
</Para> -->
<Para>
この HOWTO はフォント設定のいろいろな調整法や、新しいフォントのインストールの仕方、
それに様々な X Window System 上のデスクトップでのフォントの見た目と読み易さを
大幅に改善する方法を紹介することを意図しています。
すなわち次のようなことを紹介しようと思います。
</Para>
<ItemizedList>
<ListItem>
<Para>
<FileName>XF86Config</FileName> ファイルの <Literal>FontPath</Literal> の調整法。
</Para>
</ListItem>
<ListItem>
<Para>
<Command>startx</Command> や <Command>xdm</Command> (とその亜種) に、
X サーバのコマンドラインに渡すスイッチを追加する方法。
</Para>
</ListItem>
<ListItem>
<Para>
TrueType フォントサーバとフォントをインストールする方法。
TrueType は本当に劇的な違いをもたらします。
</Para>
</ListItem>
</ItemizedList>
0005調整人
NGNGComments, corrections, additions and critiques are always welcome. You can
reach the authors at <email>[email protected]</email>,
or <email>[email protected]</email>. Contributions are also welcomed. Especially
anyone who really stays current with KDE and/or Gnome issues!
</Para> -->
<Para>
意見、訂正、追記、批判等は常時歓迎しています。
筆者には <email>[email protected]</email> または <email>[email protected]</email>
にて連絡がつきます。寄稿も歓迎します。特に最新の KDE あるいは Gnome の追っかけを
やってる人!
</Para>
# ↑この最後の行、わかんない
0006調整人
NGNG<Title>Conventions Used in this Document</Title>
<Para>
<ItemizedList>
<ListItem>
<Para>
Where examples of commands are used, a <quote>#</quote> character is used to
denote where typically the command would be run as the root user. A
<quote>$</quote> is used where typically a non-root user would be executing
the command.
</Para>
</ListItem>
<ListItem>
<Para>
The examples use <FileName>/usr/local/share/fonts/ttfonts</FileName> as our
TrueType font directory. There is no magic to this location, and could
conceivably just as well be in any number of other locations.
</Para>
</ListItem>
<ListItem>
<Para>
References to "xfs" are to the xfs as packaged by Redhat for versions 6.x
and later. This differs significantly in some respects from the stock
XFree86 xfs.
</Para>
</ListItem>
<ListItem>
<Para>
References to "Netscape" are to the entire suite of programs from Netscape:
Communicator, Navigator, Messenger, etc. For all intents and purposes, font
configuration in Mozilla is very similar.
</Para>
</ListItem>
<ListItem>
<Para>
'XF86Config' is the X configuration file. For Redhat based distros, as of
Redhat 7.0, this is now 'XF86Config-4' for XFree86 4.x. For the most
part, we'll just use 'XF86Config' here.
</Para>
<Para>
Also, while some aspects of XFree86 4.x configuration are the same as
3.3.x, there are some significant differences. We'll only highlight the
differences. So unless noted otherwise, any comments or examples will
apply to both 3.x and 4.x versions.
</Para>
</ListItem>
<ListItem>
<Para>
File system layout varies somewhat from distribution to distribution. It
is impossible to stay on top of every conceivable variation of who keeps
which files where. So take the examples here with a grain of salt if the
PATHs don't seem to match your system.
</Para>
</ListItem>
</ItemizedList>
</Para>
0007調整人
NGNG<Title>Change Log and What's New</Title>
<Para>
<ItemizedList>
<ListItem>
<Para>
1.70: April 18, 2001:
Added links for converting Mac TrueType Fonts (thanks to Karl A. Krueger),
links to Unicode TrueType fonts (thanks to Tzafrir Cohen for suggestions
and URLs), and added a section on anti-aliasing with X 4.0.2 (or greater).
Also, included a reference to <Ulink
URL="http://www.kyz.uklinux.net/cabextract.php3">cabextract</Ulink>, a
utility that is now available for extracting Win32 Fonts (among other
things) from a Window's <Quote>cab</Quote> archive.
</Para>
</ListItem>
<ListItem>
<Para>
1.60: March 21, 2001:
A few very minor changes. Most notable news is anti-aliasing support now
in XFree 4.02 (referenced in the Notes section only). Chinese translation
URL added.
</Para>
</ListItem>
<ListItem>
<Para>
1.55: Oct 11, 2000:
Additional info on XFree86 4.x, especially Redhat's changes for RH7.0. A few
other minor updates and additions. Also adding a neglected credit to Kristin
Aanestad for his insight into much of what this document is all about.
</Para>
</ListItem>
<ListItem>
<Para>
1.5: July 25, 2000:
New sections added on fonts.alias, XFree86 4.x, and xfsft. Miscellaneous
other changes and additions. Also, includes new Links and Notes sections,
as well as a rewrite of the xfs sections. Various other changes and
additions.
</Para>
</ListItem>
<ListItem>
<Para>
1.0: Nov. 23, 1999: Converted document to SGML, for submission to the Linux
Documentation Project. Removed Plea for
Help.
</Para>
</ListItem>
<ListItem>
<Para>
0.1: Feb. 21, 1999: First release.
</Para>
</ListItem>
</ItemizedList>
</Para>
0008調整人
NGNG<Title>New Versions</Title>
<Para>
The pre-release versions of this document can be found at
<Ulink URL="http://feenix.burgiss.net/ldp/fdu/index.html">http://feenix.burgiss.net/ldp/fdu/index.html</Ulink>.
</Para>
0009調整人
NGNG<Title>Copyright</Title>
<Para>
Copyright © 1999 by Doug Holland.
</Para>
<Para>
Unless otherwise stated, Linux HOWTO documents are copyrighted by their
respective authors. Linux HOWTO documents may be reproduced and distributed
in whole or in part, in any medium physical or electronic, as long as this
copyright notice is retained on all copies. Commercial redistribution is
allowed and encouraged; however, the author would like to be notified of any
such distributions.
</Para>
<Para>
All translations, derivative works, or aggregate works incorporating any
Linux HOWTO documents must be covered under this copyright notice. That is,
you may not produce a derivative work from a HOWTO and impose additional
restrictions on its distribution. Exceptions to these rules may be granted
under certain conditions; please contact the Linux HOWTO coordinator for more
information.
</Para>
<Para>
In short, we wish to promote dissemination of this information through as
many channels as possible. However, we do wish to retain copyright on the
HOWTO documents, and would very much like to be notified of any plans to
redistribute the HOWTOs, this one in particular! Web page authors are free
to link to this HOWTO without restriction, though the author would appreciate
an email informing him of this, just so he can boost his ego by knowing who
else reads and links to this document.
</Para>
<Para>
Many of the terms mentioned in this document are trade names. Unless
otherwise stated, all trademarks are property of their respective owners.
</Para>
0010調整人
NGNG<Para>
<MSGText>
<LiteralLayout>
Created by Doug Holland.
Email: <Ulink URL="mailto:[email protected]">[email protected]</ULink>
WWW: <Ulink URL="http://www.frii.com/~meldroc/">http://www.frii.com/~meldroc/</ULink>
</LiteralLayout>
</MSGText>
</Para>
<Para>
<MSGText>
<LiteralLayout>
Updated and maintained by Hal Burgiss.
Email: <ULink URL="mailto:[email protected]">[email protected]</ULink>
WWW: <Ulink URL="http://feenix.burgiss.net/ldp/fdu">http://feenix.burgiss.net/ldp/fdu/</ULink>
</LiteralLayout>
</MSGText>
</Para>
<Para>
Special thanks go to:
<ItemizedList>
<ListItem>
<Para>
The developers of the <Ulink URL="http://www.xfree86.org">XFree86 Project</Ulink>,
for all the hard work and time they have given. Also, Juliusz Chroboczek for
his work with xfsft, and XFree86 4.x to help bring TrueType to the
hungry masses. And Keith Packard for his anti-aliasing, and other work.
This is not to slight the many, many other XFree86 volunteers.
</Para>
</ListItem>
<ListItem>
<Para>
Font wizard Kristin Aanestad, whose legwork and insight on much of the xfs,
TrueType, Netscape, and especially, the fonts.alias sections are much
appreciated. More from Kristin at <Ulink
url="http://home.c2i.net/dark/linux.html">Some Linux for Beginners</Ulink>
on a wide range of topics.
</Para>
</ListItem>
<ListItem>
<Para>
The folks at <Ulink URL="news:comp.os.linux.x">comp.os.linux.x</ULink> who
gave me a hand in figuring all of this out in the first place.
</Para>
</ListItem>
<ListItem>
<Para>
The Linux community in general who made all of this possible
in the first place. Especially those who have offered suggestions and
comments that help to make this HOWTO a better resource.
</Para>
</ListItem>
<ListItem>
<Para>
Microsoft and Apple: for providing the fonts that adorn my
desktop.
</Para>
</ListItem>
</ItemizedList>
</Para>
0011調整人
NGNG<Para>
Chinese: <Ulink URL="http://www.linux.org.tw/CLDP/mini/FDU.html">http://www.linux.org.tw/CLDP/mini/FDU.html</Ulink> by Yu-Chia Chang.
</Para>
0012調整人
NGNG<Title>X サーバの設定</Title>
<!-- <Para>
There are a few easy steps that can be taken that will help X do its job
better.
</Para> -->
<Para>
X によりよい仕事をさせる手助けになるであろう簡単な処置がいくつかあります。
</Para>
0013調整人
NGNG<Title>FontPath の設定</Title>
<!-- <Para>
The first place to look for curing font problems is the
<FileName>XF86Config</FileName> file.
<FileName>/usr/X11/lib/X11/XF86Config</FileName> or
<FileName>/etc/X11/XF86Config</FileName> are the common locations. (This may
be <FileName>XF86Config-4</FileName> for XFree86 4.x.) If you haven't
guessed already, the most important part of this file relating to fonts is
the <Literal>FontPath.</Literal> Before we get into that, this would be a
good time to check the other parts of your X configuration. Bad monitor
settings can be even more of a headache than bad fonts, so make sure your
refresh rate is as high as your monitor can handle (85 Hz is great, 75 Hz is
OK, 60 Hz is painful.)
</Para> -->
<Para>
フォント問題を解決することを期待する最初の箇所は <FileName>XF86Config</FileName>
ファイルです。
<FileName>/usr/X11/lib/X11/XF86Config</FileName> または
<FileName>/etc/X11/XF86Config</FileName> がもっとも一般的です。
(XFree86 4.x では XF86Config-4 になっている可能性もあります)
もうおわりかとは思いますが、ここでフォントに関してもっとも大切な部分は
<Literal>FontPath</Literal> です。
読み進める前に X の他の設定を見直すのも良いでしょう。
悪いモニターの設定は悪いフォントの設定以上の頭痛の素になることがあります。
ですからリフレッシュレートがモニタが追従できる限り高く設定されていることを
確認してください (85 Hz ならば松、75 Hz なら竹、 60 Hz は梅です)。
</Para>
0014調整人
NGNGUse your favorite text editor and edit
<FileName>XF86Config</FileName>. Near the top of the file in the
"Files" section, you should see something vaguely like this:
</Para> -->
<Para>
お好みのテキストエディタを使って <FileName>XF86Config</FileName> を編集してください。
ファイル先頭周辺の "Files" セクションに
このような表記が漠然と見られるはずです -
</Para>
<BlockQuote>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
</LiteralLayout>
</MSGText>
</Literal>
</Para>
</BlockQuote>
0015調整人
NGNGThis much should be the same, or at least similar, for both XFree86 3.x and
4.x. The <Literal>FontPath</Literal> tells X where to find the fonts it uses
to render text on your display. Order is important - when an X application
asks X to render some text, the X server usually has some leeway to choose the
font that is used. The X server then goes through the
<Literal>FontPath</Literal> and grabs the first font it sees that matches the
X client's criteria, and then displays. (Note that Redhat's xfs for versions 6.x
and later has a different way of setting the <Literal>FontPath</Literal>. See
the <xref LinkEnd="xfs"> below for more on xfs.)
</Para> -->
<Para>
これとほぼ同じ表記が XFree86 バージョン 3.x と 4.x の両方にあるはずです。
この <Literal>FontPath</Literal> は X に画面描画に用いるフォントを
どこから探すべきかを指示します。順番が重要なことに気を付けてください -
X アプリケーションが X にテキスト描画をお願いした時、 X サーバは通常フォントの選択に
ある程度の自由度を持ちます。そして X サーバは <Literal>FontPath</Literal>
を順番に見ていき、最初に見つかったクライアントの要求を満たすフォントを用いて
描画するのです (RedHat のバージョン 6 以降向けの xfs はこれと異なる
<Literal>FontPath</Literal> 設定を用いることに注意してください)。
xfs についてより詳しくは下の <xref LinkEnd="xfs"> を参照してください。
</Para>
0016調整人
NGNGIf the 100dpi fonts are not listed, they probably did not get installed for
whatever reason, so you may want install them now. Default installations
may put 75dpi fonts before the 100dpi fonts. If you have a high
resolution display (1024x768 or higher), this means very tiny fonts. If this
is the case, the first tweak you'll use is to switch the 75dpi and 100dpi
FontPath lines:
</Para> -->
<Para>
100dpi のフォントが載っていなかった場合、
おそらく何らかの理由によりインストールされなかったのでしょう。
それで今、インストールする必要があるかもしれません。
デフォルトのインストールでは 75dpi のフォントが 100dpi のフォントより前に
書かれているかもしれません。もし高解像度のディスプレイ (1024x768 以上)
を使っているのならば、それは非常に小さいフォントであることを意味します。
この場合、あなたが使う最初のヒネリは 75dpi と 100dpi の
FontPath 行を入れ替えることです -
</Para>
<BlockQuote>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
</LiteralLayout>
</MSGText>
</Literal>
</Para>
</BlockQuote>
0017調整人
NGNGNext, specify that you prefer to use unscaled bitmap fonts. If you've ever
used Netscape or any other program that displays titles using big fonts,
you'll likely notice that those fonts are pixelized. This is ugly and needs
to be corrected. So add <Literal>:unscaled</Literal> to the ends of the misc,
100dpi and 75dpi fonts. You can even use both unscaled and scaled fonts if
you want, just put the unscaled <Literal>FontPath</Literal> lines first to
tell X you prefer unscaled fonts if possible:
</Para> -->
<Para>
次に、スケール無しのビットマップフォントを使いたいかどうか明示します。
もしネットスケープか、似たような大きいフォントを用いてタイトルを表示するプログラムを
使ったことがあるなら、これらのフォントがピクセル化してしまうことをご存知でしょう。
これは醜くいもので訂正する必要があります。
ですので <Literal>:unscaled</Literal> を misc, 100dpi および 75dpi フォントの
最後に追加してください。スケール有り/無しの両方を使うこともできます。
unscaled <Literal>FontPath</Literal> 行を先に記述して X にあなたが
スケーリングなしを好むことを指示してください -
</Para>
<BlockQuote>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/Type1"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo"
FontPath "/usr/X11R6/lib/X11/fonts/misc"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi"
</LiteralLayout>
</MSGText>
</Literal>
</Para>
</BlockQuote>
0018調整人
NGNGAfter making these changes, restart X. Doesn't the desktop look better
already?
</Para> -->
<Para>
これらの変更を行ったら、X を再起動します。既にデスクトップが綺麗になっていませんか?
</Para>
0019調整人
NGNG<Title>X サーバのコマンドラインオプション</Title>
<!-- <Para>
The next thing you need to do is adjust the command line options for the X
server. You'll want to use the <Literal>-dpi</Literal> switch which specifies
the display resolution in dots per inch. As a lot of systems use high
resolution displays these days, chances are they'll be working at 100
dpi.
</Para> -->
<Para>
次に行うことは X サーバのコマンドラインオプションの調整です。
画面解像度を 1 インチ毎のドット数で指定する <Literal>-dpi</Literal> スイッチが
必要になります。最近のシステムの多くは高解像度のディスプレイを用いていますから、
既に 100dpi で稼動していることも多いでしょう。
</Para>
<!-- <Para>
If you start X from the console command prompt, type:
</Para> -->
<Para>
X をコンソールから起動している場合、このようにタイプしてください:
</Para>
<Para>
<Literal>
$ startx -dpi 100 -depth 16 -bestRefresh
</Literal>
</Para>
<Para>
Or these options can be stored in <Filename>~/.xserverrc</FileName>. See the
<Command>startx</Command> and <Command>xinit</Command> man pages for more on
this.
</Para>
<!-- <Para>
If you use xdm (or friends such as gdm) for graphical logins, you'll want to
edit your <FileName>/usr/X11/lib/X11/xdm/Xservers</FileName> file (or
possibly <FileName>/etc/X11/xdm/Xservers</FileName>) which will have the
command line for the Xserver in it. Mine has the line:
</Para> -->
<Para>
もし xdm (または友達関係にある gdm) をグラフィカルログインに用いている場合、
<FileName>/usr/X11/lib/X11/xdm/Xservers</FileName>
(<FileName>/etc/X11/xdm/Xservers</FileName> かもしれません)
ファイルを編集する必要があるでしょう。これは Xserver の為のコマンドラインを
含んでいます。私の場合以下のようにしています -
</Para>
<Para>
<Literal>
:0 local /usr/X11R6/bin/X -dpi 100 -gamma 1.6
</Literal>
</Para>
<Para>
Note that there is no magic to <Quote>-dpi 100</Quote>. Choose something
higher if your hardware will support it ?? like <Quote>-dpi 120</Quote>.
</Para>
<Para>
More information is in the <Command>X</Command>, <Command>Xserver</Command>,
<Command>xdm</Command>, <Command>xinit,</Command> and
<Command>startx</Command> man pages.
</Para>
0020調整人
NGNG</Title> -->
<Title >TrueType フォント - 数少ない Windows の長所のひとつ
</Title>
<!-- <Para>
Because the boys at Redmond are very concerned with the appearance of their
software (as opposed to the internal workings ;) they built TrueType font
support into Windows. And of course no big surprise, but they got the idea
from Apple. In fact, TrueType is a registered trademark of Apple Computer,
Inc. Windows 9x and nearly every other incarnation of Windows comes with
Arial, Times New Roman, and Courier New, which are roughly equivalent to
Helvetica, Times and Courier. TrueType fonts are scalable, so they look good
in large sizes, and they are well hinted, so they are readable at small
sizes. Many windows applications come with dozens more TrueType fonts.
Don't microwave your Windows CD yet, you'll want to get those fonts first!
</Para> -->
<Para>
レッドモンドの連中は、自分たちのソフトウエアの見た目にすごーく拘っている
(中身とは正反対だね ;)。
だから Windows には TrueType フォントのサポートが含まれています。
もちろんそんなに驚くことではないですが、このアイデアは Apple
から持ってきたものです。実際、TrueType は Apple Computer, Inc. の
登録商標になっています。
Windows 9x とそれに類する OS にはすべて Ariel, Times New
Roman および Courier New の各フォントがついてきます。
これらはそれぞれ Helvetica, Times そして Courier にだいたい対応します。
TrueType フォントはスケーラブルなので、大きなサイズでも見栄えがよい。
さらにいろいろなヒントが加えられていて、これらは小さめのサイズでも見やすいです。
多くの Windows アプリケーションには、追加の TrueType フォントが何十とついてきます。
Windows の CD を電子レンジで焼くのにはまだ早いよ! まずフォントをゲットしとかなきゃ。
</Para>
<!-- <Para>
Unfortunately, XFree86 3.x does not come with built in TrueType support, so
you'll have to add it yourself (see below). This will mean installing a font
server that does support TrueType and, of course, installing the fonts
themselves. XFree86 4.x does have built in support however (see <Xref
LinkEnd="x-4x">). You won't find many decent TrueType fonts included with any
distribution. The likely reason is that there are not many quality TrueType
fonts available under a suitable license at this time.
</Para> -->
<Para>
残念なことに XFree86 3.x には組み込みの TrueType フォントサポートがありませんでした。
だから自分で追加しなければいけないことになります (以下を参照)。
これは TrueType をサポートしたフォントサーバをインストールし、それともちろん、
フォント自身もインストールすることを意味します。
これにひきかえ XFree86 4.x には TrueType フォントサポートが組み込まれています
(<Xref LinkEnd="x-4x"> を参照)。
どのディストリビューションにもまともな TrueType フォントはついてきませんが、
これはたぶん現時点では適切なライセンスをもった質のいいフォントがないためでしょう。
</Para>
0021調整人
NGNG<Title>Making TrueType Fonts Available</Title>
<Para>
Let's start with the fonts first. Any TrueType font included with the various
MS Windows incarnations should work. Don't forget word processors and other
apps that may include their own fonts. MacOS fonts will only work if
converted to a usable format. (See the <Link LinkEnd="links">links
section</Link> for converter packages.) There are also some 'free' TrueType
fonts available for download if you have already nuked that CD (see <Link
LinkEnd="links">links section</Link>).
</Para>
<Para>
In order to use TrueType, the fonts will have to be always accessible to the
font server. This means they will have to be on a filesystem that is
<Emphasis>always</Emphasis> mounted. This can conceivably be a Windows
partition on a dual boot system. Alternately, the fonts can be copied to
Linux. First <Command>su</Command> to root:
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
# su -
# mkdir -p /usr/local/share/fonts/ttfonts
</LiteralLayout>
</MSGText>
</Literal>
</Para>
<Para>
Now, change to the new font directory:
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
# cd /usr/local/share/fonts/ttfonts
</LiteralLayout>
</MSGText>
</Literal>
</Para>
<Para>
Then, add the fonts to this directory, either by copying them from your
Windows system:
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
# cp /mnt/<path_to_fonts>/*ttf .
</LiteralLayout>
</MSGText>
</Literal>
</Para>
<Para>
or by downloading those available directly from
<Ulink URL="http://www.microsoft.com/typography/fontpack/default.htm">Microsoft</Ulink>.
These fonts are in self-extracting zip archives. The ones labeled for use
with Windows 3.1 can indeed be unpacked under Linux with the Linux
<Command>zip</Command> utility:
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
# ls *exe | xargs -n 1 unzip -L
</LiteralLayout>
</MSGText>
</Literal>
</Para>
0022調整人
NGNGコピペは不要だったかな?
<Para>
The '-L' option will convert to lower case font names (this may be necessary for
some versions of xfsft and Redhat's xfs). Note that the current Linux zip
utility does not work with the 32 bit Win9x font archives. (It also looks
like Microsoft no longer has the 16 bit Arial, Courier and Times-Roman on
this site.) But these can be unarchived under Linux with
<Command>cabextract</Command>, which can be found
<Ulink
URL="http://www.kyz.uklinux.net/cabextract.php3">http://www.kyz.uklinux.net/cabextract.php3</Ulink>.
This would now seem to be the best way to go since there is a better
selection of fonts.
</Para><Para>
Or you can get an RPM of WebFonts that contains some of the MS
TrueTypes <Ulink
URL="http://rpmfind.net/linux/RPM/contrib/noarch/noarch/webfonts-1-3.noarch.html">here</Ulink>.
This has enough basic fonts to keep Netscape and other web browsers happy.
</Para>
<Para>
You will also have to include the new TrueType directory(s) in the X server's
fontpath. So with your text editor of choice add the line(s) as appropriate:
</Para>
<BlockQuote>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
FontPath "/usr/local/share/fonts/ttfonts"
FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/Type1"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo"
FontPath "/usr/X11R6/lib/X11/fonts/misc"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi"
</LiteralLayout>
</MSGText>
</Literal>
</Para>
</BlockQuote>
0023調整人
NGNG<Para>
There are several font servers available that will do the job: xfstt, xfsft,
and Redhat's patched version of xfs based on xfsft. While these names are all
too similar, these are different packages. One, or more, of these should be
included with any recent Linux distribution, and you may have one installed
already.
</Para>
<Para>
Historically, font servers were used to serve fonts over a network. Font
resources could then reside on one host, and clients could access them as
needed. But, the developers have enhanced these to include features such as
the ability to render TrueType fonts. (XFree86 4.x has this ability included
already, and thus an additional font server is not really needed solely
for the purpose of having TrueType support.)
</Para>
0024調整人
NGNG<Para>
One such font server is xfstt. xfstt was designed specifically with TrueType
fonts in mind.
</Para>
<!-- ~~~~~ New Section ~~~~~ -->
<Sect4>
<Title>Installation</Title>
<Para>
xfstt is <emphasis>very</emphasis> easy to install and configure. If it isn't
already installed, you'll want to download the tarball, or check your CD. The
most current version can be found at <Ulink
URL="http://metalab.unc.edu/pub/Linux/X11/fonts/">http://metalab.unc.edu/pub/Linux/X11/fonts/</ULink>
</Para>
<Para>
Once you have the tarball, unpack it:
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
$ tar -zxvf xfstt-*tgz
</LiteralLayout>
</MSGText>
</Literal>
</Para>
<Para>
Then build and install it. Read the <FileName>INSTALL</FileName> file for
quick instructions, but it's a no brainer.
</Para>
<Para>
From the xfstt directory is all you have to do.
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
# make
# make install
</LiteralLayout>
</MSGText>
</Literal>
</Para>
<Para>
Then start xfstt with:
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
# xfstt --sync # updates xfstt's font database
# xfstt ? # runs xfstt in the background.
</LiteralLayout>
</MSGText>
</Literal>
</Para>
<Para>
xfstt should be started before the X server starts. Once you have this working
correctly, you can add the above lines to
<FileName>/etc/rc.d/rc.local</FileName>, or other suitable start up file. Then
type:
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
$ xset +fp unix/:7101 # tells X about xfstt, and where to look for fonts.
</LiteralLayout>
</MSGText>
</Literal>
</Para>
<Para>
or add:
</Para>
<BlockQuote>
<Para>
<Literal>
FontPath "unix/:7101"
</Literal>
</Para>
</BlockQuote>
<Para>
to your <FileName>XF86Config</FileName> to tell X about the font
server. Rerun <Command>xfstt --sync</Command> any time the FontPath, or
contents, change.
</Para>
</Sect4>
0025調整人
NGNG<Para>
If your TrueType fonts appear to be very tiny, the following commands
may help.
</Para>
<Para>
Add the <Literal>-dpi</Literal> switch to your X server command
line (see section 3 above to do this.)
</Para>
<Para>
Use the <Literal>--res</Literal> switch to tell xfstt to increase
the default resolution. Use the following command line.
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
# xfstt --res 120
</LiteralLayout>
</MSGText>
</Literal>
</Para>
</Sect4>
</Sect3>
<!-- ~ End Section ~ -->
<!-- ~~~~~ New Section ~~~~~ -->
<Sect3 id="xfs">
<Title>Redhat's xfs</Title>
<Para>
As of Redhat Linux 6.0, Redhat based distributions (Mandrake, etc) have
included a specially patched version of xfs, the XFree86 Font Server, and
patched X servers as well. Redhat's xfs includes the xfsft patch set which in
turn is built upon the FreeType Font library. Redhat's xfs provides similar
functionality to xfstt. xfs is able to serve both TrueType and Type 1 fonts,
as well as legacy X fonts.
</Para>
<Para>
If you are using a Redhat based distro, you should have xfs installed
already. If not, it is in the <FileName>XFree86-xfs*rpm</FileName>. To make
sure it runs as one of the default services, either use
<Command>ntsysv</Command> or:
</Para>
<Para>
<Literal>
# chkconfig --add xfs
</Literal>
</Para>
<Para>
Now xfs will start every time you boot.
</Para>
0026調整人
NGNGいい気分しないな。
<Title>Setting the xfs FontPath</Title>
<Para>
The default Redhat installation of xfs serves fonts via a Unix Domain Socket.
We'll need to tell the X server where to look for xfs, and thus fonts. The
FontPath in <FileName>/etc/X11/XF86Config</FileName> must include for Redhat
6.x:
</Para>
<BlockQuote>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
FontPath "unix/:-1"
</LiteralLayout>
</MSGText>
</Literal>
</Para>
</BlockQuote>
<Para>
This is changed for Redhat 7.x to:
</Para>
<BlockQuote>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
FontPath "unix/:7100"
</LiteralLayout>
</MSGText>
</Literal>
</Para>
</BlockQuote><Para>
At least for a default configurations. This is a reference to the socket where
xfs is listening. You may include additional FontPaths, but these will be
handled by the X server, and not xfs. A clean install of Redhat 6/7 should
have this already set up, but if you are upgrading from an older version, you
may have to change this yourself!
</Para>
<Para>
xfs then has its own, separate FontPath stored in
<FileName>/etc/X11/fs/config</FileName>. This is where it will look to find
fonts. This is over and above the X server's FontPath in
<FileName>XF86Config</FileName>. You can either add the new path(s) with a text
editor, or use the <Command>chkfontpath</Command> command:
</Para>
<Para>
<Literal>
# chkfontpath --add /new/font/path
</Literal>
</Para>
<Para>
The FontPath must exist before running <Command>chkfontpath</Command>. The
relevant section of <FileName>/etc/X11/fs/config</FileName> should now look
something like this:
</Para>
<BlockQuote>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled,
/usr/X11R6/lib/X11/fonts/100dpi:unscaled,
/usr/X11R6/lib/X11/fonts/75dpi:unscaled,
/usr/X11R6/lib/X11/fonts/Type1,
/usr/X11R6/lib/X11/fonts/Speedo,
/usr/X11R6/lib/X11/fonts/misc,
/usr/X11R6/lib/X11/fonts/100dpi,
/usr/X11R6/lib/X11/fonts/75dpi,
/new/font/path
</LiteralLayout>
</MSGText>
</Literal>
</Para>
</BlockQuote>
<Para>
When adding a new FontPath for TrueType fonts, you will want to do this
step after installing and preparing the fonts. See the next section.
</Para>
0027調整人
NGNG<Para>
We still have a bit of work to do before we can actually use any TrueType
fonts. xfs requires a few things to be in order. First, all font files must
have lower case names for xfs. Secondly, they shouldn't have embedded spaces.
And then, we will need to create a couple of files to make things go.
</Para>
<Para>
Su to root, and change to the directory where the TrueType fonts are.
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
# su -
# cd /usr/local/share/fonts/ttfonts
</LiteralLayout>
</MSGText>
</Literal>
</Para>
<Para>
If there are any upper case font names, you can use the following script to
convert all names to lower case:
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
#!/bin/sh
#
## -------- convert upper to lower case ---------
ls * | while read f
do
if [ -f $f ]; then
if [ "$f" != "`echo \"$f\" | tr A-Z a-z`" ]; then
#Note that 'This' will overwrite 'this'!
mv -iv "$f" "`echo \"$f\" | tr A-Z a-z`"
fi
fi
done
## eof
</LiteralLayout>
</MSGText>
</Literal>
</Para>
0028調整人
NGNGNote the punctuation ?? the backquotes are important! Remove any spaces from
font names too. Once the TrueType fonts are properly installed, you must
create both <FileName>fonts.dir</FileName> and
<FileName>fonts.scale</FileName> files. The following commands do this:
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
# ttmkfdir -o fonts.scale
# mkfontdir
</LiteralLayout>
</MSGText>
</Literal>
</Para>
<Para>
You should now have <FileName>fonts.dir</FileName> and
<FileName>fonts.scale</FileName> files in your TrueType font
directory. <Command>ttmkfdir</Command> is in the
<FileName>Freetype</FileName> RPM, and must be run
before <Command>mkfontdir</Command>. With Debian based distros, there
is a similar utility called <Command>mkttfdir</Command>, and is in the
<Filename>fttools</FileName> Deb package. Though this apparently does not
generate as many encodings as <Command>ttmkfdir</Command>. These commands
may not always report errors, so verify that they were created and are not
empty files:
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
$ ls -l fonts.*
-rw-r--r-- 1 root root 11657 Aug 17 10:31 fonts.dir
-rw-r--r-- 1 root root 11657 Aug 17 10:31 fonts.scale
</LiteralLayout>
</MSGText>
</Literal>
</Para>
0029調整人
NGNGIf you encounter any problems, try <Command>ttmkfdir</Command> with the
<Command>- m</Command> switch. This will discard bad characters from the
font file. Specify a number such as 50 or l00
(<Command>ttmkfdir -m 50</Command>). The files themselves are text files.
Have a look:
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
$ less fonts.dir
114
webdings.ttf -microsoft-Webdings-medium-r-normal--0-0-0-0-p-0-microsoft-symbol
verdanaz.ttf -microsoft-Verdana-bold-i-normal--0-0-0-0-p-0-ascii-0
verdanaz.ttf -microsoft-Verdana-bold-i-normal--0-0-0-0-p-0-fcd8859-15
verdanaz.ttf -microsoft-Verdana-bold-i-normal--0-0-0-0-p-0-iso8859-15
verdanaz.ttf -microsoft-Verdana-bold-i-normal--0-0-0-0-p-0-iso8859-9
verdanaz.ttf -microsoft-Verdana-bold-i-normal--0-0-0-0-p-0-iso8859-1
[...]
</LiteralLayout>
</MSGText>
</Literal>
</Para>
<Para>
Next, update the FontPath and xfs:
</Para>
<Para>
<Literal>
<MSGText>
<LiteralLayout>
# chkfontpath --add /usr/local/share/fonts/ttfonts
# /etc/rc.d/init.d/xfs restart
</LiteralLayout>
</MSGText>
</Literal>
</Para>
<!--
<Para>
Rerun the first and last of these commands anytime your add or remove fonts.
<Command>xset +fp</Command> only needs to be run when adding a new font
directory to an existing Fontpath.
</Para>
-->
<Para>
You should now be in business. You can check which fonts are available to X:
</Para>
<Para>
<Literal>
$ xlsfonts | less
</Literal>
</Para>
<Para>
or check them out further with <Command>xfontsel</Command>, or
<Command>gfontsel</Command>. If they are visible to
<Command>xlsfonts</Command>, then they are available to X and vice versa. If
they are not there, try restarting X with Ctrl-Alt-BS.
</Para>
0030調整人
NGNGweb ブラウザで見てる人、特にすいません。
このスレはなかったことにしてください。削除依頼も出しておきました。
ほんと厨房やってしまってすいません。
0031調整人
NGNG削除されるまで、このスレは絶対に age ないでください。
「調整人氏ね」などの書き込みは sage で行ってください。
0032名無しさん@お腹いっぱい。
NGNG0033名無しさん@一周年
NGNG0034掃除中
NGNG0035掃除中
NGNG0036掃除中
NGNG0037掃除中
NGNG0038掃除中
NGNG0039掃除中
NGNG■ このスレッドは過去ログ倉庫に格納されています