| java.lang.Object com.lowagie.text.pdf.BaseFont com.lowagie.text.pdf.CJKFont
CJKFont | class CJKFont extends BaseFont (Code) | | Creates a CJK font compatible with the fonts in the Adobe Asian font Pack.
author: Paulo Soares (psoares@consiste.pt) |
Constructor Summary | |
| CJKFont(String fontName, String enc, boolean emb) Creates a CJK font.
Parameters: fontName - the name of the font Parameters: enc - the encoding of the font Parameters: emb - always false . |
Method Summary | |
public boolean | charExists(char c) Checks if a character exists in this font. | static String | convertToHCIDMetrics(int keys, IntHashtable h) | static String | convertToVCIDMetrics(int keys, IntHashtable v, IntHashtable h) | static IntHashtable | createMetric(String s) | public int[] | getCharBBox(char c) | public char | getCidCode(char c) | public String[][] | getFamilyFontName() Gets the family name of the font. | public float | getFontDescriptor(int key, float fontSize) Gets the font parameter identified by key . | public String[][] | getFullFontName() Gets the full name of the font. | public int | getKerning(char char1, char char2) | public String | getPostscriptFontName() | protected int[] | getRawCharBBox(int c, String name) | int | getRawWidth(int c, String name) | public char | getUnicodeEquivalent(char c) | public int | getWidth(char char1) Gets the width of a char in normalized 1000 units. | public int | getWidth(String text) | public boolean | hasKernPairs() Checks if the font has any kerning pairs. | public static boolean | isCJKFont(String fontName, String enc) Checks if its a valid CJK font. | static char[] | readCMap(String name) | static HashMap | readFontProperties(String name) | public boolean | setCharAdvance(char c, int advance) Sets the character advance.
Parameters: c - the character Parameters: advance - the character advance normalized to 1000 units true if the advance was set,false otherwise. | public boolean | setKerning(char char1, char char2, int kern) | public void | setPostscriptFontName(String name) Sets the font name that will appear in the pdf font dictionary. | void | writeFont(PdfWriter writer, PdfIndirectReference ref, Object params) |
CJK_ENCODING | final static String CJK_ENCODING(Code) | | The encoding used in the PDF document for CJK fonts
|
CJKFont | CJKFont(String fontName, String enc, boolean emb) throws DocumentException(Code) | | Creates a CJK font.
Parameters: fontName - the name of the font Parameters: enc - the encoding of the font Parameters: emb - always false . CJK font and not embedded throws: DocumentException - on error |
charExists | public boolean charExists(char c)(Code) | | Checks if a character exists in this font.
Parameters: c - the character to check true if the character has a glyph,false otherwise |
getCharBBox | public int[] getCharBBox(char c)(Code) | | |
getCidCode | public char getCidCode(char c)(Code) | | |
getFamilyFontName | public String[][] getFamilyFontName()(Code) | | 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}.
the family name of the font |
getFontDescriptor | public float getFontDescriptor(int key, float fontSize)(Code) | | Gets the font parameter identified by key . Valid values
for key are ASCENT , CAPHEIGHT , DESCENT
and ITALICANGLE .
Parameters: key - the parameter to be extracted Parameters: fontSize - the font size in points the parameter in points |
getFullFontName | public String[][] getFullFontName()(Code) | | 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}.
the full name of the font |
getKerning | public int getKerning(char char1, char char2)(Code) | | |
getPostscriptFontName | public String getPostscriptFontName()(Code) | | |
getRawCharBBox | protected int[] getRawCharBBox(int c, String name)(Code) | | |
getUnicodeEquivalent | public char getUnicodeEquivalent(char c)(Code) | | |
getWidth | public int getWidth(char char1)(Code) | | Gets the width of a char in normalized 1000 units.
Parameters: char1 - the unicode char to get the width of the width in normalized 1000 units |
hasKernPairs | public boolean hasKernPairs()(Code) | | Checks if the font has any kerning pairs.
always false |
isCJKFont | public static boolean isCJKFont(String fontName, String enc)(Code) | | Checks if its a valid CJK font.
Parameters: fontName - the font name Parameters: enc - the encoding true if it is CJK font |
setCharAdvance | public boolean setCharAdvance(char c, int advance)(Code) | | Sets the character advance.
Parameters: c - the character Parameters: advance - the character advance normalized to 1000 units true if the advance was set,false otherwise. Will always return false |
setKerning | public boolean setKerning(char char1, char char2, int kern)(Code) | | |
setPostscriptFontName | public void setPostscriptFontName(String name)(Code) | | 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.
Parameters: name - the new font name |
Methods inherited from com.lowagie.text.pdf.BaseFont | public void addSubsetRange(int[] range)(Code)(Java Doc) public boolean charExists(char c)(Code)(Java Doc) byte[] convertToBytes(String text)(Code)(Java Doc) byte[] convertToBytes(char char1)(Code)(Java Doc) public void correctArabicAdvance()(Code)(Java Doc) protected void createEncoding()(Code)(Java Doc) public static BaseFont createFont(String name, String encoding, boolean embedded) throws DocumentException, IOException(Code)(Java Doc) public static BaseFont createFont(String name, String encoding, boolean embedded, boolean cached, byte ttfAfm, byte pfb) throws DocumentException, IOException(Code)(Java Doc) public static BaseFont createFont(String name, String encoding, boolean embedded, boolean cached, byte ttfAfm, byte pfb, boolean noThrow) throws DocumentException, IOException(Code)(Java Doc) public static BaseFont createFont(PRIndirectReference fontRef)(Code)(Java Doc) public static String createSubsetPrefix()(Code)(Java Doc) public static String[] enumerateTTCNames(String ttcFile) throws DocumentException, IOException(Code)(Java Doc) public static String[] enumerateTTCNames(byte ttcArray) throws DocumentException, IOException(Code)(Java Doc) public static Object[] getAllFontNames(String name, String encoding, byte ttfAfm) throws DocumentException, IOException(Code)(Java Doc) public int getAscent(String text)(Code)(Java Doc) public float getAscentPoint(String text, float fontSize)(Code)(Java Doc) protected static String getBaseName(String name)(Code)(Java Doc) public int[] getCharBBox(char c)(Code)(Java Doc) public char getCidCode(char c)(Code)(Java Doc) public String[] getCodePagesSupported()(Code)(Java Doc) public int getDescent(String text)(Code)(Java Doc) public float getDescentPoint(String text, float fontSize)(Code)(Java Doc) public String[] getDifferences()(Code)(Java Doc) public static ArrayList getDocumentFonts(PdfReader reader)(Code)(Java Doc) public static ArrayList getDocumentFonts(PdfReader reader, int page)(Code)(Java Doc) public String getEncoding()(Code)(Java Doc) abstract public String[][] getFamilyFontName()(Code)(Java Doc) abstract public float getFontDescriptor(int key, float fontSize)(Code)(Java Doc) public int getFontType()(Code)(Java Doc) abstract public String[][] getFullFontName()(Code)(Java Doc) public static String[][] getFullFontName(String name, String encoding, byte ttfAfm) throws DocumentException, IOException(Code)(Java Doc) abstract public int getKerning(char char1, char char2)(Code)(Java Doc) abstract public String getPostscriptFontName()(Code)(Java Doc) abstract protected int[] getRawCharBBox(int c, String name)(Code)(Java Doc) abstract int getRawWidth(int c, String name)(Code)(Java Doc) public static InputStream getResourceStream(String key)(Code)(Java Doc) public static InputStream getResourceStream(String key, ClassLoader loader)(Code)(Java Doc) char getUnicodeDifferences(int index)(Code)(Java Doc) public char[] getUnicodeDifferences()(Code)(Java Doc) public char getUnicodeEquivalent(char c)(Code)(Java Doc) public int getWidth(char char1)(Code)(Java Doc) public int getWidth(String text)(Code)(Java Doc) public float getWidthPoint(String text, float fontSize)(Code)(Java Doc) public float getWidthPoint(char char1, float fontSize)(Code)(Java Doc) public float getWidthPointKerned(String text, float fontSize)(Code)(Java Doc) public int[] getWidths()(Code)(Java Doc) abstract public boolean hasKernPairs()(Code)(Java Doc) public boolean isDirectTextToByte()(Code)(Java Doc) public boolean isEmbedded()(Code)(Java Doc) public boolean isFontSpecific()(Code)(Java Doc) public boolean isForceWidthsOutput()(Code)(Java Doc) public boolean isSubset()(Code)(Java Doc) protected static String normalizeEncoding(String enc)(Code)(Java Doc) public boolean setCharAdvance(char c, int advance)(Code)(Java Doc) public void setDirectTextToByte(boolean directTextToByte)(Code)(Java Doc) public void setForceWidthsOutput(boolean forceWidthsOutput)(Code)(Java Doc) abstract public boolean setKerning(char char1, char char2, int kern)(Code)(Java Doc) abstract public void setPostscriptFontName(String name)(Code)(Java Doc) public void setSubset(boolean subset)(Code)(Java Doc) abstract void writeFont(PdfWriter writer, PdfIndirectReference ref, Object params) throws DocumentException, IOException(Code)(Java Doc)
|
|
|