                           SHrifty i FreeBSD

Posobie

  Dave Bodenstab

       <imdave@synet.net>
     

   7 avgusta 1996

   FreeBSD `eto zaregistrirovannaya torgovaya marka FreeBSD
   Foundation.

   Adobe, Acrobat, Acrobat Reader i PostScript `eto ili
   zaregistrirovannye torgovye marki ili torgovye marki Adobe Systems
   Incorporated v Soedinennyh SHtatah i/ili drugih stranah.

   Apple, AirPort, FireWire, Mac, Macintosh, Mac OS, Quicktime i
   TrueType `eto torgovye marki Apple Computer, Inc.,
   zaregistrirovannye v Soedinennyh SHtatah i drugih stranah.

   Linux `eto zaregistrirovannaya torgovaya marka Linus Torvalds.

   Microsoft, FrontPage, IntelliMouse, MS-DOS, Outlook, Windows,
   Windows Media i Windows NT `eto ili zaregistrirovannye torgovye
   marki ili torgovye marki Microsoft Corporation v Soedinennyh
   SHtatah i/ili drugih stranah.

   Motif, OSF/1 i UNIX `eto zaregistrirovannye torgovye marki, a IT
   DialTone i The Open Group `eto torgovye marki Open Group v
   Soedinennyh SHtatah i drugih stranah.

   Mnogie iz oboznachenij, ispol'zuemye proizvoditelyami i prodavcami
   dlya oboznacheniya svoih produktov, zayavlyayutsya v kachestve
   torgovyh marok. Kogda takie oboznacheniya poyavlyayutsya v `etom
   dokumente, i Proektu FreeBSD izvestno o torgovoj marke, k
   oboznacheniyu dobavlyaetsya znak ''(TM)'' ili ''(R)''.

   `Etot dokument soderzhit opisanie razlichnyh fajlov shriftov,
   kotorye mogut ispol'zovat'sya s FreeBSD i drajverom sistemnoj
   konsoli, sistemoj X11, programmami Ghostscript i Groff. Dayutsya
   real'no rabotayuschie primery po pereklyucheniyu `ekrana sistemnoj
   konsoli v rezhim 80x60 i ispol'zovaniyu fajlov shriftov formata
   Type 1 s perechislennymi vyshe prikladnymi programmami.

     --------------------------------------------------------------

1. Vvedenie

   Suschestvuet mnogo mest, gde mozhno najti fajly shriftov, no
   vstaet vopros o vozmozhnyh sposobah ih ispol'zovaniya s FreeBSD.
   Otvet mozhet byt' najden v rezul'tate tschatel'nogo izucheniya
   dokumentacii po tem komponentam, kotorye vy sobiraetes'
   ispol'zovat'. Na `eto tratitsya ochen' mnogo vremeni, i `eto
   posobie yavlyaetsya popytkoj dat' gotovye otvety dlya teh, kto
   zainteresuetsya takimi voprosami.

     --------------------------------------------------------------

2. Osnovnye terminy

   Imeetsya mnozhestvo razlichnyh formatov fajlov shriftov i
   sootvetstvuyuschih okonchanij imen fajlov. Zdes' obsuzhdayutsya
   lish' sleduyuschie iz nih:

   .pfa, .pfb

           Fajly shriftov PostScript(R) type 1. Fajly .pfa
           yavlyayutsya tekstovym ( Ascii) predstavleniem, a .pfb -
           dvoichnym (Binary).

   .afm

           Parametry (metriki) sootvetstvuyuschih shriftov tipa type
           1.

   .pfm

           Metriki dlya printerov sootvetstvuyuschih shriftov tipa
           type 1.

   .ttf

           Fajl shriftov TrueType(R)

   .fot

           Neyavnaya ssylka na fajl shriftov TrueType (real'noj
           informacii o shrifte zdes' ne soderzhitsya)

   .fon, .fnt

           Fajly `ekrannyh shriftov s pobitnym predstavleniem

   Fajly .fot ispol'zuyutsya v Windows(R) v kachestve nekoj
   simvolicheskoj ssylki na fajl so shriftom v formate TrueType
   (.ttf). Fajly shriftov .fon takzhe ispol'zuyutsya v Windows. Mne
   neizvestno, kak mozhno ispol'zovat' `etot format shriftov vo
   FreeBSD.

     --------------------------------------------------------------

3. Kakie formaty fajlov shriftov ya mogu ispol'zovat'?

   To, fajl shriftov kakogo formata budet polezen, zavisit ot
   ispol'zuemogo prilozheniya. Sama po sebe FreeBSD shriftov ne
   ispol'zuet. Prikladnye programmy i/ili drajvery mogut ispol'zovat'
   fajly shriftov. Vot kratkij spravochnik po tipam fajlov shriftov i
   prilozheniyam/drajveram:

   Drajver

                syscons

                        .fnt

   Prilozhenie

                Ghostscript

                        .pfa, .pfb, .ttf

                X11

                        .pfa, .pfb

                Groff

                        .pfa, .afm

                Povray

                        .ttf

   Okonchanie .fnt ispol'zuetsya dostatochno chasto. YA polagayu,
   chto kogda kto-nibud' sobiraetsya sozdat' fajl shriftov dlya
   svoego prilozheniya, chasche vsego vybiraetsya imenno `eto
   okonchanie. Po`etomu fajly s takim okonchaniem ne vse imeyut
   odinakovyj format; v chastnosti, format fajlov .fnt, ispol'zuemyh
   drajverom syscons vo FreeBSD, mozhet otlichat'sya ot formata
   fajlov .fnt, vstrechayuschihsya v MS-DOS(R)/Windows. YA dazhe ne
   pytalsya ispol'zovat' drugie fajly .fnt, krome teh, chto
   postavlyayutsya s FreeBSD.

     --------------------------------------------------------------

4. Nastrojka virtual'noj konsoli na rezhim raboty 80x60

   Vo-pervyh, dolzhen byt' zagruzhen shrift razmera 8x8. Dlya `etogo
   fajl /etc/rc.conf dolzhen soderzhat' strochku (izmenite v nej imya
   fajla so shriftom na sootvetstvuyuschij vashej lokalizacii):

 font8x8="iso-8x8"               # font 8x8 from /usr/share/syscons/fonts/* (or NO).

   Komanda dlya pereklyucheniya rezhimov nazyvaetsya vidcontrol(1):

 % vidcontrol VGA_80x60

   Razlichnye programmy, orientirovannye na rabotu s `ekranom, takie,
   kak vi(1), dolzhny umet' opredelyat' tekuschie razmery `ekrana.
   Tak kak `eto delaetsya cherez vyzovy ioctl k drajveru konsoli
   (takomu, kak syscons(4)), to razmery budut opredelyat'sya
   pravil'no.

   CHtoby `eto prohodilo bolee gladko, mozhno vklyuchit' `eti komandy
   v skripty nachal'noj zagruzki, chtoby oni vypolnyalis' pri zapuske
   sistemy. CHtoby `eto sdelat', dobav'te takuyu strochku v
   /etc/rc.conf

         allscreens_flags="VGA_80x60"    # Set this vidcontrol mode for all virtual screens
      

   Spravochnaya informaciya: rc.conf(5), vidcontrol(1).

     --------------------------------------------------------------

5. Ispol'zovanie shriftov type 1 s sistemoj X11

   X11 mozhet ispol'zovat' fajly shriftov v formate .pfa ili .pfb.
   SHrifty dlya X11 raspolagayutsya v razlichnyh podkatalogah v
   /usr/X11R6/lib/X11/fonts. Na kazhdyj fajl so shriftom imeetsya
   ssylka po ego X11-imeni v fajle fonts.dir v kazhdom takom
   kataloge.

   Suschestvuet katalog po imeni Type1. Samym prostym sposobom
   dobavit' novyj shrift zaklyuchaetsya v pomeschenii ego v `etot
   katalog. No luchshe hranit' vse novye shrifty v otdel'nom kataloge
   i ispol'zovat' simvolicheskie ssylki dlya dobavlyaemyh shriftov.
   `Eto pozvolyaet legko upravlyat' otdel'nymi dobavlyaemymi
   shriftami, ne putaya ih s iznachal'no postavlyaemymi. Naprimer:

 Sozdaem katalog dlya fajlov shriftov
 % mkdir -p /usr/local/share/fonts/type1
 % cd /usr/local/share/fonts/type1

 Pomeschaem syuda fajly .pfa, .pfb i .afm
 Komu-to mozhet potrebovat'sya hranit' zdes' takzhe
 soprovoditel'nye fajly i dokumentaciyu k shriftam
 % cp /cdrom/fonts/atm/showboat/showboat.pfb .
 % cp /cdrom/fonts/atm/showboat/showboat.afm .

 Obnovlenie indeksnogo fajla so ssylkami na fajly shriftov
 % echo showboat - InfoMagic CICA, Dec 1994, /fonts/atm/showboat >>INDEX

   Teper', chtoby ispol'zovat' novyj shrift s X11, nuzhno dat' dostup
   k fajlu shriftov i obnovit' fajly i imenami shriftov. Imena
   shriftov v X11 vyglyadyat sleduyuschim obrazom:

 -bitstream-charter-medium-r-normal-xxx-0-0-0-0-p-0-iso8859-1
      |        |      |    |   |     |  | | | | | |    \    \
      |        |      |    |   |     \  \ \ \ \ \ \     +----+- nabor simvolov
      |        |      |    |   \      \  \ \ \ \ \ +- srednyaya shirina
      |        |      |    |    \      \  \ \ \ \ +- spacing
      |        |      |    \     \      \  \ \ \ +- razreshenie po vertikali
      |        |      |     \     \      \  \ \ +- razreshenie po gorizontali
      |        |      |      \     \      \  \ +- punktov
      |        |      |       \     \      \  +- piksel
      |        |      |        \     \      \
   foundry  family  weight   slant  width  additional style

   Dlya kazhdogo novogo fajla shriftov neobhodimo sozdat' novoe imya.
   Esli u vas est' kakaya-libo informaciya iz soprovoditel'noj
   dokumentacii k shriftu, to ona mozhet sluzhit' osnovoj dlya
   sozdaniya imeni. Esli informacii net, to mozhno poluchit'
   nekotoruyu informaciyu ot ispol'zovaniya programmy strings(1) nad
   fajlom shrifta. Naprimer:

 % strings showboat.pfb | more
 %!FontType1-1.0: Showboat 001.001
 %%CreationDate: 1/15/91 5:16:03 PM
 %%VMusage: 1024 45747
 % Generated by Fontographer 3.1
 % Showboat
  1991 by David Rakowski.  Alle Rechte Vorbehalten.
 FontDirectory/Showboat known{/Showboat findfont dup/UniqueID known{dup
 /UniqueID get 4962377 eq exch/FontType get 1 eq and}{pop false}ifelse
 {save true}{false}ifelse}{false}ifelse
 12 dict begin
 /FontInfo 9 dict dup begin
  /version (001.001) readonly def
  /FullName (Showboat) readonly def
  /FamilyName (Showboat) readonly def
  /Weight (Medium) readonly def
  /ItalicAngle 0 def
  /isFixedPitch false def
  /UnderlinePosition -106 def
  /UnderlineThickness 16 def
  /Notice (Showboat
  1991 by David Rakowski.  Alle Rechte Vorbehalten.) readonly def
 end readonly def
 /FontName /Showboat def
 --stdin--

   Pol'zuyas' `etoj informaciej, mozhno sostavit' vozmozhnoe imya:

 -type1-Showboat-medium-r-normal-decorative-0-0-0-0-p-0-iso8859-1

   Komponentami nashego imeni yavlyayutsya:

   Foundry

           Davajte nazyvat' vse novye shrifty type1.

   Family

           Imya shrifta.

   Weight

           Normal, bold, medium, semibold, i tak dalee. Iz rezul'tata
           raboty komandy strings(1) pohozhe, chto `etot shrift imeet
           shirinu medium.

   Slant

           roman, italic, oblique, i tak dalee. Tak kak ItalicAngle
           raven nulyu, to budet ispol'zovat'sya roman.

   Width

           Normal, wide, condensed, extended, i tak dalee. Poka `eto
           ne budet provereno, predpolagaem normal.

   Dopolnitel'nyj stil'

           Obychno opuskaetsya, no on budet ukazyvat', chto v shrifte
           est' dekorativnye zaglavnye bukvy.

   Spacing

           proportional ili monospaced. Ispol'zuetsya proportional,
           potomu chto isFixedPitch raven false.

   Vse `eti imena proizvol'ny, no nuzhno starat'sya sledovat'
   suschestvuyuschim soglasheniyam. V programme dlya X11 na shrift
   ssylayutsya po imeni s primeneniem shablonov, tak chto v
   vybiraemom imeni `eto dolzhno uchityvat'sya. Mozhno nachat' s
   prostogo ispol'zovaniya

 ...-normal-r-normal-...-p-...
        

   v kachestve imeni, a zatem ispol'zovat' xfontsel(1) dlya ego
   proverki i izmeneniya imeni na osnove togo, kak vyglyadit shrift.

   Itak, zavershaya nash primer:

 Delaem shrift dostupnym dlya X11
 % cd /usr/X11R6/lib/X11/fonts/Type1
 % ln -s /usr/local/share/fonts/type1/showboat.pfb .

 Redaktiruem fajly fonts.dir and fonts.scale, dobavlyaya stroku,
 opisyvayuschuyu shrift i uvelichivaya kolichestvo shriftov v pervoj stroke.
 % ex fonts.dir
 :1p
 25
 :1c
 26
 .
 :$a
 showboat.pfb -type1-showboat-medium-r-normal-decorative-0-0-0-0-p-0-iso8859-1
 .
 :wq

 fonts.scale identichen
 fonts.dir...
 % cp fonts.dir fonts.scale

 Ukazyvaem X11, chto proizoshli izmeneniya
 % xset fp rehash

 Proveryaem novyj shrift
 % xfontsel -pattern -type1-*

   Spravochnaya informaciya: xfontsel(1), xset(1), The X Windows
   System in a Nutshell, O'Reilly & Associates.

     --------------------------------------------------------------

