This class represents an interface to the font description. This will depend
on the font type for the actual implementation. If it is a AFM/cmap/or embedded font.
Method from org.apache.pdfbox.pdmodel.font.PDFontDescriptor Detail: |
abstract public float getAscent()
This will get the ascent for the font. |
abstract public float getAverageWidth() throws IOException
This will get the average width for the font. This is part of the
definition in the font description. If it is not present then PDFBox
will make an attempt to calculate it. |
abstract public float getCapHeight()
This will get the CapHeight for the font. |
abstract public String getCharSet()
This will get the character set for the font. |
abstract public float getDescent()
This will get the descent for the font. |
abstract public int getFlags()
This will get the font flags. |
abstract public PDRectangle getFontBoundingBox()
This will get the fonts bouding box. |
abstract public String getFontFamily()
A string representing the preferred font family. |
abstract public String getFontName()
|
abstract public String getFontStretch()
A string representing the preferred font stretch.
According to the PDF Spec:
The font stretch value; it must be one of the following (ordered from
narrowest to widest): UltraCondensed, ExtraCondensed, Condensed, SemiCondensed,
Normal, SemiExpanded, Expanded, ExtraExpanded or UltraExpanded. |
abstract public float getFontWeight()
The weight of the font. According to the PDF spec "possible values are
100, 200, 300, 400, 500, 600, 700, 800 or 900" Where a higher number is
more weight and appears to be more bold. |
abstract public float getItalicAngle()
This will get the italic angle for the font. |
abstract public float getLeading()
This will get the leading for the font. |
abstract public float getMaxWidth()
This will get the max width for the font. |
abstract public float getStemH()
This will get the stemH for the font. |
abstract public float getStemV()
This will get the stemV for the font. |
abstract public float getXHeight()
This will get the x height for the font. |
public boolean isAllCap() {
return isFlagBitOn( FLAG_ALL_CAP);
}
A convenience method that checks the flag bit. |
public boolean isFixedPitch() {
return isFlagBitOn( FLAG_FIXED_PITCH );
}
A convenience method that checks the flag bit. |
public boolean isForceBold() {
return isFlagBitOn( FLAG_FORCE_BOLD );
}
A convenience method that checks the flag bit. |
public boolean isItalic() {
return isFlagBitOn( FLAG_ITALIC );
}
A convenience method that checks the flag bit. |
public boolean isNonSymbolic() {
return isFlagBitOn( FLAG_NON_SYMBOLIC );
}
A convenience method that checks the flag bit. |
public boolean isScript() {
return isFlagBitOn( FLAG_SCRIPT );
}
A convenience method that checks the flag bit. |
public boolean isSerif() {
return isFlagBitOn( FLAG_SERIF );
}
A convenience method that checks the flag bit. |
public boolean isSmallCap() {
return isFlagBitOn( FLAG_SMALL_CAP );
}
A convenience method that checks the flag bit. |
public boolean isSymbolic() {
return isFlagBitOn( FLAG_SYMBOLIC );
}
A convenience method that checks the flag bit. |
public void setAllCap(boolean flag) {
setFlagBit( FLAG_ALL_CAP, flag );
}
A convenience method that sets the flag bit. |
abstract public void setAscent(float ascent)
This will set the ascent for the font. |
abstract public void setAverageWidth(float averageWidth)
This will set the average width for the font. |
abstract public void setCapHeight(float capHeight)
This will set the cap height for the font. |
abstract public void setCharacterSet(String charSet)
This will set the character set for the font. |
abstract public void setDescent(float descent)
This will set the descent for the font. |
public void setFixedPitch(boolean flag) {
setFlagBit( FLAG_FIXED_PITCH, flag );
}
A convenience method that sets the flag bit. |
abstract public void setFlags(int flags)
This will set the font flags. |
abstract public void setFontBoundingBox(PDRectangle rect)
Set the fonts bounding box. |
abstract public void setFontFamily(String fontFamily)
This will set the font family. |
abstract public void setFontName(String fontName)
This will set the font name. |
abstract public void setFontStretch(String fontStretch)
This will set the font stretch. |
abstract public void setFontWeight(float fontWeight)
Set the weight of the font. |
public void setForceBold(boolean flag) {
setFlagBit( FLAG_FORCE_BOLD, flag );
}
A convenience method that sets the flag bit. |
public void setItalic(boolean flag) {
setFlagBit( FLAG_ITALIC, flag );
}
A convenience method that sets the flag bit. |
abstract public void setItalicAngle(float angle)
This will set the italic angle for the font. |
abstract public void setLeading(float leading)
This will set the leading for the font. |
abstract public void setMaxWidth(float maxWidth)
This will set the max width for the font. |
public void setNonSymbolic(boolean flag) {
setFlagBit( FLAG_NON_SYMBOLIC, flag );
}
A convenience method that sets the flag bit. |
public void setScript(boolean flag) {
setFlagBit( FLAG_SCRIPT, flag );
}
A convenience method that sets the flag bit. |
public void setSerif(boolean flag) {
setFlagBit( FLAG_SERIF, flag );
}
A convenience method that sets the flag bit. |
public void setSmallCap(boolean flag) {
setFlagBit( FLAG_SMALL_CAP, flag );
}
A convenience method that sets the flag bit. |
abstract public void setStemH(float stemH)
This will set the stem H for the font. |
abstract public void setStemV(float stemV)
This will set the stem V for the font. |
public void setSymbolic(boolean flag) {
setFlagBit( FLAG_SYMBOLIC, flag );
}
A convenience method that sets the flag bit. |
abstract public void setXHeight(float xHeight)
This will set the x height for the font. |