Class PDFSimpleFont
- java.lang.Object
-
- com.adobe.fontengine.font.FontData
-
- com.adobe.fontengine.font.pdffont.PDFSimpleFont
-
public final class PDFSimpleFont extends FontData
-
-
Constructor Summary
Constructors Constructor Description PDFSimpleFont(PDFSimpleFontValuesAccessor dataAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Subset
createSubset()
Create a subset for this font.CacheSupportInfo
getCacheSupportInfo()
Return the CacheSupportInfo that this font matchesRect
getCoolTypeIcfBox()
Rect
getCoolTypeIdeoEmBox()
LineMetrics
getCoolTypeLineMetrics()
Emulates the CoolType API CTFontDict:GetHorizontalMetrics CoolType API.boolean
getCoolTypeProportionalRomanFromFontProperties()
Tell whether a font is monospaced.CoolTypeScript
getCoolTypeScript()
UnderlineMetrics
getCoolTypeUnderlineMetrics()
Permission
getEmbeddingPermission(boolean wasEmbedded)
Rect
getFontBBox()
FXGFontDescription[]
getFXGFontDescription(Platform platform, ULocale locale)
Return the FXG descriptions for this font.Rect
getGlyphBBox(int gid)
Get the bounding box of a glyph.int
getGlyphForChar(int unicodeScalarValue)
Return the glyph to use to display a character.void
getGlyphOutline(int gid, OutlineConsumer consumer)
Send a glyph's outline to an OutlineConsumer.double
getHorizontalAdvance(int gid)
Get the horizontal advance of a glyph.int
getNumGlyphs()
Return the number of glyphs in this font.PDFFontDescription
getPDFFontDescription(Font font)
PlatformFontDescription[]
getPlatformFontDescription(Platform platform, ULocale locale)
Return the platform descriptions for this font.PostscriptFontDescription[]
getPostscriptFontDescription()
Return the postscript descriptions that this font matches.Scaler
getScaler(ScanConverter c)
Get a scaler for this font, using a specific scan converter.CatalogDescription
getSelectionDescription()
SWFFont4Description
getSWFFont4Description(boolean wasEmbedded)
SWFFontDescription
getSWFFontDescription(boolean wasEmbedded)
double
getUnitsPerEmX()
double
getUnitsPerEmY()
XDCFontDescription
getXDCFontDescription(Font font)
boolean
isSymbolic()
Tell whether the font is symbolic.void
subsetAndStream(Subset subset, java.io.OutputStream out, boolean preserveROS)
Subset and stream this font for PDF use.-
Methods inherited from class com.adobe.fontengine.font.FontData
getContainerFingerprint, getCoolTypeCapHeight, getCoolTypeFontBBox, getCoolTypeGlyphBBox, getCoolTypeGlyphForChar, getCoolTypeUnitsPerEm, getCoolTypeXHeight, getCSS20FontDescription, getLineMetrics, getPointSizeRange, getPreferredCSS20FontDescription, getScaler, hasCoolTypeProportionalRoman
-
-
-
-
Constructor Detail
-
PDFSimpleFont
public PDFSimpleFont(PDFSimpleFontValuesAccessor dataAccessor) throws InvalidFontException, UnsupportedFontException
-
-
Method Detail
-
getCoolTypeProportionalRomanFromFontProperties
public boolean getCoolTypeProportionalRomanFromFontProperties()
Tell whether a font is monospaced.- Specified by:
getCoolTypeProportionalRomanFromFontProperties
in classFontData
-
isSymbolic
public boolean isSymbolic() throws UnsupportedFontException, InvalidFontException
Tell whether the font is symbolic.- Overrides:
isSymbolic
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getNumGlyphs
public int getNumGlyphs() throws InvalidFontException, UnsupportedFontException
Description copied from class:FontData
Return the number of glyphs in this font.- Specified by:
getNumGlyphs
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getUnitsPerEmX
public double getUnitsPerEmX() throws UnsupportedFontException, InvalidFontException
- Specified by:
getUnitsPerEmX
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getUnitsPerEmY
public double getUnitsPerEmY() throws UnsupportedFontException, InvalidFontException
- Specified by:
getUnitsPerEmY
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getFontBBox
public Rect getFontBBox() throws InvalidFontException, UnsupportedFontException
- Specified by:
getFontBBox
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getCoolTypeScript
public CoolTypeScript getCoolTypeScript() throws UnsupportedFontException, InvalidFontException
- Specified by:
getCoolTypeScript
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getCoolTypeIdeoEmBox
public Rect getCoolTypeIdeoEmBox() throws UnsupportedFontException, InvalidFontException
- Specified by:
getCoolTypeIdeoEmBox
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getCoolTypeIcfBox
public Rect getCoolTypeIcfBox() throws InvalidFontException, UnsupportedFontException
- Specified by:
getCoolTypeIcfBox
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getCoolTypeLineMetrics
public LineMetrics getCoolTypeLineMetrics() throws UnsupportedFontException, InvalidFontException
Description copied from class:FontData
Emulates the CoolType API CTFontDict:GetHorizontalMetrics CoolType API.See also the
FontData.getLineMetrics()
method.- Specified by:
getCoolTypeLineMetrics
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getCoolTypeUnderlineMetrics
public UnderlineMetrics getCoolTypeUnderlineMetrics() throws UnsupportedFontException, InvalidFontException
- Specified by:
getCoolTypeUnderlineMetrics
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getGlyphForChar
public int getGlyphForChar(int unicodeScalarValue) throws InvalidFontException, UnsupportedFontException
Description copied from class:FontData
Return the glyph to use to display a character. Depending on the layout technology of the font, the returned gid may be further processed.- Specified by:
getGlyphForChar
in classFontData
- Parameters:
unicodeScalarValue
- the Unicode scalar value of the character; (by definition, surrogate code points are not Unicode scalar values).- Returns:
- the gid of the glyph to use
- Throws:
InvalidFontException
UnsupportedFontException
-
getGlyphBBox
public Rect getGlyphBBox(int gid) throws UnsupportedFontException, InvalidFontException
Description copied from class:FontData
Get the bounding box of a glyph. The returned value is in metric space.- Specified by:
getGlyphBBox
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getGlyphOutline
public void getGlyphOutline(int gid, OutlineConsumer consumer) throws InvalidFontException, UnsupportedFontException
Description copied from class:FontData
Send a glyph's outline to an OutlineConsumer.- Specified by:
getGlyphOutline
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getHorizontalAdvance
public double getHorizontalAdvance(int gid) throws InvalidGlyphException, UnsupportedFontException, InvalidFontException
Description copied from class:FontData
Get the horizontal advance of a glyph. The returned value is in metric space.- Specified by:
getHorizontalAdvance
in classFontData
- Throws:
InvalidGlyphException
UnsupportedFontException
InvalidFontException
-
getScaler
public Scaler getScaler(ScanConverter c) throws InvalidFontException, UnsupportedFontException
Description copied from class:FontData
Get a scaler for this font, using a specific scan converter.- Specified by:
getScaler
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getEmbeddingPermission
public Permission getEmbeddingPermission(boolean wasEmbedded) throws InvalidFontException, UnsupportedFontException
- Specified by:
getEmbeddingPermission
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getPDFFontDescription
public PDFFontDescription getPDFFontDescription(Font font)
- Specified by:
getPDFFontDescription
in classFontData
-
getXDCFontDescription
public XDCFontDescription getXDCFontDescription(Font font)
- Specified by:
getXDCFontDescription
in classFontData
-
createSubset
public Subset createSubset() throws InvalidFontException, UnsupportedFontException
Description copied from class:FontData
Create a subset for this font.- Specified by:
createSubset
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
subsetAndStream
public void subsetAndStream(Subset subset, java.io.OutputStream out, boolean preserveROS) throws InvalidFontException, UnsupportedFontException, java.io.IOException
Description copied from class:FontData
Subset and stream this font for PDF use. The stream is either a TrueType stream or a CID-keyed CFF stream.- Specified by:
subsetAndStream
in classFontData
out
- the OutputStream to which the bytes are streamedpreserveROS
- tells whether to preserve the cid -> gid mapping- Throws:
InvalidFontException
UnsupportedFontException
java.io.IOException
-
getCacheSupportInfo
public CacheSupportInfo getCacheSupportInfo() throws InvalidFontException, UnsupportedFontException
Description copied from class:FontData
Return the CacheSupportInfo that this font matches- Specified by:
getCacheSupportInfo
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getPostscriptFontDescription
public PostscriptFontDescription[] getPostscriptFontDescription() throws InvalidFontException, UnsupportedFontException
Description copied from class:FontData
Return the postscript descriptions that this font matches.- Specified by:
getPostscriptFontDescription
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getFXGFontDescription
public FXGFontDescription[] getFXGFontDescription(Platform platform, ULocale locale) throws InvalidFontException, UnsupportedFontException
Description copied from class:FontData
Return the FXG descriptions for this font.- Specified by:
getFXGFontDescription
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getPlatformFontDescription
public PlatformFontDescription[] getPlatformFontDescription(Platform platform, ULocale locale) throws InvalidFontException, UnsupportedFontException
Description copied from class:FontData
Return the platform descriptions for this font.- Specified by:
getPlatformFontDescription
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getSelectionDescription
public CatalogDescription getSelectionDescription() throws InvalidFontException, UnsupportedFontException
- Specified by:
getSelectionDescription
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getSWFFontDescription
public SWFFontDescription getSWFFontDescription(boolean wasEmbedded) throws UnsupportedFontException, InvalidFontException
- Specified by:
getSWFFontDescription
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getSWFFont4Description
public SWFFont4Description getSWFFont4Description(boolean wasEmbedded) throws UnsupportedFontException, InvalidFontException
- Specified by:
getSWFFont4Description
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
-