Package com.sun.pdfview.font
Class PDFFontDescriptor
- java.lang.Object
-
- com.sun.pdfview.font.PDFFontDescriptor
-
public class PDFFontDescriptor extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intALLCAPFont contains no lowercase letters.private intascentHolds value of property ascent.private intavgWidthHolds value of property avgWidth.private intcapHeightHolds value of property capHeight.private PDFObjectcharSetHolds value of property charSet.private intdescentHolds value of property descent.static intFIXED_PITCHAll glyphs have the same width.private intflagsHolds value of property flags.private java.awt.geom.Rectangle2D.FloatfontBBoxHolds value of property fontBBox.private java.lang.StringfontFamilyHolds the optional FontFamily (PDF 1.5)private PDFObjectfontFileHolds value of property fontFile.private PDFObjectfontFile2Holds value of property fontFile2.private PDFObjectfontFile3Holds value of property fontFile3.private java.lang.StringfontNameHolds value of property fontName.private java.lang.StringfontStretchHolds the optional FontStretch (PDF 1.5)private intfontWeightHolds the optional FontWeight (PDF 1.5)static intFORCEBOLDDetermines whether bold glyphs shall be painted with extra pixels even at very small text sizes.static intITALICGlyphs have dominant vertical strokes that are slanted.private intitalicAngleHolds value of property italicAngle.private intleadingHolds value of property leading.private intmaxWidthHolds value of property maxWidth.private intmissingWidthHolds value of property misingWidth.static intNONSYMBOLICFont uses the Adobe standard Latic character set.static intSCRIPTGlyphs resemble cursive handwriting.static intSERIFGlyphs have serifs.static intSMALLCAPFont contains both uppercase and lowercase letters..private intstemHHolds value of property stemH.private intstemVHolds value of property stemV.static intSYMBOLICFont contains glyphs outside the Adobe standard Latin.private intxHeightHolds value of property xHeight.
-
Constructor Summary
Constructors Constructor Description PDFFontDescriptor(PDFObject obj)Creates a new instance of PDFFontDescriptorPDFFontDescriptor(java.lang.String basefont)Creates a new instance of PDFFontDescriptor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAscent()Getter for property ascent.intgetAvgWidth()Getter for property avgWidth.intgetCapHeight()Getter for property capHeight.PDFObjectgetCharSet()Getter for property charSet.intgetDescent()Getter for property descent.intgetFlags()Getter for property flags.java.awt.geom.Rectangle2D.FloatgetFontBBox()Getter for property fontBBox.java.lang.StringgetFontFamily()Getter for property fontFamily.PDFObjectgetFontFile()Getter for property fontFile.PDFObjectgetFontFile2()Getter for property fontFile2.PDFObjectgetFontFile3()Getter for property fontFile3.java.lang.StringgetFontName()Getter for property fontName.java.lang.StringgetFontStretch()Getter for property fontStretch.intgetFontWeight()Getter for property fontWeight.intgetItalicAngle()Getter for property italicAngle.intgetLeading()Getter for property leading.intgetMaxWidth()Getter for property maxWidth.intgetMissingWidth()Getter for property misingWidth.intgetStemH()Getter for property stemH.intgetStemV()Getter for property stemV.intgetXHeight()Getter for property xHeight.voidsetAscent(int ascent)Setter for property ascent.voidsetAvgWidth(int avgWidth)Setter for property avgWidth.voidsetCapHeight(int capHeight)Setter for property capHeight.voidsetCharSet(PDFObject charSet)Setter for property charSet.voidsetDescent(int descent)Setter for property descent.voidsetFlags(int flags)Setter for property flags.voidsetFontBBox(java.awt.geom.Rectangle2D.Float fontBBox)Setter for property fontBBox.voidsetFontFamily(java.lang.String fontFamily)Setter for property fontFamily.voidsetFontFile(PDFObject fontFile)Setter for property fontFile.voidsetFontFile2(PDFObject fontFile2)Setter for property fontFile2.voidsetFontFile3(PDFObject fontFile3)Setter for property fontFile3.voidsetFontName(java.lang.String fontName)Setter for property fontName.voidsetFontStretch(java.lang.String fontStretch)Setter for property fontStretch.voidsetFontWeight(int fontWeight)Setter for property fontWeight.voidsetItalicAngle(int italicAngle)Setter for property italicAngle.voidsetLeading(int leading)Setter for property leading.voidsetMaxWidth(int maxWidth)Setter for property maxWidth.voidsetMissingWidth(int missingWidth)Setter for property misingWidth.voidsetStemH(int stemH)Setter for property stemH.voidsetStemV(int stemV)Setter for property stemV.voidsetXHeight(int xHeight)Setter for property xHeight.
-
-
-
Field Detail
-
FIXED_PITCH
public static final int FIXED_PITCH
All glyphs have the same width.- See Also:
- Constant Field Values
-
SERIF
public static final int SERIF
Glyphs have serifs.- See Also:
- Constant Field Values
-
SYMBOLIC
public static final int SYMBOLIC
Font contains glyphs outside the Adobe standard Latin.- See Also:
- Constant Field Values
-
SCRIPT
public static final int SCRIPT
Glyphs resemble cursive handwriting.- See Also:
- Constant Field Values
-
NONSYMBOLIC
public static final int NONSYMBOLIC
Font uses the Adobe standard Latic character set.- See Also:
- Constant Field Values
-
ITALIC
public static final int ITALIC
Glyphs have dominant vertical strokes that are slanted.- See Also:
- Constant Field Values
-
ALLCAP
public static final int ALLCAP
Font contains no lowercase letters.- See Also:
- Constant Field Values
-
SMALLCAP
public static final int SMALLCAP
Font contains both uppercase and lowercase letters..- See Also:
- Constant Field Values
-
FORCEBOLD
public static final int FORCEBOLD
Determines whether bold glyphs shall be painted with extra pixels even at very small text sizes.- See Also:
- Constant Field Values
-
ascent
private int ascent
Holds value of property ascent.
-
capHeight
private int capHeight
Holds value of property capHeight.
-
descent
private int descent
Holds value of property descent.
-
flags
private int flags
Holds value of property flags.
-
fontFamily
private java.lang.String fontFamily
Holds the optional FontFamily (PDF 1.5)
-
fontName
private java.lang.String fontName
Holds value of property fontName.
-
fontStretch
private java.lang.String fontStretch
Holds the optional FontStretch (PDF 1.5)
-
fontWeight
private int fontWeight
Holds the optional FontWeight (PDF 1.5)
-
italicAngle
private int italicAngle
Holds value of property italicAngle.
-
stemV
private int stemV
Holds value of property stemV.
-
avgWidth
private int avgWidth
Holds value of property avgWidth.
-
fontFile
private PDFObject fontFile
Holds value of property fontFile.
-
fontFile2
private PDFObject fontFile2
Holds value of property fontFile2.
-
fontFile3
private PDFObject fontFile3
Holds value of property fontFile3.
-
leading
private int leading
Holds value of property leading.
-
maxWidth
private int maxWidth
Holds value of property maxWidth.
-
missingWidth
private int missingWidth
Holds value of property misingWidth.
-
stemH
private int stemH
Holds value of property stemH.
-
xHeight
private int xHeight
Holds value of property xHeight.
-
charSet
private PDFObject charSet
Holds value of property charSet.
-
fontBBox
private java.awt.geom.Rectangle2D.Float fontBBox
Holds value of property fontBBox.
-
-
Constructor Detail
-
PDFFontDescriptor
public PDFFontDescriptor(java.lang.String basefont)
Creates a new instance of PDFFontDescriptor
-
PDFFontDescriptor
public PDFFontDescriptor(PDFObject obj) throws java.io.IOException
Creates a new instance of PDFFontDescriptor- Throws:
java.io.IOException
-
-
Method Detail
-
getAscent
public int getAscent()
Getter for property ascent.- Returns:
- Value of property ascent.
-
setAscent
public void setAscent(int ascent)
Setter for property ascent.- Parameters:
ascent- New value of property ascent.
-
getCapHeight
public int getCapHeight()
Getter for property capHeight.- Returns:
- Value of property capHeight.
-
setCapHeight
public void setCapHeight(int capHeight)
Setter for property capHeight.- Parameters:
capHeight- New value of property capHeight.
-
getDescent
public int getDescent()
Getter for property descent.- Returns:
- Value of property descent.
-
setDescent
public void setDescent(int descent)
Setter for property descent.- Parameters:
descent- New value of property descent.
-
getFlags
public int getFlags()
Getter for property flags.- Returns:
- Value of property flags.
-
setFlags
public void setFlags(int flags)
Setter for property flags.- Parameters:
flags- New value of property flags.
-
getFontFamily
public java.lang.String getFontFamily()
Getter for property fontFamily. Option (PDF 1.5)- Returns:
- Value of the property fontFamily
-
setFontFamily
public void setFontFamily(java.lang.String fontFamily)
Setter for property fontFamily.- Parameters:
fontFamily- New value of property fontFamily.
-
getFontName
public java.lang.String getFontName()
Getter for property fontName.- Returns:
- Value of property fontName.
-
setFontName
public void setFontName(java.lang.String fontName)
Setter for property fontName.- Parameters:
fontName- New value of property fontName.
-
getFontStretch
public java.lang.String getFontStretch()
Getter for property fontStretch. Option (PDF 1.5)- Returns:
- Value of the property fontStretch
-
setFontStretch
public void setFontStretch(java.lang.String fontStretch)
Setter for property fontStretch. Possible values are: UltraCondensed, ExtraCondensed, Condensed, SemiCondensed, Normal, SemiExpanded, Expanded, ExtraExpanded or UltraExpanded We do not check at this time.- Parameters:
fontStretch- New value of property fontStretch.
-
getFontWeight
public int getFontWeight()
Getter for property fontWeight. Option (PDF 1.5)- Returns:
- Value of the property fontWeight
-
setFontWeight
public void setFontWeight(int fontWeight)
Setter for property fontWeight. Possible values are: 100, 200, 300, 400, 500, 600, 700, 800, 900 We do not check at this time.- Parameters:
fontWeight- New value of property fontWeight.
-
getItalicAngle
public int getItalicAngle()
Getter for property italicAngle.- Returns:
- Value of property italicAngle.
-
setItalicAngle
public void setItalicAngle(int italicAngle)
Setter for property italicAngle.- Parameters:
italicAngle- New value of property italicAngle.
-
getStemV
public int getStemV()
Getter for property stemV.- Returns:
- Value of property stemV.
-
setStemV
public void setStemV(int stemV)
Setter for property stemV.- Parameters:
stemV- New value of property stemV.
-
getAvgWidth
public int getAvgWidth()
Getter for property avgWidth.- Returns:
- Value of property avgWidth.
-
setAvgWidth
public void setAvgWidth(int avgWidth)
Setter for property avgWidth.- Parameters:
avgWidth- New value of property avgWidth.
-
getFontFile
public PDFObject getFontFile()
Getter for property fontFile.- Returns:
- Value of property fontFile.
-
setFontFile
public void setFontFile(PDFObject fontFile)
Setter for property fontFile.- Parameters:
fontFile- New value of property fontFile.
-
getFontFile2
public PDFObject getFontFile2()
Getter for property fontFile2.- Returns:
- Value of property fontFile2.
-
setFontFile2
public void setFontFile2(PDFObject fontFile2)
Setter for property fontFile2.- Parameters:
fontFile2- New value of property fontFile2.
-
getFontFile3
public PDFObject getFontFile3()
Getter for property fontFile3.- Returns:
- Value of property fontFile3.
-
setFontFile3
public void setFontFile3(PDFObject fontFile3)
Setter for property fontFile3.- Parameters:
fontFile3- New value of property fontFile3.
-
getLeading
public int getLeading()
Getter for property leading.- Returns:
- Value of property leading.
-
setLeading
public void setLeading(int leading)
Setter for property leading.- Parameters:
leading- New value of property leading.
-
getMaxWidth
public int getMaxWidth()
Getter for property maxWidth.- Returns:
- Value of property maxWidth.
-
setMaxWidth
public void setMaxWidth(int maxWidth)
Setter for property maxWidth.- Parameters:
maxWidth- New value of property maxWidth.
-
getMissingWidth
public int getMissingWidth()
Getter for property misingWidth.- Returns:
- Value of property misingWidth.
-
setMissingWidth
public void setMissingWidth(int missingWidth)
Setter for property misingWidth.- Parameters:
missingWidth- New value of property misingWidth.
-
getStemH
public int getStemH()
Getter for property stemH.- Returns:
- Value of property stemH.
-
setStemH
public void setStemH(int stemH)
Setter for property stemH.- Parameters:
stemH- New value of property stemH.
-
getXHeight
public int getXHeight()
Getter for property xHeight.- Returns:
- Value of property xHeight.
-
setXHeight
public void setXHeight(int xHeight)
Setter for property xHeight.- Parameters:
xHeight- New value of property xHeight.
-
getCharSet
public PDFObject getCharSet()
Getter for property charSet.- Returns:
- Value of property charSet.
-
setCharSet
public void setCharSet(PDFObject charSet)
Setter for property charSet.- Parameters:
charSet- New value of property charSet.
-
getFontBBox
public java.awt.geom.Rectangle2D.Float getFontBBox()
Getter for property fontBBox.- Returns:
- Value of property fontBBox.
-
setFontBBox
public void setFontBBox(java.awt.geom.Rectangle2D.Float fontBBox)
Setter for property fontBBox.- Parameters:
fontBBox- New value of property fontBBox.
-
-