|
intarsys PDF library API | |||||||||
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 |
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 |
getGlyphWidth(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 |
getGlyphWidthScaled(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 float |
getGlyphWidthScaled(PDFont font,
float size,
int codepoint)
The scaled width of the glyphs referenced by codepoint . |
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 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 getUsedFonts(PDDocument doc, boolean considerTR)
doc
- The PDDocument to parseconsiderTR
- If true, considers font references with Text rendering mode 3
as unused
public static float getGlyphHeightScaled(PDFont font, float size)
font
- The font to be used.size
- The font size
public static float getGlyphHeight(PDFont font)
font
- The font to be used.size
- The font size
public static int getGlyphWidth(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 getGlyphWidthScaled(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 float getGlyphWidthScaled(PDFont font, float size, int codepoint)
codepoint
.
font
- size
- codepoint
-
length
bytes from codepoints
starting at offset
.public static List getFonts(PDDocument doc)
doc
- The PDDocument to parse
PDFont
objects in the document.
|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |