|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pz.platypus.plugin.rtf.RtfFont
public class RtfFont
Handles fonts for the RTF plugin
Field Summary | |
---|---|
private boolean |
bold
is font bold? |
private GDD |
gdd
|
private boolean |
italics
is fond italic? |
private com.lowagie.text.Font |
iTfont
the iText font |
private RtfData |
rtfData
|
private float |
size
font size |
private Source |
source
file and line number of last change |
private java.lang.String |
typeface
the font typeface in the form of a string used by iText |
Constructor Summary | |
---|---|
RtfFont(RtfData rtfData)
|
|
RtfFont(RtfData rdd,
java.lang.String fontName,
RtfFont existingFont)
Constructor for cloning an existing PdfFont, but specifying a different typeface. |
Method Summary | |
---|---|
(package private) int |
computeItextStyle()
iText font style captures bold, italic, strikethru, underline. |
(package private) com.lowagie.text.Font |
createFont(RtfFont f)
Creates an iText Font object based on the class fields |
(package private) java.lang.String |
createItextFontName(RtfFont f)
Get the name by which iText refers to this font. |
(package private) boolean |
findAndRegisterFont(java.lang.String typefaceName)
Get the filenames from the typefaceMap and register them in iText's FontFactory. |
boolean |
getBold()
|
(package private) com.lowagie.text.Font |
getCp1252Font(java.lang.String fontName,
float size,
int style)
Gets the font with CP1252 (aka WINANSI) encoding |
java.lang.String |
getFace()
|
(package private) com.lowagie.text.Font |
getIdentityHFont(java.lang.String fontName,
float size,
int style)
Opens a font using the IDENTITY-H encoding. |
boolean |
getItalics()
|
com.lowagie.text.Font |
getItextFont()
Get the iText font |
float |
getSize()
|
Source |
getSource()
|
(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. |
private boolean |
isFileOtf(java.lang.String fontName)
Looks up a font in the fontlist and determines whether it uses the .otf font format. |
(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 |
void |
setBold(boolean onOff,
Source newSource)
set bold on/off and re-create the iText font to record the change. |
void |
setFace(java.lang.String newFace,
Source newSource)
|
void |
setItalics(boolean onOff,
Source newSource)
set italics on/off and re-create the iText font to record the change. |
void |
setSize(float newSize,
Source newSource)
|
void |
setToDefault()
Initializes all PdfFont fields to defaults, and sets line number to 0 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private com.lowagie.text.Font iTfont
private java.lang.String typeface
private float size
private boolean bold
private boolean italics
private Source source
private GDD gdd
private RtfData rtfData
Constructor Detail |
---|
RtfFont(RtfData rtfData)
public RtfFont(RtfData rdd, java.lang.String fontName, RtfFont existingFont)
rdd
- PDF datafontName
- the name of the new font/typefaceexistingFont
- the font to clone the other attributes fromMethod Detail |
---|
public void setToDefault()
com.lowagie.text.Font createFont(RtfFont f)
f
- the PdfFont containing the parameters for the font
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.
private boolean isFileOtf(java.lang.String fontName)
fontName
- name of font to verify
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.
boolean isBase14Font(java.lang.String fontName)
fontName
- name of the font face
java.lang.String createItextFontName(RtfFont f)
f
- PdfFont whose iText name we're getting
boolean findAndRegisterFont(java.lang.String typefaceName)
typefaceName
- name of the typeface
java.lang.String[] lookupFontFilenames(java.lang.String typefaceName)
typefaceName
- the typefaces
int computeItextStyle()
public boolean getBold()
public boolean getItalics()
public com.lowagie.text.Font getItextFont()
public java.lang.String getFace()
public float getSize()
public Source getSource()
public void setBold(boolean onOff, Source newSource)
onOff
- the new value for the italics settingnewSource
- the file and line # of the token that changed italicspublic void setItalics(boolean onOff, Source newSource)
onOff
- the new value for the italics settingnewSource
- the file and line # of the token that changed italicspublic void setSize(float newSize, Source newSource)
public void setFace(java.lang.String newFace, Source newSource)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |