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(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) |
float | getBBox(int idx) |
int[] | getCharBBox(char c) |
char | getCidCode(char 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. |
int | getKerning(char char1, char char2) |
String | getPostscriptFontName() |
protected int[] | getRawCharBBox(int c, String name) |
int | getRawWidth(int c, String name) |
char | getUnicodeEquivalent(char c) |
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(char c, int advance)
Sets the character advance. |
boolean | setKerning(char char1, char 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 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: 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