|
jPod PDF library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.pdf.font.PDFontTools
public class PDFontTools
Tool class for handling PDF fonts.
For more sophisticated help, see IFontOutlet.
| Constructor Summary | |
|---|---|
PDFontTools()
|
|
| Method Summary | |
|---|---|
static PDFont |
createBuiltinFont(String name)
Create a well known Type1 font. |
static PDFont |
getFont(PDDocument document,
PDResources resources,
COSName name)
The font name, looked up in resources. |
static PDFont |
getFont(PDResources resources,
COSName name)
The font name, looked up in resources. |
static List |
getFonts(PDDocument doc)
Determine the fonts contained as objects within the document. |
static float |
getGlyphHeight(PDFont font)
The font height in user space coordinates. |
static float |
getGlyphHeightScaled(PDFont font,
float size)
The scaled font height in user space coordinates. |
static int |
getGlyphWidthEncoded(PDFont font,
byte[] codepoints,
int offset,
int length)
The sum of the length of all glyphs referenced by length
bytes from codepoints starting at offset. |
static float |
getGlyphWidthEncodedScaled(PDFont font,
float size,
byte[] codepoints,
int offset,
int length)
The scaled sum of the length of all glyphs referenced by length bytes from codepoints starting at
offset. |
static PDFont |
getType0Font(PDFont font)
"Scale up" font to a multibyte font. |
static List |
getUsedFonts(PDDocument doc,
boolean considerTR)
Tries to determine which fonts are really used within the document The following criteria are used to determine usage of a font. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PDFontTools()
| Method Detail |
|---|
public static PDFont createBuiltinFont(String name)
name - The font name.
public static PDFont getFont(PDDocument document,
PDResources resources,
COSName name)
name, looked up in resources.
When no matching resource is found, a builtin font is created on the fly.
document - resources - name -
name, looked up in resources.
public static PDFont getFont(PDResources resources,
COSName name)
name, looked up in resources.
resources - name -
name, looked up in resources.public static List getFonts(PDDocument doc)
doc - The PDDocument to parse
PDFont objects in the document.public static float getGlyphHeight(PDFont font)
font - The font to be used.
public static float getGlyphHeightScaled(PDFont font,
float size)
font - The font to be used.size - The font size
public static int getGlyphWidthEncoded(PDFont font,
byte[] codepoints,
int offset,
int length)
length
bytes from codepoints starting at offset.
font - codepoints - offset - length -
length bytes from codepoints starting
at offset.
public static float getGlyphWidthEncodedScaled(PDFont font,
float size,
byte[] codepoints,
int offset,
int length)
length bytes from codepoints starting at
offset.
font - size - codepoints - offset - length -
length bytes from codepoints starting
at offset.public static PDFont getType0Font(PDFont font)
font to a multibyte font.
font -
public static List getUsedFonts(PDDocument doc,
boolean considerTR)
doc - The PDDocument to parseconsiderTR - If true, considers font references with Text rendering mode 3
as unused
|
jPod PDF library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||