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 SubsetcreateSubset()Create a subset for this font.CacheSupportInfogetCacheSupportInfo()Return the CacheSupportInfo that this font matchesRectgetCoolTypeIcfBox()RectgetCoolTypeIdeoEmBox()LineMetricsgetCoolTypeLineMetrics()Emulates the CoolType API CTFontDict:GetHorizontalMetrics CoolType API.booleangetCoolTypeProportionalRomanFromFontProperties()Tell whether a font is monospaced.CoolTypeScriptgetCoolTypeScript()UnderlineMetricsgetCoolTypeUnderlineMetrics()PermissiongetEmbeddingPermission(boolean wasEmbedded)RectgetFontBBox()FXGFontDescription[]getFXGFontDescription(Platform platform, ULocale locale)Return the FXG descriptions for this font.RectgetGlyphBBox(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.intgetNumGlyphs()Return the number of glyphs in this font.PDFFontDescriptiongetPDFFontDescription(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.ScalergetScaler(ScanConverter c)Get a scaler for this font, using a specific scan converter.CatalogDescriptiongetSelectionDescription()SWFFont4DescriptiongetSWFFont4Description(boolean wasEmbedded)SWFFontDescriptiongetSWFFontDescription(boolean wasEmbedded)doublegetUnitsPerEmX()doublegetUnitsPerEmY()XDCFontDescriptiongetXDCFontDescription(Font font)booleanisSymbolic()Tell whether the font is symbolic.voidsubsetAndStream(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:
getCoolTypeProportionalRomanFromFontPropertiesin classFontData
-
isSymbolic
public boolean isSymbolic() throws UnsupportedFontException, InvalidFontExceptionTell whether the font is symbolic.- Overrides:
isSymbolicin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getNumGlyphs
public int getNumGlyphs() throws InvalidFontException, UnsupportedFontExceptionDescription copied from class:FontDataReturn the number of glyphs in this font.- Specified by:
getNumGlyphsin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getUnitsPerEmX
public double getUnitsPerEmX() throws UnsupportedFontException, InvalidFontException- Specified by:
getUnitsPerEmXin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getUnitsPerEmY
public double getUnitsPerEmY() throws UnsupportedFontException, InvalidFontException- Specified by:
getUnitsPerEmYin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getFontBBox
public Rect getFontBBox() throws InvalidFontException, UnsupportedFontException
- Specified by:
getFontBBoxin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getCoolTypeScript
public CoolTypeScript getCoolTypeScript() throws UnsupportedFontException, InvalidFontException
- Specified by:
getCoolTypeScriptin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getCoolTypeIdeoEmBox
public Rect getCoolTypeIdeoEmBox() throws UnsupportedFontException, InvalidFontException
- Specified by:
getCoolTypeIdeoEmBoxin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getCoolTypeIcfBox
public Rect getCoolTypeIcfBox() throws InvalidFontException, UnsupportedFontException
- Specified by:
getCoolTypeIcfBoxin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getCoolTypeLineMetrics
public LineMetrics getCoolTypeLineMetrics() throws UnsupportedFontException, InvalidFontException
Description copied from class:FontDataEmulates the CoolType API CTFontDict:GetHorizontalMetrics CoolType API.See also the
FontData.getLineMetrics()method.- Specified by:
getCoolTypeLineMetricsin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getCoolTypeUnderlineMetrics
public UnderlineMetrics getCoolTypeUnderlineMetrics() throws UnsupportedFontException, InvalidFontException
- Specified by:
getCoolTypeUnderlineMetricsin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getGlyphForChar
public int getGlyphForChar(int unicodeScalarValue) throws InvalidFontException, UnsupportedFontExceptionDescription 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
-
getGlyphBBox
public Rect getGlyphBBox(int gid) throws UnsupportedFontException, InvalidFontException
Description copied from class:FontDataGet the bounding box of a glyph. The returned value is in metric space.- Specified by:
getGlyphBBoxin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getGlyphOutline
public void getGlyphOutline(int gid, OutlineConsumer consumer) throws InvalidFontException, UnsupportedFontExceptionDescription 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, InvalidFontExceptionDescription copied from class:FontDataGet the horizontal advance of a glyph. The returned value is in metric space.- Specified by:
getHorizontalAdvancein classFontData- Throws:
InvalidGlyphExceptionUnsupportedFontExceptionInvalidFontException
-
getScaler
public Scaler getScaler(ScanConverter c) throws InvalidFontException, UnsupportedFontException
Description copied from class:FontDataGet a scaler for this font, using a specific scan converter.- Specified by:
getScalerin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getEmbeddingPermission
public Permission getEmbeddingPermission(boolean wasEmbedded) throws InvalidFontException, UnsupportedFontException
- Specified by:
getEmbeddingPermissionin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getPDFFontDescription
public PDFFontDescription getPDFFontDescription(Font font)
- Specified by:
getPDFFontDescriptionin classFontData
-
getXDCFontDescription
public XDCFontDescription getXDCFontDescription(Font font)
- Specified by:
getXDCFontDescriptionin classFontData
-
createSubset
public Subset createSubset() throws InvalidFontException, UnsupportedFontException
Description copied from class:FontDataCreate a subset for this font.- Specified by:
createSubsetin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
subsetAndStream
public void subsetAndStream(Subset subset, java.io.OutputStream out, boolean preserveROS) throws InvalidFontException, UnsupportedFontException, java.io.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 classFontDataout- the OutputStream to which the bytes are streamedpreserveROS- tells whether to preserve the cid -> gid mapping- Throws:
InvalidFontExceptionUnsupportedFontExceptionjava.io.IOException
-
getCacheSupportInfo
public CacheSupportInfo getCacheSupportInfo() throws InvalidFontException, UnsupportedFontException
Description copied from class:FontDataReturn the CacheSupportInfo that this font matches- Specified by:
getCacheSupportInfoin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getPostscriptFontDescription
public PostscriptFontDescription[] getPostscriptFontDescription() throws InvalidFontException, UnsupportedFontException
Description copied from class:FontDataReturn the postscript descriptions that this font matches.- Specified by:
getPostscriptFontDescriptionin 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
-
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
-
getSelectionDescription
public CatalogDescription getSelectionDescription() throws InvalidFontException, UnsupportedFontException
- Specified by:
getSelectionDescriptionin classFontData- Throws:
InvalidFontExceptionUnsupportedFontException
-
getSWFFontDescription
public SWFFontDescription getSWFFontDescription(boolean wasEmbedded) throws UnsupportedFontException, InvalidFontException
- Specified by:
getSWFFontDescriptionin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
getSWFFont4Description
public SWFFont4Description getSWFFont4Description(boolean wasEmbedded) throws UnsupportedFontException, InvalidFontException
- Specified by:
getSWFFont4Descriptionin classFontData- Throws:
UnsupportedFontExceptionInvalidFontException
-
-