Fonts (Česky)

From ArchWiki
Revision as of 11:49, 25 November 2006 by Dvx (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

Přidání fontů v moderním Linux je snažší než dříve. Zde je několik tipů pro snažší pochopení průměrnými uživateli. První věc je, kam fonty vložit. Obvykle by měli být vloženy do:

  • /usr/share/fonts
  • /usr/X11R6/lib/X11/fonts

This will make everybody on the system to be able to use them, however it requires root privileges. Copying them into:

  • ~/.fonts

folder is a good idea too.

Některé fonty byly připraveny pro použití v Arch Linuxu, vyhledávat je můžete pomocí:

pacman -Ss fonts

Mezi dostupnými balíčky můžete vidět:

extra/artwiz-fonts 1.3-1
    This is set of (improved) artwiz fonts.
extra/ttf-ms-fonts 1.3-6
    Un-extracted TTF Fonts from Microsoft

Then if you want to install these two packages, do:

pacman -S artwiz-fonts ttf-ms-fonts

Fonty se nainstalují do adresáře /usr/X11R6/lib/X11/fonts.

Another option is to use KDE Font Installer in the KDE Control Center. This seems to work flawlessly if you use KDE.

You can also manually copy fonts into above three directories, but don't forget to run as root:
fc-cache -vf

Mostly you are lucky to use them in your X windows environment like gnome, xfce4 or kde. However, some GTK1 or old applications don't support fontconfig. (Really? someone should check this and then fix it) You have run following commands in your fonts directory (in the terminal of course):

  ln -s /usr/share/fonts/encodings/encodings.dir yourfontdirectory/encodings.dir 

ex: if you-re using kde

   ln -s /usr/share/fonts/encodings/encodings.dir ~/.fonts/

then usually you need restart X.

If you want to share such fonts or keep from above manual operation, you can make an Arch package. Save the fonts you wish to install as a tar.bz2 and use a variation of the following PKGBUILD and .install to install them via ABS:

  pkgdesc=\"Fonts extra\"
  build()        {
    mkdir -p $startdir/pkg/usr/X11R6/lib/X11/fonts/local
    mv $startdir/src/*.ttf $startdir/pkg/usr/X11R6/lib/X11/fonts/local
# fonts-extra.install:
  # arg 1:  the new package version
  post_install() {
    echo -n \"updating font cache... \"
    cd /usr/X11R6/lib/X11/fonts/local
    ln -s /usr/X11R6/lib/X11/fonts/encodings/encodings.dir /usr/X11R6/lib/X11/fonts/local/encodings.dir
    echo \"done.\"

  # arg 1:  the new package version
  # arg 2:  the old package version
  post_upgrade() {
    post_install $1

  # arg 1:  the old package version
  pre_remove() {


  $op $*