Class PDFSimpleFont
java.lang.Object
com.adobe.fontengine.font.FontData
com.adobe.fontengine.font.pdffont.PDFSimpleFont
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a subset for this font.Return the CacheSupportInfo that this font matchesEmulates the CoolType API CTFontDict:GetHorizontalMetrics CoolType API.boolean
Tell whether a font is monospaced.getEmbeddingPermission
(boolean wasEmbedded) getFXGFontDescription
(Platform platform, ULocale locale) Return the FXG descriptions for this font.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
Return the number of glyphs in this font.getPDFFontDescription
(Font font) getPlatformFontDescription
(Platform platform, ULocale locale) Return the platform descriptions for this font.Return the postscript descriptions that this font matches.Get a scaler for this font, using a specific scan converter.getSWFFont4Description
(boolean wasEmbedded) getSWFFontDescription
(boolean wasEmbedded) double
double
getXDCFontDescription
(Font font) boolean
Tell whether the font is symbolic.void
subsetAndStream
(Subset subset, 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 Details
-
PDFSimpleFont
public PDFSimpleFont(PDFSimpleFontValuesAccessor dataAccessor) throws InvalidFontException, UnsupportedFontException
-
-
Method Details
-
getCoolTypeProportionalRomanFromFontProperties
public boolean getCoolTypeProportionalRomanFromFontProperties()Tell whether a font is monospaced.- Specified by:
getCoolTypeProportionalRomanFromFontProperties
in classFontData
-
isSymbolic
Tell whether the font is symbolic.- Overrides:
isSymbolic
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getNumGlyphs
Description copied from class:FontData
Return the number of glyphs in this font.- Specified by:
getNumGlyphs
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getUnitsPerEmX
- Specified by:
getUnitsPerEmX
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getUnitsPerEmY
- Specified by:
getUnitsPerEmY
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getFontBBox
- Specified by:
getFontBBox
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getCoolTypeScript
- Specified by:
getCoolTypeScript
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getCoolTypeIdeoEmBox
- Specified by:
getCoolTypeIdeoEmBox
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getCoolTypeIcfBox
- Specified by:
getCoolTypeIcfBox
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getCoolTypeLineMetrics
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
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
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
- Specified by:
getPDFFontDescription
in classFontData
-
getXDCFontDescription
- Specified by:
getXDCFontDescription
in classFontData
-
createSubset
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, OutputStream out, boolean preserveROS) throws InvalidFontException, UnsupportedFontException, 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
- Parameters:
out
- the OutputStream to which the bytes are streamedpreserveROS
- tells whether to preserve the cid -> gid mapping- Throws:
InvalidFontException
UnsupportedFontException
IOException
-
getCacheSupportInfo
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, UnsupportedFontExceptionDescription 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
-