|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pz.platypus.plugin.pdf.PdfFontFactory
public class PdfFontFactory
Handles the complexities of creating a font for iText
Field Summary | |
---|---|
private GDD |
gdd
|
private PdfData |
pdfData
|
Constructor Summary | |
---|---|
PdfFontFactory(GDD Gdd,
PdfData pdd)
|
Method Summary | |
---|---|
(package private) java.lang.String |
computeBase14ItextFontName(PdfFont font)
Gets the iText font name for any of the Base14 fonts. |
(package private) int |
computeItextStyle(PdfFont f)
iText font style captures bold, italic, strikethru, underline. |
com.lowagie.text.Font |
createItextFont(PdfFont f)
Creates an iText Font object based on a passed-in PdfFont |
(package private) java.lang.String |
createItextFontName(PdfFont f)
Get the name by which iText refers to this font. |
(package private) void |
errFontNotFound(java.lang.String typefaceName)
|
(package private) void |
errTtcFileHandling(java.lang.String fontFile)
|
(package private) boolean |
findAndRegisterFont(java.lang.String typefaceName)
Get the filenames from the typefaceMap and register them in iText's FontFactory. |
(package private) com.lowagie.text.Font |
getCp1252Font(java.lang.String fontName,
float size,
int style)
Gets the font with CP1252 (aka WINANSI) encoding |
(package private) com.lowagie.text.Font |
getIdentityHFont(java.lang.String fontName,
float size,
int style)
Opens a font using the IDENTITY-H encoding. |
(package private) boolean |
isBase14Font(java.lang.String fontName)
Determines whehter the current font is one of the Base14 Acrobat fonts, built into every PDF reader. |
(package private) boolean |
isRegisteredWithItext(java.lang.String fontName)
This test whether a font is registered by name or by family name in iText. |
(package private) java.lang.String[] |
lookupFontFilenames(java.lang.String typefaceName)
Get the names of the actual font files that are the implementation of this typeface |
private void |
registerFont(java.lang.String fontFile)
Actual font registration. |
(package private) void |
registerOneFont(java.lang.String fontFile,
java.lang.String typeface)
Unfortunately, iText does not pass along the exception if the file cannot be found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private GDD gdd
private PdfData pdfData
Constructor Detail |
---|
public PdfFontFactory(GDD Gdd, PdfData pdd)
Method Detail |
---|
public com.lowagie.text.Font createItextFont(PdfFont f)
f
- the PdfFont containing the parameters for the font
int computeItextStyle(PdfFont f)
f
- the PdfFont whose style is being checked
java.lang.String computeBase14ItextFontName(PdfFont font)
font
- the PdfFont whose name we're looking up.
java.lang.String createItextFontName(PdfFont f)
f
- PdfFont whose iText name we're getting
boolean isRegisteredWithItext(java.lang.String fontName)
fontName
- the font we're checking
boolean findAndRegisterFont(java.lang.String typefaceName)
typefaceName
- name of the typeface
com.lowagie.text.Font getCp1252Font(java.lang.String fontName, float size, int style)
fontName
- name of font to getsize
- size in pointsstyle
- bold, italic, etc.
com.lowagie.text.Font getIdentityHFont(java.lang.String fontName, float size, int style)
fontName
- the name assigned to the font in the font listsize
- the size in pointsstyle
- bold, italic, etc.
boolean isBase14Font(java.lang.String fontName)
fontName
- name of the font face
java.lang.String[] lookupFontFilenames(java.lang.String typefaceName)
typefaceName
- the typefaces
private void registerFont(java.lang.String fontFile)
fontFile
- the complete filename including the pathvoid registerOneFont(java.lang.String fontFile, java.lang.String typeface)
fontFile
- the file location and nametypeface
- the name of the typeface to register the font forvoid errFontNotFound(java.lang.String typefaceName)
void errTtcFileHandling(java.lang.String fontFile)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |