groff
[Top][All Lists]
Advanced

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

Re: [Groff] Cyrillic (cp1251) support for groff -Tps


From: Ted Harding
Subject: Re: [Groff] Cyrillic (cp1251) support for groff -Tps
Date: Tue, 24 Jul 2001 13:03:49 +0100 (BST)

On 24-Jul-01 Werner LEMBERG wrote:
> 
>> I need to convert texts encoded in cp1251 to PostScript.  I have
>> PostScript (Type1) fonts.
> 
> Sorry, but our Russian expert for groff is on vacation until
> August 7th.
> 
>> Should I convert the PostScript font with afmtodit, or it is enough
>> to list it in the devps/download file?  If I need to convert it, is
>> the file devps/text.enc _the_ encoding file I need, or I need
>> another?
> 
> Detailed instructions can be found in the man page of grops.

If you wish to set it up by hand (which I actually recommend unless
you can predict _exactly_ what the perl script in groff will do to
the particular font files you are installing, which is not always
obvious), here is a step-by-step method. It was originally written
to describe how to install a particular set if IPA fonts, so some of
the names of font files and groff font-description files will need to
be changed, buit otherwise it should work. Note that the mapfile
is left blank, so that characters in the installed font can only be
referred to by number. However, you can revise this later, once you've
made up your mind exactly how you wish to do it.

Procedure:

1. Park the .afm and .pfb [or .pofa] files in a safe directory.

2. If you have .pfb, run

   pfbtops fontfile.pfb > fontfile.pfa

   thereby making as ASCII font file.

3. Look inside this .pfa file and get the font /FullName which in this
   case is

   SILDoulosIPA-Regular [or whatever]

   WRITE THIS DOWN.

4. For this particular application, make yourself a null (empty)
   mapfile:

   touch null_mapfile

   (Normally, the mapfile gives pairs   PS-name  groff-name  but
   IPA is so nasty it's better to leave this issue aside at this stage).

5. Choose a name for the groff font file (which will go in devps).
   I used

   IPA_T  [or whatever]

   (T for Times; I also did IPA_H from Sophia and IPA_M from Manuscript).

6. Now (here and below I'm using my own directory path to devps/ ; you use
   yours)

   afmtodit -d/usr/share/groff/font/devps/DESC \
        fontfile.afm null_mapfile IPA_T [or whatever]

   (all on one line as indicated by the \ )

7. Copy IPA_T [or whatever] to /usr/share/groff/font/devps/

8. Copy fontfile.pfa to /usr/share/groff/font/devps/

9. Edit /usr/share/groff/font/devps/download to add an entry

   SILDoulosIPA-Regular    SIL_Douros.pfa  [or whatever]

   (using what you wrote down at (3))

10. Edit /usr/share/groff/font/devps/DESC as follows:

    a) increment the font-count by 1 (the number immediately after
       "fonts" in the line starting "fonts");
    b) append the fontfile-name IPA_T [or whatever] to the list of
       fonts in the same line.

11. TEST IT!

    Use the \N'nnn' mechanism in groff (you have to in this case
    since the mapfile was empty so there are no groff names for the
    characters as yet). For this sort of thing I prefer to set up
    macros, maybe job-specific, which invoke an IPA context and then
    define characters like

    .char \[ng] \N'78'

    Or (say using  .tr IPA IPA_T ) simply

    .char \[ng] \f[IPA]\N'78'\fP

    which would enable you to drop in an IPA character on the fly
    without having to switch to an IPA context. Also, you can easily
    name them as you please at any time, without pre-empting names
    you might need for something else.

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 24-Jul-01                                       Time: 13:03:49
------------------------------ XFMail ------------------------------

reply via email to

[Prev in Thread] Current Thread [Next in Thread]