Package com.sun.pdfview.font
Class BuiltinFont
- java.lang.Object
-
- com.sun.pdfview.font.PDFFont
-
- com.sun.pdfview.font.OutlineFont
-
- com.sun.pdfview.font.Type1Font
-
- com.sun.pdfview.font.BuiltinFont
-
public class BuiltinFont extends Type1Font
This class represents the 14 built-in fonts. It reads these fonts from files in the "res" directory, as specified in BaseNames.properties.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.sun.pdfview.font.Type1Font
Type1Font.PSParser
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String[]
baseFonts
the names of the 14 base fontsprivate static java.util.Map
fonts
the fonts themselvesprivate static java.lang.String[]
mappedFonts
fonts others (e.g.private static java.util.Properties
props
the properties file
-
Constructor Summary
Constructors Constructor Description BuiltinFont(java.lang.String baseFont, PDFObject fontObj)
Create a new Builtin object based on the name of a built-in font This must be the name of one of the 14 built-in fonts!BuiltinFont(java.lang.String baseFont, PDFObject fontObj, PDFFontDescriptor descriptor)
create a new BuiltingFont object based on a description of the font from the PDF file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
parseFont(java.lang.String baseFont)
Parse a font given only the name of a builtin font-
Methods inherited from class com.sun.pdfview.font.Type1Font
getOutline, getOutline, getWidth, parseFont
-
Methods inherited from class com.sun.pdfview.font.OutlineFont
getCharCount, getDefaultWidth, getFirstChar, getGlyph, getLastChar
-
Methods inherited from class com.sun.pdfview.font.PDFFont
equals, getBaseFont, getCachedGlyph, getDescriptor, getEncoding, getFont, getGlyphs, getSubtype, getUnicodeMap, hashCode, setBaseFont, setDescriptor, setEncoding, setSubtype, setUnicodeMap, toString
-
-
-
-
Field Detail
-
props
private static java.util.Properties props
the properties file
-
fonts
private static java.util.Map fonts
the fonts themselves
-
baseFonts
private static final java.lang.String[] baseFonts
the names of the 14 base fonts
-
mappedFonts
private static final java.lang.String[] mappedFonts
fonts others (e.g. Acrobad PDFWriter 3.02 for Windows) assume are there, even though they're not in the spec. Grrr... the format is
-
-
Constructor Detail
-
BuiltinFont
public BuiltinFont(java.lang.String baseFont, PDFObject fontObj) throws java.io.IOException
Create a new Builtin object based on the name of a built-in font This must be the name of one of the 14 built-in fonts!- Parameters:
baseFont
- the name of the font, from the PDF filefontObj
- the object containing font information- Throws:
java.io.IOException
-
BuiltinFont
public BuiltinFont(java.lang.String baseFont, PDFObject fontObj, PDFFontDescriptor descriptor) throws java.io.IOException
create a new BuiltingFont object based on a description of the font from the PDF file. Parse the description for key information and use that to generate an appropriate font.- Throws:
java.io.IOException
-
-