6. Ispol'zovanie shriftov type 1 s paketom Ghostscript

   Ghostscript ssylaetsya na shrift cherez svoj fajl Fontmap. On
   dolzhen byt' podpravlen tak zhe, kak i fajl fonts.dir v sluchae
   X11. Ghostscript mozhet ispol'zovat' fajly shriftov v formatah
   .pfa ili .pfb. Vzyav shrift iz predyduschego primera, ego mozhno
   ispol'zovat' s Ghostscript vot tak:

 Pomeschaem fajl so shriftom v katalog so shriftami Ghostscript
 % cd /usr/local/share/ghostscript/fonts
 % ln -s /usr/local/share/fonts/type1/showboat.pfb .

 Redaktiruem Fontmap, chtoby Ghostscript znal o shrifte
 % cd /usr/local/share/ghostscript/4.01
 % ex Fontmap
 :$a
 /Showboat        (showboat.pfb) ; % From CICA /fonts/atm/showboat
 .
 :wq

 Ispol'zuem Ghostscript dlya proverki shrifta
 % gs prfont.ps
 Aladdin Ghostscript 4.01 (1996-7-10)
 Copyright (C) 1996 Aladdin Enterprises, Menlo Park, CA.  All rights
 reserved.
 This software comes with NO WARRANTY: see the file PUBLIC for details.
 Loading Times-Roman font from /usr/local/share/ghostscript/fonts/tir_____.pfb...
  /1899520 581354 1300084 13826 0 done.
 GS>Showboat DoFont
 Loading Showboat font from /usr/local/share/ghostscript/fonts/showboat.pfb...
  1939688 565415 1300084 16901 0 done.
 >>showpage, press <return> to continue<<
 >>showpage, press <return> to continue<<
 >>showpage, press <return> to continue<<
 GS>quit

   Spravochnaya informaciya: fonts.txt iz distributiva Ghostscript
   4.01

     --------------------------------------------------------------

