Home » iText-2.1.7 » com.lowagie » text » pdf » [javadoc | source]
com.lowagie.text.pdf
abstract public class: BaseFont [javadoc | source]
java.lang.Object
   com.lowagie.text.pdf.BaseFont

Direct Known Subclasses:
    CJKFont, EnumerateTTC, TrueTypeFont, CMapAwareDocumentFont, DocumentFont, Type3Font, TrueTypeFontUnicode, Type1Font

Base class for the several font types supported
Nested Class Summary:
static class  BaseFont.StreamFont  Generates the PDF stream with the Type1 and Truetype fonts returning a PdfStream. 
Field Summary
public static final  String COURIER    This is a possible value of a base 14 type 1 font 
public static final  String COURIER_BOLD    This is a possible value of a base 14 type 1 font 
public static final  String COURIER_OBLIQUE    This is a possible value of a base 14 type 1 font 
public static final  String COURIER_BOLDOBLIQUE    This is a possible value of a base 14 type 1 font 
public static final  String HELVETICA    This is a possible value of a base 14 type 1 font 
public static final  String HELVETICA_BOLD    This is a possible value of a base 14 type 1 font 
public static final  String HELVETICA_OBLIQUE    This is a possible value of a base 14 type 1 font 
public static final  String HELVETICA_BOLDOBLIQUE    This is a possible value of a base 14 type 1 font 
public static final  String SYMBOL    This is a possible value of a base 14 type 1 font 
public static final  String TIMES_ROMAN    This is a possible value of a base 14 type 1 font 
public static final  String TIMES_BOLD    This is a possible value of a base 14 type 1 font 
public static final  String TIMES_ITALIC    This is a possible value of a base 14 type 1 font 
public static final  String TIMES_BOLDITALIC    This is a possible value of a base 14 type 1 font 
public static final  String ZAPFDINGBATS    This is a possible value of a base 14 type 1 font 
public static final  int ASCENT    The maximum height above the baseline reached by glyphs in this font, excluding the height of glyphs for accented characters. 
public static final  int CAPHEIGHT    The y coordinate of the top of flat capital letters, measured from the baseline. 
public static final  int DESCENT    The maximum depth below the baseline reached by glyphs in this font. The value is a negative number. 
public static final  int ITALICANGLE    The angle, expressed in degrees counterclockwise from the vertical, of the dominant vertical strokes of the font. The value is negative for fonts that slope to the right, as almost all italic fonts do. 
public static final  int BBOXLLX    The lower left x glyph coordinate. 
public static final  int BBOXLLY    The lower left y glyph coordinate. 
public static final  int BBOXURX    The upper right x glyph coordinate. 
public static final  int BBOXURY    The upper right y glyph coordinate. 
public static final  int AWT_ASCENT    java.awt.Font property 
public static final  int AWT_DESCENT    java.awt.Font property 
public static final  int AWT_LEADING    java.awt.Font property 
public static final  int AWT_MAXADVANCE    java.awt.Font property 
public static final  int UNDERLINE_POSITION    The underline position. Usually a negative value. 
public static final  int UNDERLINE_THICKNESS    The underline thickness. 
public static final  int STRIKETHROUGH_POSITION    The strikethrough position. 
public static final  int STRIKETHROUGH_THICKNESS    The strikethrough thickness. 
public static final  int SUBSCRIPT_SIZE    The recommended vertical size for subscripts for this font. 
public static final  int SUBSCRIPT_OFFSET    The recommended vertical offset from the baseline for subscripts for this font. Usually a negative value. 
public static final  int SUPERSCRIPT_SIZE    The recommended vertical size for superscripts for this font. 
public static final  int SUPERSCRIPT_OFFSET    The recommended vertical offset from the baseline for superscripts for this font. 
public static final  int FONT_TYPE_T1    The font is Type 1. 
public static final  int FONT_TYPE_TT    The font is True Type with a standard encoding. 
public static final  int FONT_TYPE_CJK    The font is CJK. 
public static final  int FONT_TYPE_TTUNI    The font is True Type with a Unicode encoding. 
public static final  int FONT_TYPE_DOCUMENT    A font already inside the document. 
public static final  int FONT_TYPE_T3    A Type3 font. 
public static final  String IDENTITY_H    The Unicode encoding with horizontal writing. 
public static final  String IDENTITY_V    The Unicode encoding with vertical writing. 
public static final  String CP1250    A possible encoding. 
public static final  String CP1252    A possible encoding. 
public static final  String CP1257    A possible encoding. 
public static final  String WINANSI    A possible encoding. 
public static final  String MACROMAN    A possible encoding. 
public static final  int[] CHAR_RANGE_LATIN     
public static final  int[] CHAR_RANGE_ARABIC     
public static final  int[] CHAR_RANGE_HEBREW     
public static final  int[] CHAR_RANGE_CYRILLIC     
public static final  boolean EMBEDDED    if the font has to be embedded 
public static final  boolean NOT_EMBEDDED    if the font doesn't have to be embedded 
public static final  boolean CACHED    if the font has to be cached 
public static final  boolean NOT_CACHED    if the font doesn't have to be cached 
public static final  String RESOURCE_PATH    The path to the font resources. 
public static final  char CID_NEWLINE    The fake CID code that represents a newline. 
protected  ArrayList subsetRanges     
 int fontType    The font type. 
public static final  String notdef    a not defined character in a custom PDF encoding 
protected  int[] widths    table of characters widths for this encoding 
protected  String[] differences    encoding names 
protected  char[] unicodeDifferences    same as differences but with the unicode codes 
protected  int[][] charBBoxes     
protected  String encoding    encoding used with this font 
protected  boolean embedded    true if the font is to be embedded in the PDF 
protected  int compressionLevel    The compression level for the font stream.
    since: 2.1.3 -
 
protected  boolean fontSpecific    true if the font must use its built in encoding. In that case the encoding is only used to map a char to the position inside the font, not to the expected char name. 
protected static  HashMap fontCache    cache for the fonts already used. 
protected static final  HashMap BuiltinFonts14    list of the 14 built in fonts. 
protected  boolean forceWidthsOutput    Forces the output of the width array. Only matters for the 14 built-in fonts. 
protected  boolean directTextToByte    Converts char directly to byte by casting. 
protected  boolean subset    Indicates if all the glyphs and widths for that particular encoding should be included in the document. 
protected  boolean fastWinansi     
protected  IntHashtable specialMap    Custom encodings use this map to key the Unicode character to the single byte code. 
Constructor:
 protected BaseFont() 
Method from com.lowagie.text.pdf.BaseFont Summary:
addSubsetRange,   charExists,   convertToBytes,   convertToBytes,   correctArabicAdvance,   createEncoding,   createFont,   createFont,   createFont,   createFont,   createFont,   createFont,   createFont,   createSubsetPrefix,   enumerateTTCNames,   enumerateTTCNames,   getAllFontNames,   getAllNameEntries,   getAllNameEntries,   getAscent,   getAscentPoint,   getBaseName,   getCharBBox,   getCidCode,   getCodePagesSupported,   getCompressionLevel,   getDescent,   getDescentPoint,   getDifferences,   getDocumentFonts,   getDocumentFonts,   getEncoding,   getFamilyFontName,   getFontDescriptor,   getFontType,   getFullFontName,   getFullFontName,   getFullFontStream,   getKerning,   getPostscriptFontName,   getRawCharBBox,   getRawWidth,   getResourceStream,   getResourceStream,   getUnicodeDifferences,   getUnicodeDifferences,   getUnicodeEquivalent,   getWidth,   getWidth,   getWidthPoint,   getWidthPoint,   getWidthPointKerned,   getWidths,   hasKernPairs,   isDirectTextToByte,   isEmbedded,   isFontSpecific,   isForceWidthsOutput,   isSubset,   normalizeEncoding,   setCharAdvance,   setCompressionLevel,   setDirectTextToByte,   setForceWidthsOutput,   setKerning,   setPostscriptFontName,   setSubset,   writeFont
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.pdf.BaseFont Detail:
 public  void addSubsetRange(int[] range) 
    Adds a character range when subsetting. The range is an int array where the first element is the start range inclusive and the second element is the end range inclusive. Several ranges are allowed in the same array.
 public boolean charExists(int c) 
    Checks if a character exists in this font.
 byte[] convertToBytes(String text) 
    Converts a String to a byte array according to the font's encoding.
 byte[] convertToBytes(int char1) 
    Converts a char to a byte array according to the font's encoding.
 public  void correctArabicAdvance() 
    iText expects Arabic Diactrics (tashkeel) to have zero advance but some fonts, most notably those that come with Windows, like times.ttf, have non-zero advance for those characters. This method makes those character to have zero width advance and work correctly in the iText Arabic shaping and reordering context.
 protected  void createEncoding() 
    Creates the widths and the differences arrays
 public static BaseFont createFont() throws DocumentException, IOException 
    Creates a new font. This will always be the default Helvetica font (not embedded). This method is introduced because Helvetica is used in many examples.
 public static BaseFont createFont(PRIndirectReference fontRef) 
    Creates a font based on an existing document font. The created font font may not behave as expected, depending on the encoding or subset.
 public static BaseFont createFont(String name,
    String encoding,
    boolean embedded) throws DocumentException, IOException 
    Creates a new font. This font can be one of the 14 built in types, a Type1 font referred to by an AFM or PFM file, a TrueType font (simple or collection) or a CJK font from the Adobe Asian Font Pack. TrueType fonts and CJK fonts can have an optional style modifier appended to the name. These modifiers are: Bold, Italic and BoldItalic. An example would be "STSong-Light,Bold". Note that this modifiers do not work if the font is embedded. Fonts in TrueType collections are addressed by index such as "msgothic.ttc,1". This would get the second font (indexes start at 0), in this case "MS PGothic".

    The fonts are cached and if they already exist they are extracted from the cache, not parsed again.

    Besides the common encodings described by name, custom encodings can also be made. These encodings will only work for the single byte fonts Type1 and TrueType. The encoding string starts with a '#' followed by "simple" or "full". If "simple" there is a decimal for the first character position and then a list of hex values representing the Unicode codes that compose that encoding.
    The "simple" encoding is recommended for TrueType fonts as the "full" encoding risks not matching the character with the right glyph if not done with care.
    The "full" encoding is specially aimed at Type1 fonts where the glyphs have to be described by non standard names like the Tex math fonts. Each group of three elements compose a code position: the one byte code order in decimal or as 'x' (x cannot be the space), the name and the Unicode character used to access the glyph. The space must be assigned to character position 32 otherwise text justification will not work.

    Example for a "simple" encoding that includes the Unicode character space, A, B and ecyrillic:

    "# simple 32 0020 0041 0042 0454"
    

    Example for a "full" encoding for a Type1 Tex font:

    "# full 'A' nottriangeqlleft 0041 'B' dividemultiply 0042 32 space 0020"
    

    This method calls:

    createFont(name, encoding, embedded, true, null, null);
    
 public static BaseFont createFont(String name,
    String encoding,
    boolean embedded,
    boolean forceRead) throws DocumentException, IOException 
    Creates a new font. This font can be one of the 14 built in types, a Type1 font referred to by an AFM or PFM file, a TrueType font (simple or collection) or a CJK font from the Adobe Asian Font Pack. TrueType fonts and CJK fonts can have an optional style modifier appended to the name. These modifiers are: Bold, Italic and BoldItalic. An example would be "STSong-Light,Bold". Note that this modifiers do not work if the font is embedded. Fonts in TrueType collections are addressed by index such as "msgothic.ttc,1". This would get the second font (indexes start at 0), in this case "MS PGothic".

    The fonts are cached and if they already exist they are extracted from the cache, not parsed again.

    Besides the common encodings described by name, custom encodings can also be made. These encodings will only work for the single byte fonts Type1 and TrueType. The encoding string starts with a '#' followed by "simple" or "full". If "simple" there is a decimal for the first character position and then a list of hex values representing the Unicode codes that compose that encoding.
    The "simple" encoding is recommended for TrueType fonts as the "full" encoding risks not matching the character with the right glyph if not done with care.
    The "full" encoding is specially aimed at Type1 fonts where the glyphs have to be described by non standard names like the Tex math fonts. Each group of three elements compose a code position: the one byte code order in decimal or as 'x' (x cannot be the space), the name and the Unicode character used to access the glyph. The space must be assigned to character position 32 otherwise text justification will not work.

    Example for a "simple" encoding that includes the Unicode character space, A, B and ecyrillic:

    "# simple 32 0020 0041 0042 0454"
    

    Example for a "full" encoding for a Type1 Tex font:

    "# full 'A' nottriangeqlleft 0041 'B' dividemultiply 0042 32 space 0020"
    

    This method calls:

    createFont(name, encoding, embedded, true, null, null);
    
 public static BaseFont createFont(String name,
    String encoding,
    boolean embedded,
    boolean cached,
    byte[] ttfAfm,
    byte[] pfb) throws DocumentException, IOException 
    Creates a new font. This font can be one of the 14 built in types, a Type1 font referred to by an AFM or PFM file, a TrueType font (simple or collection) or a CJK font from the Adobe Asian Font Pack. TrueType fonts and CJK fonts can have an optional style modifier appended to the name. These modifiers are: Bold, Italic and BoldItalic. An example would be "STSong-Light,Bold". Note that this modifiers do not work if the font is embedded. Fonts in TrueType collections are addressed by index such as "msgothic.ttc,1". This would get the second font (indexes start at 0), in this case "MS PGothic".

    The fonts may or may not be cached depending on the flag cached. If the byte arrays are present the font will be read from them instead of the name. A name is still required to identify the font type.

    Besides the common encodings described by name, custom encodings can also be made. These encodings will only work for the single byte fonts Type1 and TrueType. The encoding string starts with a '#' followed by "simple" or "full". If "simple" there is a decimal for the first character position and then a list of hex values representing the Unicode codes that compose that encoding.
    The "simple" encoding is recommended for TrueType fonts as the "full" encoding risks not matching the character with the right glyph if not done with care.
    The "full" encoding is specially aimed at Type1 fonts where the glyphs have to be described by non standard names like the Tex math fonts. Each group of three elements compose a code position: the one byte code order in decimal or as 'x' (x cannot be the space), the name and the Unicode character used to access the glyph. The space must be assigned to character position 32 otherwise text justification will not work.

    Example for a "simple" encoding that includes the Unicode character space, A, B and ecyrillic:

    "# simple 32 0020 0041 0042 0454"
    

    Example for a "full" encoding for a Type1 Tex font:

    "# full 'A' nottriangeqlleft 0041 'B' dividemultiply 0042 32 space 0020"
    
 public static BaseFont createFont(String name,
    String encoding,
    boolean embedded,
    boolean cached,
    byte[] ttfAfm,
    byte[] pfb,
    boolean noThrow) throws DocumentException, IOException 
    Creates a new font. This font can be one of the 14 built in types, a Type1 font referred to by an AFM or PFM file, a TrueType font (simple or collection) or a CJK font from the Adobe Asian Font Pack. TrueType fonts and CJK fonts can have an optional style modifier appended to the name. These modifiers are: Bold, Italic and BoldItalic. An example would be "STSong-Light,Bold". Note that this modifiers do not work if the font is embedded. Fonts in TrueType collections are addressed by index such as "msgothic.ttc,1". This would get the second font (indexes start at 0), in this case "MS PGothic".

    The fonts may or may not be cached depending on the flag cached. If the byte arrays are present the font will be read from them instead of the name. A name is still required to identify the font type.

    Besides the common encodings described by name, custom encodings can also be made. These encodings will only work for the single byte fonts Type1 and TrueType. The encoding string starts with a '#' followed by "simple" or "full". If "simple" there is a decimal for the first character position and then a list of hex values representing the Unicode codes that compose that encoding.
    The "simple" encoding is recommended for TrueType fonts as the "full" encoding risks not matching the character with the right glyph if not done with care.
    The "full" encoding is specially aimed at Type1 fonts where the glyphs have to be described by non standard names like the Tex math fonts. Each group of three elements compose a code position: the one byte code order in decimal or as 'x' (x cannot be the space), the name and the Unicode character used to access the glyph. The space must be assigned to character position 32 otherwise text justification will not work.

    Example for a "simple" encoding that includes the Unicode character space, A, B and ecyrillic:

    "# simple 32 0020 0041 0042 0454"
    

    Example for a "full" encoding for a Type1 Tex font:

    "# full 'A' nottriangeqlleft 0041 'B' dividemultiply 0042 32 space 0020"
    
 public static BaseFont createFont(String name,
    String encoding,
    boolean embedded,
    boolean cached,
    byte[] ttfAfm,
    byte[] pfb,
    boolean noThrow,
    boolean forceRead) throws DocumentException, IOException 
    Creates a new font. This font can be one of the 14 built in types, a Type1 font referred to by an AFM or PFM file, a TrueType font (simple or collection) or a CJK font from the Adobe Asian Font Pack. TrueType fonts and CJK fonts can have an optional style modifier appended to the name. These modifiers are: Bold, Italic and BoldItalic. An example would be "STSong-Light,Bold". Note that this modifiers do not work if the font is embedded. Fonts in TrueType collections are addressed by index such as "msgothic.ttc,1". This would get the second font (indexes start at 0), in this case "MS PGothic".

    The fonts may or may not be cached depending on the flag cached. If the byte arrays are present the font will be read from them instead of the name. A name is still required to identify the font type.

    Besides the common encodings described by name, custom encodings can also be made. These encodings will only work for the single byte fonts Type1 and TrueType. The encoding string starts with a '#' followed by "simple" or "full". If "simple" there is a decimal for the first character position and then a list of hex values representing the Unicode codes that compose that encoding.
    The "simple" encoding is recommended for TrueType fonts as the "full" encoding risks not matching the character with the right glyph if not done with care.
    The "full" encoding is specially aimed at Type1 fonts where the glyphs have to be described by non standard names like the Tex math fonts. Each group of three elements compose a code position: the one byte code order in decimal or as 'x' (x cannot be the space), the name and the Unicode character used to access the glyph. The space must be assigned to character position 32 otherwise text justification will not work.

    Example for a "simple" encoding that includes the Unicode character space, A, B and ecyrillic:

    "# simple 32 0020 0041 0042 0454"
    

    Example for a "full" encoding for a Type1 Tex font:

    "# full 'A' nottriangeqlleft 0041 'B' dividemultiply 0042 32 space 0020"
    
 public static String createSubsetPrefix() 
    Creates a unique subset prefix to be added to the font name when the font is embedded and subset.
 public static String[] enumerateTTCNames(String ttcFile) throws DocumentException, IOException 
    Enumerates the postscript font names present inside a True Type Collection.
 public static String[] enumerateTTCNames(byte[] ttcArray) throws DocumentException, IOException 
    Enumerates the postscript font names present inside a True Type Collection.
 public static Object[] getAllFontNames(String name,
    String encoding,
    byte[] ttfAfm) throws DocumentException, IOException 
    Gets all the names from the font. Only the required tables are read.
 abstract public String[][] getAllNameEntries()
    Gets all the entries of the names-table. If it is a True Type font each array element will have {Name ID, Platform ID, Platform Encoding ID, Language ID, font name}. The interpretation of this values can be found in the Open Type specification, chapter 2, in the 'name' table.
    For the other fonts the array has a single element with {"4", "", "", "", font name}.
 public static String[][] getAllNameEntries(String name,
    String encoding,
    byte[] ttfAfm) throws DocumentException, IOException 
    Gets all the entries of the namestable from the font. Only the required tables are read.
 public int getAscent(String text) 
    Gets the ascent of a String in normalized 1000 units. The ascent will always be greater than or equal to zero even if all the characters have a lower ascent.
 public float getAscentPoint(String text,
    float fontSize) 
    Gets the ascent of a String in points. The ascent will always be greater than or equal to zero even if all the characters have a lower ascent.
 protected static String getBaseName(String name) 
    Gets the name without the modifiers Bold, Italic or BoldItalic.
 public int[] getCharBBox(int c) 
    Gets the smallest box enclosing the character contours. It will return null if the font has not the information or the character has no contours, as in the case of the space, for example. Characters with no contours may also return [0,0,0,0].
 public int getCidCode(int c) 
    Gets the CID code given an Unicode. It has only meaning with CJK fonts.
 public String[] getCodePagesSupported() 
    Gets the code pages supported by the font. This has only meaning with True Type fonts.
 public int getCompressionLevel() 
    Returns the compression level used for the font streams.
 public int getDescent(String text) 
    Gets the descent of a String in normalized 1000 units. The descent will always be less than or equal to zero even if all the characters have an higher descent.
 public float getDescentPoint(String text,
    float fontSize) 
    Gets the descent of a String in points. The descent will always be less than or equal to zero even if all the characters have an higher descent.
 public String[] getDifferences() 
    Gets the array with the names of the characters.
 public static ArrayList getDocumentFonts(PdfReader reader) 
    Gets a list of all document fonts. Each element of the ArrayList contains a Object[]{String,PRIndirectReference} with the font name and the indirect reference to it.
 public static ArrayList getDocumentFonts(PdfReader reader,
    int page) 
    Gets a list of the document fonts in a particular page. Each element of the ArrayList contains a Object[]{String,PRIndirectReference} with the font name and the indirect reference to it.
 public String getEncoding() 
    Gets the encoding used to convert String into byte[].
 abstract public String[][] getFamilyFontName()
    Gets the family name of the font. If it is a True Type font each array element will have {Platform ID, Platform Encoding ID, Language ID, font name}. The interpretation of this values can be found in the Open Type specification, chapter 2, in the 'name' table.
    For the other fonts the array has a single element with {"", "", "", font name}.
 abstract public float getFontDescriptor(int key,
    float fontSize)
    Gets the font parameter identified by key. Valid values for key are ASCENT, AWT_ASCENT, CAPHEIGHT, DESCENT, AWT_DESCENT, ITALICANGLE, BBOXLLX, BBOXLLY, BBOXURX and BBOXURY.
 public int getFontType() 
    Gets the font type. The font types can be: FONT_TYPE_T1, FONT_TYPE_TT, FONT_TYPE_CJK and FONT_TYPE_TTUNI.
 abstract public String[][] getFullFontName()
    Gets the full name of the font. If it is a True Type font each array element will have {Platform ID, Platform Encoding ID, Language ID, font name}. The interpretation of this values can be found in the Open Type specification, chapter 2, in the 'name' table.
    For the other fonts the array has a single element with {"", "", "", font name}.
 public static String[][] getFullFontName(String name,
    String encoding,
    byte[] ttfAfm) throws DocumentException, IOException 
    Gets the full name of the font. If it is a True Type font each array element will have {Platform ID, Platform Encoding ID, Language ID, font name}. The interpretation of this values can be found in the Open Type specification, chapter 2, in the 'name' table.
    For the other fonts the array has a single element with {"", "", "", font name}.
 abstract PdfStream getFullFontStream() throws IOException, DocumentException
    Returns a PdfStream object with the full font program (if possible). This method will return null for some types of fonts (CJKFont, Type3Font) or if there is no font program available (standard Type 1 fonts).
 abstract public int getKerning(int char1,
    int char2)
    Gets the kerning between two Unicode chars.
 abstract public String getPostscriptFontName()
    Gets the postscript font name.
 abstract protected int[] getRawCharBBox(int c,
    String name)
 abstract int getRawWidth(int c,
    String name)
    Gets the width from the font according to the Unicode char c or the name. If the name is null it's a symbolic font.
 public static InputStream getResourceStream(String key) 
    Gets the font resources.
 public static InputStream getResourceStream(String key,
    ClassLoader loader) 
    Gets the font resources.
 public char[] getUnicodeDifferences() 
    Gets the array with the unicode characters.
 char getUnicodeDifferences(int index) 
    Gets the Unicode character corresponding to the byte output to the pdf stream.
 public int getUnicodeEquivalent(int c) 
    Gets the Unicode equivalent to a CID. The (inexistent) CID is translated as '\n'. It has only meaning with CJK fonts with Identity encoding.
 public int getWidth(int char1) 
    Gets the width of a char in normalized 1000 units.
 public int getWidth(String text) 
    Gets the width of a String in normalized 1000 units.
 public float getWidthPoint(String text,
    float fontSize) 
    Gets the width of a String in points.
 public float getWidthPoint(int char1,
    float fontSize) 
    Gets the width of a char in points.
 public float getWidthPointKerned(String text,
    float fontSize) 
    Gets the width of a String in points taking kerning into account.
 public int[] getWidths() 
    Gets the font width array.
 abstract public boolean hasKernPairs()
    Checks if the font has any kerning pairs.
 public boolean isDirectTextToByte() 
    Gets the direct conversion of char to byte.
 public boolean isEmbedded() 
    Gets the embedded flag.
 public boolean isFontSpecific() 
    Gets the symbolic flag of the font.
 public boolean isForceWidthsOutput() 
    Gets the state of the property.
 public boolean isSubset() 
    Indicates if all the glyphs and widths for that particular encoding should be included in the document.
 protected static String normalizeEncoding(String enc) 
    Normalize the encoding names. "winansi" is changed to "Cp1252" and "macroman" is changed to "MacRoman".
 public boolean setCharAdvance(int c,
    int advance) 
    Sets the character advance.
 public  void setCompressionLevel(int compressionLevel) 
    Sets the compression level to be used for the font streams.
 public  void setDirectTextToByte(boolean directTextToByte) 
    Sets the conversion of char directly to byte by casting. This is a low level feature to put the bytes directly in the content stream without passing through String.getBytes().
 public  void setForceWidthsOutput(boolean forceWidthsOutput) 
    Set to true to force the generation of the widths array.
 abstract public boolean setKerning(int char1,
    int char2,
    int kern)
    Sets the kerning between two Unicode chars.
 abstract public  void setPostscriptFontName(String name)
    Sets the font name that will appear in the pdf font dictionary. Use with care as it can easily make a font unreadable if not embedded.
 public  void setSubset(boolean subset) 
    Indicates if all the glyphs and widths for that particular encoding should be included in the document. When set to true only the glyphs used will be included in the font. When set to false and #addSubsetRange(int[]) was not called the full font will be included otherwise just the characters ranges will be included.
 abstract  void writeFont(PdfWriter writer,
    PdfIndirectReference ref,
    Object[] params) throws DocumentException, IOException
    Outputs to the writer the font dictionaries and streams.