Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.0.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xmlgraphics.ps
Class PSFontUtils

    java.lang.Object
      org.apache.xmlgraphics.ps.PSFontUtils

    public class PSFontUtils

extends Object

Utility code for font handling in PostScript.

Field Summary
`static PSResource` | `ADOBECYRILLIC_ENCODING_RESOURCE` the PSResource representing the AdobeStandardCyrillicEncoding.
`static PSResource` | `WINANSI_ENCODING_RESOURCE` the PSResource representing the WinAnsiEncoding.

Constructor Summary
`PSFontUtils()`

Method Summary
`static void` | `defineAdobeCyrillicEncoding(PSGenerator gen)` Defines the AdobeStandardCyrillic encoding for use in PostScript files.
`static void` | `defineWinAnsiEncoding(PSGenerator gen)` Defines the WinAnsi encoding for use in PostScript files.
`static void` | `embedType1Font(PSGenerator gen, InputStream in)` This method reads a Type 1 font from a stream and embeds it into a PostScript stream.
`static void` | `redefineFontEncoding(PSGenerator gen, String fontName, String encoding)` Redefines the encoding of a font.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### WINANSI_ENCODING_RESOURCE

    public static final PSResource WINANSI_ENCODING_RESOURCE

  the PSResource representing the WinAnsiEncoding.

### ADOBECYRILLIC_ENCODING_RESOURCE

    public static final PSResource ADOBECYRILLIC_ENCODING_RESOURCE

  the PSResource representing the AdobeStandardCyrillicEncoding.

Constructor Detail

### PSFontUtils

    public PSFontUtils()

Method Detail

### embedType1Font

    public static void embedType1Font(PSGenerator gen,
                                      InputStream in)
                               throws IOException

  This method reads a Type 1 font from a stream and embeds it into a PostScript stream. Note: Only the IBM PC Format as described in section 3.3 of the Adobe Technical Note #5040 is supported.

  Parameters:
    `gen` - The PostScript generator
    `in` - the InputStream from which to read the Type 1 font
  Throws:
    `IOException` - in case an I/O problem occurs

### defineWinAnsiEncoding

    public static void defineWinAnsiEncoding(PSGenerator gen)
                                      throws IOException

  Defines the WinAnsi encoding for use in PostScript files.

  Parameters:
    `gen` - the PostScript generator
  Throws:
    `IOException` - In case of an I/O problem

### defineAdobeCyrillicEncoding

    public static void defineAdobeCyrillicEncoding(PSGenerator gen)
                                            throws IOException

  Defines the AdobeStandardCyrillic encoding for use in PostScript files.

  Parameters:
    `gen` - the PostScript generator
  Throws:
    `IOException` - In case of an I/O problem

### redefineFontEncoding

    public static void redefineFontEncoding(PSGenerator gen,
                                            String fontName,
                                            String encoding)
                                     throws IOException

  Redefines the encoding of a font.

  Parameters:
    `gen` - the PostScript generator
    `fontName` - the font name
    `encoding` - the new encoding (must be predefined in the PS file)
  Throws:
    `IOException` - In case of an I/O problem

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.0.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2015 The Apache Software Foundation. All Rights Reserved.