Package com.adobe.fontengine.font
Class WrapperFontData
java.lang.Object
com.adobe.fontengine.font.FontData
com.adobe.fontengine.font.WrapperFontData
- Direct Known Subclasses:
ResourceFontData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a subset for this font.boolean
Return the CacheSupportInfo that this font matchesbyte[]
double
Returns the CoolTypeCapHeight of this font.getCoolTypeGlyphBBox
(int glyphID) int
getCoolTypeGlyphForChar
(int unicodeScalarValue) Return the glyph used by CoolType for a character.Emulates the CoolType API CTFontDict:GetHorizontalMetrics CoolType API.boolean
double
double
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.Return the line metrics for this font.int
Return the number of glyphs in this font.getPDFFontDescription
(Font font) getPlatformFontDescription
(Platform platform, ULocale locale) Return the platform descriptions for this font.double[]
Return the range of point sizes for which this font has been designed.Return the postscript descriptions that this font matches.Get a scaler for this font.Get a scaler for this font, using a specific scan converter.getSWFFont4Description
(boolean wasEmbedded) getSWFFontDescription
(boolean wasEmbedded) double
double
getXDCFontDescription
(Font font) boolean
Determines whether a font has proportional roman, as defined by CoolType.int
hashCode()
boolean
Tell whether this font is symbolic.void
subsetAndStream
(Subset subset, OutputStream out, boolean preserveROS) Subset and stream this font for PDF use.toString()
-
Constructor Details
-
WrapperFontData
-
-
Method Details
-
getFontData
-
createSubset
Description copied from class:FontData
Create a subset for this font.- Specified by:
createSubset
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
equals
-
getContainerFingerprint
public byte[] getContainerFingerprint()- Overrides:
getContainerFingerprint
in classFontData
-
getCoolTypeCapHeight
Description copied from class:FontData
Returns the CoolTypeCapHeight of this font.- Overrides:
getCoolTypeCapHeight
in classFontData
- Returns:
- Double.NaN if the value cannot be determined
- Throws:
UnsupportedFontException
InvalidFontException
-
getCoolTypeFontBBox
- Overrides:
getCoolTypeFontBBox
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getCoolTypeGlyphBBox
- Overrides:
getCoolTypeGlyphBBox
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getCoolTypeGlyphForChar
public int getCoolTypeGlyphForChar(int unicodeScalarValue) throws InvalidFontException, UnsupportedFontException Description copied from class:FontData
Return the glyph used by CoolType for a character. This is slightly different from getGlyphForChar, and intend to be closer to the behavior of CoolType. The main use of this version is for other functions that emulate CoolType, such as the methods that compute metrics based on the charateristics of some glyphs. In most font types, this is the same as getGlyphForChar, so we provide a default implementation here.- Overrides:
getCoolTypeGlyphForChar
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getCoolTypeIcfBox
- Specified by:
getCoolTypeIcfBox
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getCoolTypeIdeoEmBox
- Specified by:
getCoolTypeIdeoEmBox
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
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
-
getCoolTypeProportionalRomanFromFontProperties
- Specified by:
getCoolTypeProportionalRomanFromFontProperties
in classFontData
- Throws:
InvalidFontException
-
getCoolTypeScript
- Specified by:
getCoolTypeScript
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getCoolTypeUnderlineMetrics
public UnderlineMetrics getCoolTypeUnderlineMetrics() throws UnsupportedFontException, InvalidFontException- Specified by:
getCoolTypeUnderlineMetrics
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getCoolTypeUnitsPerEm
- Overrides:
getCoolTypeUnitsPerEm
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getCoolTypeXHeight
- Overrides:
getCoolTypeXHeight
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getCSS20FontDescription
public CSS20FontDescription[] getCSS20FontDescription() throws InvalidFontException, UnsupportedFontException- Overrides:
getCSS20FontDescription
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getEmbeddingPermission
public Permission getEmbeddingPermission(boolean wasEmbedded) throws InvalidFontException, UnsupportedFontException - Specified by:
getEmbeddingPermission
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getFontBBox
- Specified by:
getFontBBox
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
-
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
-
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
-
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
-
getLineMetrics
Description copied from class:FontData
Return the line metrics for this font.Some font formats do not support the notion of line metrics, and in those cases, this method returns null.
See also the
FontData.getCoolTypeLineMetrics()
method.- Overrides:
getLineMetrics
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
-
getPDFFontDescription
public PDFFontDescription getPDFFontDescription(Font font) throws UnsupportedFontException, InvalidFontException - Specified by:
getPDFFontDescription
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
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
-
getPointSizeRange
Description copied from class:FontData
Return the range of point sizes for which this font has been designed.- Overrides:
getPointSizeRange
in classFontData
- Returns:
- an array with exactly two elements. The first is the smallest intended point size (inclusive), the second is the largest intended point size (exclusive). Both numbers are in decipoints.
- 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
-
getPreferredCSS20FontDescription
public CSS20FontDescription getPreferredCSS20FontDescription() throws InvalidFontException, UnsupportedFontException- Overrides:
getPreferredCSS20FontDescription
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getScaler
Description copied from class:FontData
Get a scaler for this font. This scaler uses to the most appropriate scan converter for the font.- Overrides:
getScaler
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
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
-
getSelectionDescription
public CatalogDescription getSelectionDescription() throws InvalidFontException, UnsupportedFontException- Specified by:
getSelectionDescription
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getSWFFont4Description
public SWFFont4Description getSWFFont4Description(boolean wasEmbedded) throws UnsupportedFontException, InvalidFontException - Specified by:
getSWFFont4Description
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getSWFFontDescription
public SWFFontDescription getSWFFontDescription(boolean wasEmbedded) throws UnsupportedFontException, InvalidFontException - Specified by:
getSWFFontDescription
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getUnitsPerEmX
- Specified by:
getUnitsPerEmX
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getUnitsPerEmY
- Specified by:
getUnitsPerEmY
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getXDCFontDescription
public XDCFontDescription getXDCFontDescription(Font font) throws UnsupportedFontException, InvalidFontException - Specified by:
getXDCFontDescription
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
hasCoolTypeProportionalRoman
Description copied from class:FontData
Determines whether a font has proportional roman, as defined by CoolType.- Overrides:
hasCoolTypeProportionalRoman
in classFontData
- Returns:
- whether the font is proportional
- Throws:
InvalidFontException
UnsupportedFontException
-
hashCode
public int hashCode() -
isSymbolic
Description copied from class:FontData
Tell whether this font is symbolic.- Overrides:
isSymbolic
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
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
-
toString
-
getCacheSupportInfo
Description copied from class:FontData
Return the CacheSupportInfo that this font matches- Specified by:
getCacheSupportInfo
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-