iscii2ps

Index  

NAME

iscii2ps - converts Indian Script files to PostScript  

SYNOPSIS

iscii2ps [ -options... ] [infile [outfile]]  

DESCRIPTION


  The iscii2ps utility creates a post script file of an input indic script text file coded using ISCII-8, UNICODE or UTF-8 character codings. The Postscript file generated by iscii2ps can be printed on Postscript printer or any printer supported by Ghost Script. The postscript file can also be viewed by ghost view front end.

The order of the input file and output file must be as shown in the synopsis. Rest of the options can be given in any order.

iscii2ps uses several fonts served through the XFS (X font server). The fonts can be for various Indian Scripts and for their display variations (like bold, italic etc.). The font names can be provided either on the command line or in a separate configuration file. In case of multiplicity of the definition, the names defined on the command line are used.

The iscii2ps reads its input ISCII-8, UNICODE or UTF-8 character coded text file and depending on the display attribute of the text, selects the font as specified in the configuration file or through the command line. As the character codes are not glyph codes, these cannot be printed as such. These codes are first translated to the glyph codes. The process of translation is independant of the font itself. The iscii2ps uses the isciilib support for translating the character codes to the glyph codes. In particular, iscii2ps uses the codeconversionbyname function. The translated glyph string is printed using the selected font. If the fonts are not available predefined default substitutions are made for them.

ISCII-8 codes are eight bit wide stateful codes that support changes in the script, display attributes such as bold, italic etc. UNICODE and UTF-8 are stateless character codes that do not support the display attributes. Each script in these coding standards have different coding range.

If available the options are read from system wide default file iscii2ps.defaults in "/usr/share/iscii2ps/" directory. The user can also put options in his own default file named ".iscii2ps.defaults" in the home directory. The options specified in the user file take precedence over the same options in the system wide default file. Command line options take the highest precedence. Default margin is 35-points left top and on bottom sides. The other arguments supported on the command line are page size (e.g., A4, A5, Letter etc.), page width and height, font point size, font server name, font specification file, default Indian (in case of ISCII-8) script. The margins for the ps file will be what is passed through command line using options -bmargin, -lmargin, -tmargin as bottom, left and top margins respectively, if only -margin option is passed then all the margins will be equal to the specified margin. The scale option scales the original size of the font by the given scalefactor. For scaling individual fonts, scale factor is given as suffix '@<scalefactor>' corresponding to every fontname either in font specification file or with -fi option.

The search path for the font specification file is specified using $FONTSPECS environment variable. The various paths are seperated by colon (:) in precedence order. The path defined may include "$HOME" to represent home directory. iscii2ps will search for the font specification file in each specified directory and will choose the first one. The default path for font specification file (spec) is "/usr/share/iscii2ps/", the fontspecification file can also be passed as option -config with fully qualified fontspecification file name argument. Similarly the font server names used by iscii2ps can be specified in precedence order using $FSSERVER environment variable. The various font server names are seperated by '@'.

The iscii2ps can be used for printing in more than one scripts and fonts. This is achieved through a font specification file.

 

FORMAT OF THE FONT SPECIFICATION FILE


  The font specification file contains several scripts related font information in the following fashion.

        <Indian_Script_mnemonic>

       Display_Attribute(s)_1 = Corresponding_font_name@<scalefactor_1>;

       Display_Attribute(s)_2 = Corresponding_font_name@<scalefactor_2> ;

                       .

                       .

                       .

       Display_Attribute(s)_n = Corresponding_font_name@<scalefactor_n> ;

       </Indian_Script_mnemonic>

Following mnemonics are used for Indian Scripts:


       RMN: Roman

       DEV: Devanagari

       BNG: Bengali

       TML: Tamil

       TLG: Telugu

       ASM: Assamese

       ORI: Oriya

       KND: Kannada

       MLM: Malayalam

       GJR: Gujarati

       PNJ: Punjabi

       DEF: Default

Display_Attribute_name use the following mnemonics:


       BLD: Bold

       ITA: Italic

       UL: Underline

       EXP: Expanded

       HLT: Highlight

       OTL: Outline

       SHD: Shadow

       NOR: Normal

Display Attributes can be combined together to give composite attributes.
       Highlight + Bold = ExtraBold

An example of the font specification file is:


<DEF>

    NOR = -mf-devanagari10-----19-5-300-300--150--@4 ; 

    BLD = -mf-devanagari10-----19-5-300-300--150--@0.3 ; 

    BLD ITA = -mf-devanagari10-----19-5-300-300--150-- ; 
</DEF>

<DEV>

    NOR = -mf-devanagari10-----19-5-300-300--150--@2 ; 

    BLD = -mf-devanagari10-----19-5-300-300--150--@.75; 

    ITA = -mf-devanagari10-----19-5-300-300--150--@2.0 ; 

    BLD ITA = -mf-devanagari10-----19-5-300-300--150-- ; 
</DEV>

Here DEV is the mnemonic used for Devanagari Script. As shown above the beginning and ending tags for the scripts must be same except terminating symbol in the ending tag. NOR is the Display Attribute for Normal fonts, Display Attributes "BLD ITA" together is for Bold+Italic text. "-mf-devanagari10-----19-5-300-300--150--@2" is the corresponding font name with optional scalefactor (suffix @<scalefactor>) for corresponding font followed by a semicolon. The mnemonics for the Script and Display Attributes can be in mixed case.

For character coding in UNICODE and UTF-8, only the NOR definition of each script is used.  

OPTIONS

The following options are recognized by iscii2ps:
-bmargin bottom-margin

This option specifies the bottom margin of the output. Default value is 35 points.
-config font-specification-filename

This option specifies the font specification filename. Search path for font specification file is specified using $FONTSPECS environment variable. Default filename is "/usr/share/iscii2ps/spec".
-defscript script

The iscii documents may specify the script codes for the text. In case the script codes are not specified, a default script is used. This option specifies the default script. Default script cannot be RMN, if RMN is passed then this option will be ignored. How ever if no default script is specified, DEV is assumed. In UNICODE and UTF-8 it is ignored.
-fi Indian-language-font-specification

This option specifies the Indian Language fonts to be used for various attributes. Several such options can be given on the command line to provide several font names. For example, "-fi DEV:BLD:devanagari10b@2.5" specifies that devanagari10b font should be used for bold text in devanagari and the font size of this particular font will be 2.5 times the original size. The default value is "DEV:NOR:devanagari". A font specified by this option is not used for non NOR display attribute in case of UNICODE or UTF-8.
-fsize font-point-size

This option specifies the font size of the output i.e., size of the font will be increased to font-point-size. Default value is the original size of the font.
--help

Displays this help and exit.
-lmargin left-margin

This option specifies the left margin of the output. Default value is 35 points.
-margin margin

This option specifies all the margins of the output. All margins are set to the same value. Default value is 35 points.
-page paper-size or
-pheight height<pt|mm|cm|in> and -pwidth width<pt|mm|cm|in>
These options specify the size of the page. The height and width of the paper can be specified separately in centimeters or millimeters or inch. If the units of the height an width are not given, they are treated in units of points. If the paper size is specified using -page option, the argument can be one of the A4, A5, Letter or Legal. Default page size is A4.
-scale scale-factor

This option specifies the scalefactor by which original font size of a font is scaled. Default value is 1.
-server server-name

This option specifies the X font server. Various font server names can be specified using $FSSERVER environment variable. The various font server names are seperated by '@'. Default server name is unix/:-1.
-tabsize tabsize<pt|mm|cm|in>

This option specifies the tabsize to be taken for the output. Default value is 45 points.
-tmargin top-margin

This option specifies the top margin of the output. Default value is 35 points.
-unicode size

This option specifies that the input indic script text file is coded using UNICODE size bytes. The value for the size can be either 2 or 4. If any invalid value for the size is passed, default value will be taken. Default value for the size is 2.
-utf8

This option specifies that the input indic script text file is coded using UTF-8.
--version

Output the version information and exit.
 

AUTHOR

Written by Ramesh Chandra Chaurasiya, Vivek kumar Shukla.  

REPORTING BUGS

Report bugs to
<rchaurasiya@cse.iitk.ac.in>,
<vivekks@cse.iitk.ac.in>  

SEE ALSO

codeconversionbyname(3), codeconversionbyencoding(3), getconversionencoding(3)  

COPYRIGHT

Copyright 2001 by iLinux Software Products IIT Kanpur, All Rights Reserved.


 

Index

NAME
SYNOPSIS
DESCRIPTION
FORMAT OF THE FONT SPECIFICATION FILE
OPTIONS
AUTHOR
REPORTING BUGS
SEE ALSO
COPYRIGHT