public final class PDFontDescriptor extends Object implements COSObjectable
Constructor and Description |
---|
PDFontDescriptor(COSDictionary desc)
Creates a PDFontDescriptor from a COS dictionary.
|
Modifier and Type | Method and Description |
---|---|
float |
getAscent()
This will get the ascent for the font.
|
float |
getAverageWidth()
This will get the average width for the font.
|
float |
getCapHeight()
This will get the CapHeight for the font.
|
String |
getCharSet()
This will get the character set for the font.
|
PDStream |
getCIDSet()
Get the CIDSet stream.
|
COSDictionary |
getCOSObject()
Convert this standard java object to a COS object.
|
float |
getDescent()
This will get the descent for the font.
|
int |
getFlags()
This will get the font flags.
|
PDRectangle |
getFontBoundingBox()
This will get the fonts bounding box.
|
String |
getFontFamily()
A string representing the preferred font family.
|
PDStream |
getFontFile()
A stream containing a Type 1 font program.
|
PDStream |
getFontFile2()
A stream containing a true type font program.
|
PDStream |
getFontFile3()
A stream containing a font program that is not true type or type 1.
|
String |
getFontName()
Get the font name.
|
String |
getFontStretch()
A string representing the preferred font stretch.
|
float |
getFontWeight()
The weight of the font.
|
float |
getItalicAngle()
This will get the italic angle for the font.
|
float |
getLeading()
This will get the leading for the font.
|
float |
getMaxWidth()
This will get the max width for the font.
|
float |
getMissingWidth()
This will get the missing width for the font from the /MissingWidth dictionary entry.
|
PDPanose |
getPanose()
Returns the Panose entry of the Style dictionary, if any.
|
float |
getStemH()
This will get the stemH for the font.
|
float |
getStemV()
This will get the stemV for the font.
|
float |
getXHeight()
This will get the x height for the font.
|
boolean |
hasMissingWidth()
Returns true if the missing widths entry is present in the font descriptor.
|
boolean |
hasWidths()
Returns true if widths are present in the font descriptor.
|
boolean |
isAllCap()
A convenience method that checks the flag bit.
|
boolean |
isFixedPitch()
A convenience method that checks the flag bit.
|
boolean |
isForceBold()
A convenience method that checks the flag bit.
|
boolean |
isItalic()
A convenience method that checks the flag bit.
|
boolean |
isNonSymbolic()
A convenience method that checks the flag bit.
|
boolean |
isScript()
A convenience method that checks the flag bit.
|
boolean |
isSerif()
A convenience method that checks the flag bit.
|
boolean |
isSmallCap()
A convenience method that checks the flag bit.
|
boolean |
isSymbolic()
A convenience method that checks the flag bit.
|
void |
setAllCap(boolean flag)
A convenience method that sets the flag bit.
|
void |
setAscent(float ascent)
This will set the ascent for the font.
|
void |
setAverageWidth(float averageWidth)
This will set the average width for the font.
|
void |
setCapHeight(float capHeight)
This will set the cap height for the font.
|
void |
setCharacterSet(String charSet)
This will set the character set for the font.
|
void |
setCIDSet(PDStream stream)
Set a stream containing a CIDSet.
|
void |
setDescent(float descent)
This will set the descent for the font.
|
void |
setFixedPitch(boolean flag)
A convenience method that sets the flag bit.
|
void |
setFlags(int flags)
This will set the font flags.
|
void |
setFontBoundingBox(PDRectangle rect)
Set the fonts bounding box.
|
void |
setFontFamily(String fontFamily)
This will set the font family.
|
void |
setFontFile(PDStream type1Stream)
Set the type 1 font program.
|
void |
setFontFile2(PDStream ttfStream)
Set the true type font program.
|
void |
setFontFile3(PDStream stream)
Set a stream containing a font program that is not true type or type 1.
|
void |
setFontName(String fontName)
This will set the font name.
|
void |
setFontStretch(String fontStretch)
This will set the font stretch.
|
void |
setFontWeight(float fontWeight)
Set the weight of the font.
|
void |
setForceBold(boolean flag)
A convenience method that sets the flag bit.
|
void |
setItalic(boolean flag)
A convenience method that sets the flag bit.
|
void |
setItalicAngle(float angle)
This will set the italic angle for the font.
|
void |
setLeading(float leading)
This will set the leading for the font.
|
void |
setMaxWidth(float maxWidth)
This will set the max width for the font.
|
void |
setMissingWidth(float missingWidth)
This will set the missing width for the font.
|
void |
setNonSymbolic(boolean flag)
A convenience method that sets the flag bit.
|
void |
setScript(boolean flag)
A convenience method that sets the flag bit.
|
void |
setSerif(boolean flag)
A convenience method that sets the flag bit.
|
void |
setSmallCap(boolean flag)
A convenience method that sets the flag bit.
|
void |
setStemH(float stemH)
This will set the stem H for the font.
|
void |
setStemV(float stemV)
This will set the stem V for the font.
|
void |
setSymbolic(boolean flag)
A convenience method that sets the flag bit.
|
void |
setXHeight(float xHeight)
This will set the x height for the font.
|
public PDFontDescriptor(COSDictionary desc)
desc
- The wrapped COS Dictionary.public boolean isFixedPitch()
public void setFixedPitch(boolean flag)
flag
- The flag value.public boolean isSerif()
public void setSerif(boolean flag)
flag
- The flag value.public boolean isSymbolic()
public void setSymbolic(boolean flag)
flag
- The flag value.public boolean isScript()
public void setScript(boolean flag)
flag
- The flag value.public boolean isNonSymbolic()
public void setNonSymbolic(boolean flag)
flag
- The flag value.public boolean isItalic()
public void setItalic(boolean flag)
flag
- The flag value.public boolean isAllCap()
public void setAllCap(boolean flag)
flag
- The flag value.public boolean isSmallCap()
public void setSmallCap(boolean flag)
flag
- The flag value.public boolean isForceBold()
public void setForceBold(boolean flag)
flag
- The flag value.public COSDictionary getCOSObject()
getCOSObject
in interface COSObjectable
public String getFontName()
public void setFontName(String fontName)
fontName
- The new name for the font.public String getFontFamily()
public void setFontFamily(String fontFamily)
fontFamily
- The font family.public float getFontWeight()
public void setFontWeight(float fontWeight)
fontWeight
- The new weight of the font.public String getFontStretch()
public void setFontStretch(String fontStretch)
fontStretch
- The new stretch for the font.public int getFlags()
public void setFlags(int flags)
flags
- The new font flags.public PDRectangle getFontBoundingBox()
public void setFontBoundingBox(PDRectangle rect)
rect
- The new bouding box.public float getItalicAngle()
public void setItalicAngle(float angle)
angle
- The new italic angle for the font.public float getAscent()
public void setAscent(float ascent)
ascent
- The new ascent for the font.public float getDescent()
public void setDescent(float descent)
descent
- The new descent for the font.public float getLeading()
public void setLeading(float leading)
leading
- The new leading for the font.public float getCapHeight()
public void setCapHeight(float capHeight)
capHeight
- The new cap height for the font.public float getXHeight()
public void setXHeight(float xHeight)
xHeight
- The new x height for the font.public float getStemV()
public void setStemV(float stemV)
stemV
- The new stem v for the font.public float getStemH()
public void setStemH(float stemH)
stemH
- The new stem h for the font.public float getAverageWidth()
public void setAverageWidth(float averageWidth)
averageWidth
- The new average width for the font.public float getMaxWidth()
public void setMaxWidth(float maxWidth)
maxWidth
- The new max width for the font.public boolean hasWidths()
public boolean hasMissingWidth()
public float getMissingWidth()
public void setMissingWidth(float missingWidth)
missingWidth
- The new missing width for the font.public String getCharSet()
public void setCharacterSet(String charSet)
charSet
- The new character set for the font.public PDStream getFontFile()
public void setFontFile(PDStream type1Stream)
type1Stream
- The type 1 stream.public PDStream getFontFile2()
public void setFontFile2(PDStream ttfStream)
ttfStream
- The true type stream.public PDStream getFontFile3()
public void setFontFile3(PDStream stream)
stream
- The font program stream.public PDStream getCIDSet()
public void setCIDSet(PDStream stream)
stream
- The font program stream.public PDPanose getPanose()
Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.