com.lowagie.text.pdf
class CJKFont extends BaseFont
| Field Summary | |
|---|---|
| static Hashtable | allCMaps |
| static Hashtable | allFonts |
| static int | BRACKET |
| boolean | cidDirect |
| static Properties | cjkEncodings |
| static Properties | cjkFonts |
| static String | CJK_ENCODING The encoding used in the PDF document for CJK fonts |
| String | CMap The CMap name associated with this font |
| HashMap | fontDesc |
| String | fontName The font name |
| static int | FIRST |
| IntHashtable | hMetrics |
| static boolean | propertiesLoaded |
| String | style The style modifier |
| static int | SERIAL |
| char[] | translationMap |
| boolean | vertical |
| IntHashtable | vMetrics |
| static int | V1Y |
| Constructor Summary | |
|---|---|
| CJKFont(String fontName, String enc, boolean emb) Creates a CJK font. | |
| Method Summary | |
|---|---|
| boolean | charExists(int 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) |
| String[][] | getAllNameEntries() Gets all the entries of the names-table. |
| float | getBBox(int idx) |
| int[] | getCharBBox(int c) |
| int | getCidCode(int c) |
| PdfDictionary | getCIDFont(PdfIndirectReference fontDescriptor, IntHashtable cjkTag) |
| float | getDescNumber(String name) |
| String[][] | getFamilyFontName() Gets the family name of the font. |
| PdfDictionary | getFontBaseType(PdfIndirectReference CIDFont) |
| PdfDictionary | getFontDescriptor() |
| float | getFontDescriptor(int key, float fontSize) Gets the font parameter identified by key. |
| String[][] | getFullFontName() Gets the full name of the font. |
| PdfStream | getFullFontStream()
You can't get the FontStream of a CJK font (CJK fonts are never embedded),
so this method always returns null. |
| int | getKerning(int char1, int char2) |
| String | getPostscriptFontName() |
| protected int[] | getRawCharBBox(int c, String name) |
| int | getRawWidth(int c, String name) |
| int | getUnicodeEquivalent(int c) |
| int | getWidth(int char1)
Gets the width of a char in normalized 1000 units. |
| int | getWidth(String text) |
| boolean | hasKernPairs() Checks if the font has any kerning pairs. |
| static boolean | isCJKFont(String fontName, String enc) Checks if its a valid CJK font. |
| static void | loadProperties() |
| static char[] | readCMap(String name) |
| static HashMap | readFontProperties(String name) |
| boolean | setCharAdvance(int c, int advance)
Sets the character advance. |
| boolean | setKerning(int char1, int char2, int kern) |
| void | setPostscriptFontName(String name)
Sets the font name that will appear in the pdf font dictionary.
|
| void | writeFont(PdfWriter writer, PdfIndirectReference ref, Object[] params) |
Parameters: fontName the name of the font enc the encoding of the font emb always false. CJK font and not embedded
Throws: DocumentException on error
Parameters: c the character to check
Returns: true if the character has a glyph,
false otherwise
Returns: the full name of the font
Returns: the family name of the font
key. Valid values
for key are ASCENT, CAPHEIGHT, DESCENT
and ITALICANGLE.Parameters: key the parameter to be extracted fontSize the font size in points
Returns: the parameter in points
Returns: the full name of the font
Returns: null
Since: 2.1.3
char in normalized 1000 units.Parameters: char1 the unicode char to get the width of
Returns: the width in normalized 1000 units
Returns: always false
Parameters: fontName the font name enc the encoding
Returns: true if it is CJK font
Parameters: c the character advance the character advance normalized to 1000 units
Returns: true if the advance was set,
false otherwise. Will always return false
Parameters: name the new font name