[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

回覆: 中文化的問題



> 新的 xfs-xtt 預設似乎使用 port 7110 ( 你可以用 grep PORT
> /etc/init.d/xfs-xtt 確定 )
> 將之改成:
> FontPath "unix/:7110"
> 

不能用"unix/:7110",會當機。目前測試到是,7101 和 7100 可以用,不過都不可以顯示中文。

我下載了 CLOS 的中文化套件,可是一樣失敗,只有 rxvt 可以用,也可以顯示中文,不過 Netscape 和 xcin 都不能用,原因不明。

在 CLOS 的 newsgroup 上找到有人寫了一份有關在 CLOS 使用 True Type Fonts 的 HOWTO,已附在郵件上。因為我有中文的 ttf ,所以就按照這份 HOWTO ,再做一次。這一次終於可以在 Control Centre 中選擇中文字型了,可是顯示出來的卻是亂碼,不管繁體或簡體都一樣。

剛剛才知道,原來我的 CLOS 1.0 是用比較舊的 debian ,好像說是 potato 之前的版本。請問這個對中文化有影響嗎?還是舊版 debian 有不同的中文化方法?

對 CLOS 太失望了,加上 Corel 已停止發展後續的版本,所以也不想升級去 CLOS 2.0 了。想要改用 debian ,可是要下載又太麻煩了,我只有 56k 的 modem ,而且也沒有 CDR ,下載後也不能用。而且聽說 debian 對初學者會很難,請問是真的嗎?我不是要架網站,也不是要做 LAN (可能明年才會做 LAN),只是想學一些 Linux 的 programming 。請各位給我一點意見好嗎?
          COREL LINUX TRUE TYPE FONTS MINI HOWTO

The following material was developed, and permission given to re-post, by
Jim Riedmueller, <vmlinuz@sdf.lonestar.org> ;  minor edits have been made by
Debra Earle <newsgroups@intranet-works.com>

Version 0.5, 17 January 2000
[Posted to Corel Newsgroups Servers on 21 October 2000 and 1 Feb 2001]

Making True Type Fonts available for use with Corel Linux

1. Introduction
       1.1 ChangeLog

2. Required Software
       2.1 How and Where to get it
              2.1.1 xfs
              2.1.2 xfstt
              2.1.3 True Type Fonts

3. Adding Fonts and Configuring X
       3.1 Adding fonts to your system
       3.2 Configuring X to find your true type fonts
       3.3 Finishing the installation

4. Credits and Legalities

===========================================================

1. Introduction

I decided to create this mini HOWTO after seeing numerous requests for help
with setting up Corel Linux to use true type fonts. Being a long time
victim of the ugly X desktop, and having just recently figured it all out, I
decided it'd be best if I wrote it down. Corel Linux is a commercial
distribution based on Debian, and as such, the setup is biased towards the
Debian way of doing things. A lot of information is available on how to
set up true type fonts with Redhat and other distributions, but the
information doesn't correctly apply to Corel Linux. So...here it is.

This file (in the standard HOWTO format) is also available at
http://vmlinuz.freeshell.org/corel/true-type.html.
The flat-format version is available at
http://vmlinuz.freeshell.org/corel/flat-true-type.html

1.1 Change Log

0.1 - Posted messages on corelsupport.linux.corellinux
0.3 - Wrote it all down myself. Researched some of the available Mini HOWTOs
to see if I was being redundant
0.5 - Assembled in standard and flat HOWTO format and submitted to newsgroup


2. Required Software

To make True Type Fonts available to Corel Linux, you need the following
software:

xfs - The X Font Server: Set up by default, this server provides the
   standard fonts to X.
xfstt - The X True Type Font Server: This server will provide the true type
   fonts to X.
fonts - Some True Type Fonts: The fonts you want

2.1 How and Where to get it

2.1.1 XFS

XFS is installed by default on your Corel Linux system...you already have it
:) .
XFS can also provide true-type font services, through the use of another
library called freetype. Adding how to use these two to provide true type
fonts is my single "TODO" item.