7. Ispol'zovanie shriftov v formate type 1 s programmoj Groff

   Teper', kogda novyj shrift mozhet byt' ispol'zovan kak s X11, tak
   i v Ghostscript, kak ispol'zovat' ego s programmoj groff?
   Vo-pervyh, tak kak my imeem delo so PostScript-shriftami formata
   type 1, to podhodyaschim ustrojstvom groff yavlyaetsya ps. Dlya
   kazhdogo shrifta, kotoryj mozhet ispol'zovat'sya programmoj groff,
   dolzhen byt' sozdan fajl shrifta. Imya shrifta dlya groff
   yavlyaetsya prosto imenem fajla iz kataloga
   /usr/share/groff_font/devps. V nashem primere fajlom shrifta
   mozhet byt' /usr/share/groff_font/devps/SHOWBOAT. Fajl dolzhen
   byt' sozdan s pomosch'yu utilit, postavlyaemyh s programmoj groff.

   Pervoj utilitoj yavlyaetsya afmtodit. Obychno ona ne
   ustanavlivaetsya, tak chto ona dolzhna byt' poluchena iz
   distributiva s ishodnymi tekstami. YA obnaruzhil, chto nuzhno
   izmenit' pervuyu stroku fajla, chto ya delal tak:

 % cp /usr/src/gnu/usr.bin/groff/afmtodit/afmtodit.pl /tmp
 % ex /tmp/afmtodit.pl
 :1c
 #!/usr/bin/perl -P-
 .
 :wq

   `Eta utilita sozdast fajl shriftov dlya groff iz fajla metrik (s
   okonchaniem .afm). Prodolzhaya s nashim primerom:

 Mnogie fajly .afm v formate Mac
 ... stroki razdeleny simvolom ^M.  Nam nuzhno preobrazovat' ih v
 razdelitel' ^J v stile UNIX(R)
 % cd /tmp
 % cat /usr/local/share/fonts/type1/showboat.afm |
         tr '\015' '\012' >showboat.afm

 Teper' sozdaem fajl shriftov groff
 % cd /usr/share/groff_font/devps
 % /tmp/afmtodit.pl -d DESC -e text.enc /tmp/showboat.afm generate/textmap SHOWBOAT

   Teper' k shriftu mozhno obraschat'sya po imeni SHOWBOAT.

   Esli v sisteme dlya upravleniya printerami ispol'zuetsya programma
   Ghostscript, to bol'she nichego delat' ne nuzhno. Odnako, esli
   ispol'zuyutsya nastoyaschie PostScript-printery, to dlya
   ispol'zovaniya shrifta ego nuzhno zagruzit' v printer (esli tol'ko
   v printere shrift showboat ne vstroen ili ne imeetsya na diske so
   shriftami). Poslednij shag zaklyuchaetsya v sozdanii zagruzhaemogo
   shrifta. Utilita pfbtops ispol'zuetsya dlya sozdaniya shrifta v
   formate .pfa, a fajl dlya zagruzki izmenyaetsya dlya ukazaniya
   novogo shrifta. Fajl dlya zagruzki dolzhen ssylat'sya na
   vnutrennee imya shrifta. Ono mozhet byt' legko opredeleno iz fajla
   shriftov groff, kak `eto pokazyvaetsya zdes':

 Sozdanie fajla shrifta .pfa
 % pfbtops /usr/local/share/fonts/type1/showboat.pfb >showboat.pfa

   Konechno, esli fajl .pfa uzhe imeetsya, dlya ego ispol'zovaniya
   sozdaem simvolicheskuyu ssylku na nego.

 Poluchenie vnutrennego imeni shrifta
 % fgrep internalname SHOWBOAT
 internalname Showboat

 Ukazyvaem utilite groff, chto shrift dolzhen byt' zagruzhen
 % ex download
 :$a
 Showboat      showboat.pfa
 .
 :wq

   Dlya testirovaniya shrifta:

 % cd /tmp
 % cat >example.t <<EOF
 .sp 5
 .ps 16
 This is an example of the Showboat font:
 .br
 .ps 48
 .vs (\n(.s+2)p
 .sp
 .ft SHOWBOAT
 ABCDEFGHI
 .br
 JKLMNOPQR
 .br
 STUVWXYZ
 .sp
 .ps 16
 .vs (\n(.s+2)p
 .fp 5 SHOWBOAT
 .ft R
 To use it for the first letter of a paragraph, it will look like:
 .sp 50p
 \s(48\f5H\s0\fRere is the first sentence of a paragraph that uses the
 showboat font as its first letter.
 Additional vertical space must be used to allow room for the larger
 letter.
 EOF
 % groff -Tps example.t >example.ps

 Dlya ispol'zovaniya s ghostscript/ghostview
 % ghostview example.ps

 Dlya ego pechati
 % lpr -Ppostscript example.ps

   Spravochnaya informaciya:
   /usr/src/gnu/usr.bin/groff/afmtodit/afmtodit.man, groff_font(5),
   groff_char(7), pfbtops(1).

     --------------------------------------------------------------

8. Preobrazovanie fajlov shriftov TrueType v format groff/PostScript
dlya ispol'zovaniya s groff

   Potencial'no `eto trebuet nekotoryh usilij, prosto potomu chto
   zavisit nekotoryh utilit, kotorye v kachestve chasti sistemy ne
   ustanavlivayutsya. `Eto:

   ttf2pf

           Utilita dlya preobrazovaniya TrueType v PostScript. Ona
           pozvolyaet preobrazovat' shrift TrueType v metriku shrifta
           v tekstovom formate (fajl .afm).

           Dostupna po adresu
           http://sunsite.icm.edu.pl/pub/GUST/contrib/BachoTeX98/ttf2pf/.
           Zamechanie: `Eti fajly yavlyayutsya PostScript-programmami
           i dolzhny byt' skachany na disk schelchkom na ssylke pri
           nazhatoj klavishe Shift. V protivnom sluchae dlya ih
           prosmotra vash brauzer mozhet popytat'sya zapustit'
           programmu ghostview.

           Interes predstavlyayut sleduyuschie fajly:

              * GS_TTF.PS

              * PF2AFM.PS

              * ttf2pf.ps

           Smes' verhnego/nizhnego registrov prisutstvuet iz-za togo,
           chto `eti fajly prednaznacheny i dlya DOS. ttf2pf.ps
           ispol'zuet ostal'nye s imenami v verhnem registre, tak
           chto pri pereimenovanii `eto nuzhno uchityvat'. (Na samom
           dele GS_TTF.PS i PFS2AFM.PS predpolozhitel'no yavlyayutsya
           chast'yu distributiva Ghostscript, no ih legko
           ispol'zovat' kak otdel'nye utility. V postavku FreeBSD oni
           ne vklyucheny.) Vy mozhete takzhe ustanovit' ih v katalog
           /usr/local/share/groff_font/devps(?).

   afmtodit

           Sozdaet fajly shriftov dlya ispol'zovaniya s programmoj
           groff iz tekstovyh fajlov s metrikami shrifta. Ona obychno
           raspolagaetsya v kataloge /usr/src/contrib/groff/afmtodit
           i dlya ee ispol'zovaniya trebuetsya prodelat' nekotoruyu
           rabotu.

             Zamechanie: Esli vy izbegaete rabotat' v dereve
             /usr/src, prosto skopirujte soderzhimoe
             vysheupomyanutogo kataloga vo vremennyj rabochij
             katalog.

           Vo rabochem kataloge vam nuzhno postroit' utilitu. Prosto
           vvedite takuyu komandu:

 # make -f Makefile.sub afmtodit
          

           Vam mozhet takzhe potrebovat'sya skopirovat'
           /usr/contrib/groff/devps/generate/textmap v
           /usr/share/groff_font/devps/generate, esli ego tol'ko uzhe
           ne suschestvuet.

   Kak tol'ko `eti utility gotovy, vy mozhete nachat':

    1. Sozdajte fajl .afm po takoj komande:

 % gs [-dNODISPLAY] [-q] -- ttf2pf.ps TTF_name [PS_font_name [AFM_name]]
        

       Zdes' TTF_name oboznachaet vash fajl so shriftom TrueType,
       PS_font_name yavlyaetsya imenem dlya fajla .pfa, AFM_name
       zadaet imya dlya fajla .afm. Esli vy ne ukazhete imena
       vyhodnyh fajlov, dlya formatov .pfa ili .afm, to po
       umolchaniyu budut ispol'zovat'sya imena, poluchaemye iz imeni
       fajla so shriftom TrueType.

       Pri `etom takzhe budet sozdan fajl .pfa, tekstovyj fajl s
       metrikami PostScript-shrifta ((.pfb dlya dvoichnogo
       predstavleniya). `Eto ne ne obyazatel'no, no mozhet byt' (ya
       dumayu) poleznym dlya servera shriftov.

       Naprimer, dlya preobrazovaniya shrifta 30f9 Barcode s imenami
       fajlov po umolchaniyu, vospol'zujtes' sleduyuschej komandoj:

 % gs -dNODISPLAY -- ttf2pf.ps 3of9.ttf
 Aladdin Ghostscript 5.10 (1997-11-23)
 Copyright (C) 1997 Aladdin Enterprises, Menlo Park, CA.  All rights reserved.
 This software comes with NO WARRANTY: see the file PUBLIC for details.
 Converting 3of9.ttf to 3of9.pfa and 3of9.afm.
        

       Esli vy hotite, chtoby preobrazovannye shrifty sohranyalis' v
       fajly A.pfa and B.afm, to vydajte takuyu komandu:

 % gs -dNODISPLAY -- ttf2pf.ps 3of9.ttf A B
 Aladdin Ghostscript 5.10 (1997-11-23)
 Copyright (C) 1997 Aladdin Enterprises, Menlo Park, CA.  All rights reserved.
 This software comes with NO WARRANTY: see the file PUBLIC for details.
 Converting 3of9.ttf to A.pfa and B.afm.
        

    2. Sozdajte PostScript-fajl dlya groff:

       Smenite tekuschij katalog na /usr/share/groff_font/devps dlya
       oblegcheniya zapuska upominaemyh dalee programm. Dlya `etogo
       vam mozhet ponadobit'sya imet' privilegii administratora
       sistemy. (Ili, esli vy izbegaete zdes' rabotat', obyazatel'no
       posmotrite fajly DESC, text.enc i generate/textmap v `etom
       kataloge.)

 % afmtodit -d DESC -e text.enc file.afm \
             generate/textmap PS_font_name
        

       Zdes' file.afm yavlyaetsya fajlom AFM_name, sozdannym
       programmoj ttf2pf.ps vyshe, a PS_font_name yavlyaetsya imenem
       shrifta, ispol'zuemym v toj komande, tak zhe, kak i imya,
       kotoroe budet ispol'zovat' utilita groff(1) dlya ssylki na
       `etot shrift. Naprimer, polagaya, chto vy ispol'zovali pervuyu
       komandu tiff2pf.ps vyshe, to shrift 3of9 Barcode mozhet byt'
       sozdan pri pomoschi takoj komandy:

 % afmtodit -d DESC -e text.enc 3of9.afm \
                  generate/textmap 3of9
        

       Prover'te, chto poluchennyj fajl PS_font_name (k primeru, 3of9
       iz primera vyshe) raspolozhen v kataloge
       /usr/share/groff_font/devps, skopirovav ili perenesya ego
       syuda.

       Zamet'te, chto esli ttf2pf.ps naznachaet imya shrifta,
       ispol'zuya odin iz najdennyh v fajle shrifta TrueType, a vy
       hotite ispol'zovat' drugoe imya, to vy dolzhny otredaktirovat'
       fajl .afm do zapuska komandy afmtodit. `Eto imya k tomu zhe
       dolzhno sovpadat' s tem, chto ispol'zuetsya v fajle Fontmap,
       esli vy sobiraetes' perenapravlyat' vyvod groff(1) utilite
       gs(1).

     --------------------------------------------------------------

9. Mozhno li ispol'zovat' shrifty v formate TrueType s drugimi
programmami?

   Format TrueType ispol'zuetsya v Windows, Windows 95 i na
   komp'yuterah Macintosh. On dostatochno populyaren i v `etom
   formate imeetsya bol'shoe kolichestvo shriftov.

   K sozhaleniyu, ya znayu lish' neskol'ko programm, kotorye mogut
   ispol'zovat' `etot format: na um prihodyat Ghostscript i Povray.
   Ego podderzhka v programme Ghostscript, soglasno dokumentacii,
   nahoditsya v zachatochnom sostoyanii i poluchaemyj rezul'tat huzhe
   togo, chto poluchaetsya pri ispol'zovanii shriftov type 1.
   Programma Povray versii 3 takzhe mozhet ispol'zovat' shrifty
   TrueType, no ya ochen' somnevayus', chto mnogo kto sozdaet
   dokumenty kak posledovatel'nost' animirovannyh stranic :-).

   Takaya ves'ma pechal'naya situaciya mozhet vskore izmenit'sya. V
   ramkah proekta FreeType Project v nastoyaschee vremya
   razrabatyvaetsya poleznyj nabor instrumentov dlya raboty s
   FreeType:

     * Server shriftov xfsft dlya X11 mozhet rabotat' i so shriftami
       TrueType, i s obychnymi shriftami. Hotya v nastoyaschee vremya
       on esche nahoditsya v stadii otladki, no ego uzhe mozhno
       ispol'zovat'. Posmotrite stranicu Juliusz Chroboczek, chtoby
       poluchit' bolee polnuyu informaciyu. Ukazaniya po perenosu na
       FreeBSD mozhno najti na stranice Stivena Montgomeri (Stephen
       Montgomery), posvyaschennoj programmnomu obespecheniyu.

     * xfstt yavlyaetsya esche odnim serverom shriftov dlya X11,
       dostupnyj po adresu ftp://sunsite.unc.edu/pub/Linux/X11/fonts.

     * Programma, kotoraya nazyvaetsya ttf2bdf, mozhet generirovat'
       BDF-fajly, kotorye mozhno ispol'zovat' v sisteme X Window, iz
       fajlov shriftov TrueType. Vypolnimye fajly Linux mogut
       nahodit'sya po adresu
       ftp://crl.nmsu.edu/CLR/multiling/General.

     * i drugie ...

     --------------------------------------------------------------

10. Gde mozhno najti dopolnitel'nye shrifty?

   Mnogo shriftov mozhno najti v seti Internet. Oni libo absolyutno
   besplatny, libo uslovno-besplatny. Krome togo, prodaetsya mnogo
   nedorogih kompakt-diskov, soderzhaschih mnogo shriftov. Vot
   nekotorye adresa Internet (na avgust 1996):

     * http://www.simtel.net/

     * http://www.freshmeat.net

     * Sgruzite shrifty, postavlyaemye s Kollekciej Portov v kataloge
       x11-fonts/

     --------------------------------------------------------------

11. Dopolnitel'nye voprosy

     * Dlya chego prednaznacheny fajly .pfm?

     * Mozhno li poluchit' fajl .afm iz fajla .pfa ili .pfb?

     * Kak poluchit' fajly preobrazovaniya simvolov groff dlya
       PostScript-shriftov s nestandartnymi nazvaniyami simvolov?

     * Mozhno li nastroit' xditview i ustrojstva devX?? na rabotu
       vseh novyh shriftov?

     * Horosho by imet' primery ispol'zovaniya shriftov TrueType s
       programmami Povray i Ghostscript.

     --------------------------------------------------------------

            `Etot, i drugie dokumenty, mogut byt' skachany s
                ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

  Po voprosam, svyazannym s FreeBSD, prochitajte dokumentaciyu prezhde
                 chem pisat' v <questions@FreeBSD.org>.
         Po voprosam, svyazannym s `etoj dokumentaciej, pishite
                           <doc@FreeBSD.org>.
  Po voprosam, svyazannym s russkim perevodom dokumentacii, pishite v
                    rassylku <frdp@FreeBSD.org.ua>.
  Informaciya po podpiske na `etu rassylku nahoditsya na sajte proekta
                               perevoda.
