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.booleanReturn the CacheSupportInfo that this font matchesbyte[]doubleReturns the CoolTypeCapHeight of this font.getCoolTypeGlyphBBox(int glyphID) intgetCoolTypeGlyphForChar(int unicodeScalarValue) Return the glyph used by CoolType for a character.Emulates the CoolType API CTFontDict:GetHorizontalMetrics CoolType API.booleandoubledoublegetEmbeddingPermission(boolean wasEmbedded) getFXGFontDescription(Platform platform, ULocale locale) Return the FXG descriptions for this font.getGlyphBBox(int gid) Get the bounding box of a glyph.intgetGlyphForChar(int unicodeScalarValue) Return the glyph to use to display a character.voidgetGlyphOutline(int gid, OutlineConsumer consumer) Send a glyph's outline to an OutlineConsumer.doublegetHorizontalAdvance(int gid) Get the horizontal advance of a glyph.Return the line metrics for this font.intReturn 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) doubledoublegetXDCFontDescription(Font font) booleanDetermines whether a font has proportional roman, as defined by CoolType.inthashCode()booleanTell whether this font is symbolic.voidsubsetAndStream(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:FontDataCreate a subset for this font.- Specified by:
createSubsetin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
equals
-
getContainerFingerprint
public byte[] getContainerFingerprint()- Overrides:
getContainerFingerprintin classFontData
-
getCoolTypeCapHeight
Description copied from class:FontDataReturns the CoolTypeCapHeight of this font.- Overrides:
getCoolTypeCapHeightin classFontData- Returns:
- Double.NaN if the value cannot be determined
- Throws:
UnsupportedFontExceptionInvalidFontException
-
getCoolTypeFontBBox
- Overrides:
getCoolTypeFontBBoxin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getCoolTypeGlyphBBox
- Overrides:
getCoolTypeGlyphBBoxin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getCoolTypeGlyphForChar
public int getCoolTypeGlyphForChar(int unicodeScalarValue) throws InvalidFontException, UnsupportedFontException Description copied from class:FontDataReturn 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:
getCoolTypeGlyphForCharin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getCoolTypeIcfBox
- Specified by:
getCoolTypeIcfBoxin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getCoolTypeIdeoEmBox
- Specified by:
getCoolTypeIdeoEmBoxin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getCoolTypeLineMetrics
Description copied from class:FontDataEmulates the CoolType API CTFontDict:GetHorizontalMetrics CoolType API.See also the
FontData.getLineMetrics()method.- Specified by:
getCoolTypeLineMetricsin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getCoolTypeProportionalRomanFromFontProperties
- Specified by:
getCoolTypeProportionalRomanFromFontPropertiesin classFontData- Throws:
InvalidFontException
-
getCoolTypeScript
- Specified by:
getCoolTypeScriptin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getCoolTypeUnderlineMetrics
public UnderlineMetrics getCoolTypeUnderlineMetrics() throws UnsupportedFontException, InvalidFontException- Specified by:
getCoolTypeUnderlineMetricsin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getCoolTypeUnitsPerEm
- Overrides:
getCoolTypeUnitsPerEmin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getCoolTypeXHeight
- Overrides:
getCoolTypeXHeightin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getCSS20FontDescription
public CSS20FontDescription[] getCSS20FontDescription() throws InvalidFontException, UnsupportedFontException- Overrides:
getCSS20FontDescriptionin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getEmbeddingPermission
public Permission getEmbeddingPermission(boolean wasEmbedded) throws InvalidFontException, UnsupportedFontException - Specified by:
getEmbeddingPermissionin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getFontBBox
- Specified by:
getFontBBoxin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getFXGFontDescription
public FXGFontDescription[] getFXGFontDescription(Platform platform, ULocale locale) throws InvalidFontException, UnsupportedFontException Description copied from class:FontDataReturn the FXG descriptions for this font.- Specified by:
getFXGFontDescriptionin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getGlyphBBox
Description copied from class:FontDataGet the bounding box of a glyph. The returned value is in metric space.- Specified by:
getGlyphBBoxin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getGlyphForChar
public int getGlyphForChar(int unicodeScalarValue) throws InvalidFontException, UnsupportedFontException Description copied from class:FontDataReturn 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:
getGlyphForCharin 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:
InvalidFontExceptionUnsupportedFontException
-
getGlyphOutline
public void getGlyphOutline(int gid, OutlineConsumer consumer) throws InvalidFontException, UnsupportedFontException Description copied from class:FontDataSend a glyph's outline to an OutlineConsumer.- Specified by:
getGlyphOutlinein classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getHorizontalAdvance
public double getHorizontalAdvance(int gid) throws InvalidGlyphException, UnsupportedFontException, InvalidFontException Description copied from class:FontDataGet the horizontal advance of a glyph. The returned value is in metric space.- Specified by:
getHorizontalAdvancein classFontData- Throws:
InvalidGlyphExceptionUnsupportedFontExceptionInvalidFontException
-
getLineMetrics
Description copied from class:FontDataReturn 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:
getLineMetricsin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getNumGlyphs
Description copied from class:FontDataReturn the number of glyphs in this font.- Specified by:
getNumGlyphsin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getPDFFontDescription
public PDFFontDescription getPDFFontDescription(Font font) throws UnsupportedFontException, InvalidFontException - Specified by:
getPDFFontDescriptionin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getPlatformFontDescription
public PlatformFontDescription[] getPlatformFontDescription(Platform platform, ULocale locale) throws InvalidFontException, UnsupportedFontException Description copied from class:FontDataReturn the platform descriptions for this font.- Specified by:
getPlatformFontDescriptionin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getPointSizeRange
Description copied from class:FontDataReturn the range of point sizes for which this font has been designed.- Overrides:
getPointSizeRangein 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:
InvalidFontExceptionUnsupportedFontException
-
getPostscriptFontDescription
public PostscriptFontDescription[] getPostscriptFontDescription() throws InvalidFontException, UnsupportedFontExceptionDescription copied from class:FontDataReturn the postscript descriptions that this font matches.- Specified by:
getPostscriptFontDescriptionin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getPreferredCSS20FontDescription
public CSS20FontDescription getPreferredCSS20FontDescription() throws InvalidFontException, UnsupportedFontException- Overrides:
getPreferredCSS20FontDescriptionin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getScaler
Description copied from class:FontDataGet a scaler for this font. This scaler uses to the most appropriate scan converter for the font.- Overrides:
getScalerin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getScaler
Description copied from class:FontDataGet a scaler for this font, using a specific scan converter.- Specified by:
getScalerin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getSelectionDescription
public CatalogDescription getSelectionDescription() throws InvalidFontException, UnsupportedFontException- Specified by:
getSelectionDescriptionin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getSWFFont4Description
public SWFFont4Description getSWFFont4Description(boolean wasEmbedded) throws UnsupportedFontException, InvalidFontException - Specified by:
getSWFFont4Descriptionin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getSWFFontDescription
public SWFFontDescription getSWFFontDescription(boolean wasEmbedded) throws UnsupportedFontException, InvalidFontException - Specified by:
getSWFFontDescriptionin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getUnitsPerEmX
- Specified by:
getUnitsPerEmXin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getUnitsPerEmY
- Specified by:
getUnitsPerEmYin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getXDCFontDescription
public XDCFontDescription getXDCFontDescription(Font font) throws UnsupportedFontException, InvalidFontException - Specified by:
getXDCFontDescriptionin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
hasCoolTypeProportionalRoman
Description copied from class:FontDataDetermines whether a font has proportional roman, as defined by CoolType.- Overrides:
hasCoolTypeProportionalRomanin classFontData- Returns:
- whether the font is proportional
- Throws:
InvalidFontExceptionUnsupportedFontException
-
hashCode
public int hashCode() -
isSymbolic
Description copied from class:FontDataTell whether this font is symbolic.- Overrides:
isSymbolicin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
subsetAndStream
public void subsetAndStream(Subset subset, OutputStream out, boolean preserveROS) throws InvalidFontException, UnsupportedFontException, IOException Description copied from class:FontDataSubset and stream this font for PDF use. The stream is either a TrueType stream or a CID-keyed CFF stream.- Specified by:
subsetAndStreamin classFontData- Parameters:
out- the OutputStream to which the bytes are streamedpreserveROS- tells whether to preserve the cid -> gid mapping- Throws:
InvalidFontExceptionUnsupportedFontExceptionIOException
-
toString
-
getCacheSupportInfo
Description copied from class:FontDataReturn the CacheSupportInfo that this font matches- Specified by:
getCacheSupportInfoin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-