2.1.2 XFSTT

XFSTT is available from the Debian servers. It is not provided with Corel
Linux 1.0 (Download Version). To get XFSTT...

 1.Run Corel Update
 2.Select Options and Set File Sources from the menu bar
 3.Put a check in the Custom Path(s) box
 4.Put a check next to the line that says deb
http://www.us.debian.org/debian slink main contrib non-free and click OK
 5.Update your profile
 6.Move to the Available Software tab, and click the + next to X11
 7.Scroll down the list until you see xfstt. Click the red X to its left to
change it to black and red arrows
 8.Select File and Upgrade & Install packages
 9.Wait for the box that says all upgrades, installations, and removals have
been completed.

XFSTT is now running on your machine!

2.1.3 True Type Fonts

True Type Fonts are available all over the place. If you have a Windows
partition or a windows machine on your network that you can access, look
in c:\Windows\Fonts . If you have no Windows available to you...first pat
yourself on the back, and then head out to the web. Here are some links:
(Warning...these are sites with free stuff...expect a lot of ads)

       Font Freak - http://www.fontfreak.com/
       1001 Free Fonts - www.1001freefonts.com
       Typesource - http://www.typesource.com/
       Acid Cool - http://www.acidfonts.com/
       Free Fonts - http://www.thefreesite.com/font.htm

There are many many free font sites...fire up your favorite search engine if
these sites don't have what you want.

3. Adding Fonts and Configuring X

Now we go through the steps of making XFSTT work for you. For these steps,
you need to be logged in as ROOT.

3.1 Adding Fonts to your system

True Type Fonts used by XFSTT are located in the directory
/usr/share/fonts/truetype/. First, check to make sure the directory truetype
exists. It should have drwxr-xr-x permissions. If it doesn't have those
permissions, you need to change the permissions to match. There are several
ways to do this. The fastest is to open a console window and type:

       cd /usr/share/fonts
       chmod 755 truetype

Once we know the directory is there and its permissions are correct, we can
copy our true type fonts to that directory. True Type fonts have a file
extension of .ttf . If you are getting fonts from a Windows disk, simple
copy and past the .ttf files (normally located in C:\windows\fonts\) to the
/usr/share/fonts/truetype/ directory. If you downloaded fonts from the web,
more than likely they have to be unzipped. Here's how to do it with Corel's
File Manager and Archive Administrator:

    1.Navigate to where ever the .zip file is
    2.Double click the .zip file
    3.Click on the filenames ending with .ttf
    4.Click Extract. You will be prompted for a destination and asked what
      files to extract. Put /usr/share/fonts/truetype/ in the destination
      box and click "Selected Files", then press ok
    5.The files are then extracted to the truetype directory
    6.Navigate to the /usr/share/fonts/truetype/ directory and make sure the
      font(s) is there and that its permissions are set at -rwxr-xr-x . If
      not, change them to match

Now that fonts are present in the directory, xfstt should be able to find
them.  Open a console window and type xfstt --sync. The response should be
that X found how ever many fonts are in the directory. You can test this now
by typing xset fp+ unix/:7101. If there are no errors, type xlsfonts | grep
ttf. You should see a list of your true type fonts. It will look someting
like this:

-ttf-arial black-medium-i-normal-italic-0-0-0-0-p-0-iso8859-1
-ttf-arial black-medium-r-normal-regular-0-0-0-0-p-0-iso8859-1
-ttf-arial narrow-bold-i-normal-bold italic-0-0-0-0-p-0-iso8859-1
-ttf-arial narrow-bold-r-normal-bold-0-0-0-0-p-0-iso8859-1

If running xset fp+ unix/:7101 gets you an error something like:

xset : bad font path element (#38), possible causes are:
Directory does not exist or has wrong permissions
Directory missing fonts.dir
Incorrect font server address or syntax

restart the font server by typing /etc/init.d/xfstt force-reload. Remember,
you must be ROOT. The reply should be

Reloading X True Type Font Server configuration...
Stopping X True Type Font Server: xfstt not running.
xfstt: sync in directory   "/usr/share/fonts/truetype/."
Found ## fonts
Starting XTruetype Font Server: xfstt

When you see this, run xset fp+ unix/:7101 and xfstt should find all your
fonts.

3.2 Configuring X to find your true type fonts

The next step is to modify X' configuration files so it can use the font
server you've just set up.

In your console window, type the following:

       cd /etc/X11
       cp XF86Config XF86Config-Backup

You just created a backup of your X config. This step is VERY important,
because things can ALWAYS go wrong!

To make the necessary changes to your XF86Config file, open kwrite and
navigate to the /etc/X11/ directory, then open up XF86Config. One of the
first parts of the configuration is a section named "Files". It looks like
this:

Section "Files"
   RgbPath    "/usr/X11R6/lib/X11/rgb"
   FontPath   "/usr/X11R6/lib/X11/fonts/misc:unscaled"
   FontPath   "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
   FontPath   "/usr/X11R6/lib/X11/fonts/100dpi: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/75dpi"
   FontPath   "/usr/X11R6/lib/X11/fonts/100dpi"
EndSection

Edit this section, placing FontPath "unix/:7101" right after the RgbPath
line.

The result should look like this:

Section "Files"
   RgbPath    "/usr/X11R6/lib/X11/rgb"
   FontPath   "unix/:7101"
   FontPath   "/usr/X11R6/lib/X11/fonts/misc:unscaled"
   FontPath   "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
   FontPath   "/usr/X11R6/lib/X11/fonts/100dpi: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/75dpi"
   FontPath   "/usr/X11R6/lib/X11/fonts/100dpi"
EndSection

Save the file and exit kwrite. Now your system is ready to use true type
fonts.  All you have to do is restart X.
To do that, press CTL + ALT + BACKSPACE (or just log out and log back in).

3.3 Finishing the installation

Once you've restarted X, checking to see if true type fonts are working is
as simple as running the KDE Font Manager ( Applications - System - Font
Manager ). If all is well, your true type fonts will be listed under
"Current KDE Fonts". Congratulations! Your true type fonts are now available
to all your X applications.

If your true type fonts are NOT listed, go back and check your work. If you
are getting no errors from xset fp+ unix/:7101, then check the XF86Config
file and make sure it is modified as stated above.

Now, whenever you find a cool font on the web that you want to download...go
for it! After you get the font in the /usr/share/font/truetype/ directory,
just run (as root) xfstt --sync and you will be able to use it.

4. Credits and Legalities

This is all derivative...so I have to give credit where credit is due!

4.1 Credits

Bear Giles and his True Type Fonts in Debian mini-HOWTO
Doug Holland and his XFree86 Font De-uglification HOW-TO
Debian and Corel and their outstanding Linux Distributions, both of which
forced me to figure this out on my own.

4.2 Legalities

Copyright c 2000 Jim Riedmueller.  Re-posted to news://cnews.corel.com and
news://cnews.corel.ca with permission of the author.

Unless otherwise stated, Linux HOWTO documents are copyrighted by their
respective authors. Linux HOWTO documents may be reproduced
and distributed whole or in part, in any medium physical or electronic, as
long as this copyright notice is retained in all copies. Commercial
redistribution is allowed and encouraged; however, the author would like to
be notified of any such distributions.

All translations, derivative works, or aggregate works incorporating any
Linux HOWTO documents must be covered under this copyright notice.
That is, you may produce a derivative work from a HOWTO and impose
additional restrictions on distribution. Exceptions to these rules may be
granted under certain conditions; please contact the Linux HOWTO cordinator
for more information.

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. Many of the terms
mentioned in this document are trade names. Unless otherwise stated, all
trademarks are property of their respective owners.
   C_Tech
   http://www.intranet-works.com [Law Office/Small Bus. Consulting]
   ?? Please reply to newsgroup for the benefit of all ??

Reply to: