Package com.adobe.fontengine.font.cff
Class SyntheticFont
java.lang.Object
com.adobe.fontengine.font.FontData
com.adobe.fontengine.font.cff.CFFFont
com.adobe.fontengine.font.cff.SyntheticFont
-
Method Summary
Modifier and TypeMethodDescriptionCreate a subset for this font.Compute the IcfBox.Emulates the CoolType API CTFontDict:GetHorizontalMetrics CoolType API.getEmbeddingPermission
(boolean wasEmbedded) int
getGlyphCid
(int glyphID) Get the CID associated with glyphglyphID
.int
getGlyphForChar
(int usv) Return the glyph to use to display a character.getGlyphName
(int gid) Return the name of glyphgid
.void
getGlyphOutline
(int gid, OutlineConsumer consumer) Get the outline of glyphgid
.double
getHorizontalAdvance
(int gid) Get the horizontal advance of a glyph.int
Return the number of glyphs in this font.void
getOutline
(int gid, Type2OutlineParser parser, OutlineConsumer consumer) Return the outline of glyphgid
.getPDFFontDescription
(Font font) getROS()
Get the ROS associated with this font.double
getStemVForGlyph
(int gid) getXDCFontDescription
(Font font) void
stream
(OutputStream out, Integer fsType) void
subsetAndStream
(Subset subset, OutputStream out, boolean preserveROS, Integer fsType) Subset and stream this font for PDF use.Methods inherited from class com.adobe.fontengine.font.cff.CFFFont
getCacheSupportInfo, getCoolTypeProportionalRomanFromFontProperties, getCoolTypeScript, getCoolTypeUnderlineMetrics, getCoolTypeUnderlineMetrics, getCSSFamilyNames, getCSSStretchValue, getCSSWeight, getFXGFontDescription, getGlyphBBox, getName, getPlatformFontDescription, getPostscriptFontDescription, getPreferredCSSFamilyName, getScaler, getSelectionDescription, getSWFFont4Description, getSWFFontDescription, getUnitsPerEmX, getUnitsPerEmY, isCSSStyleItalic, isCSSStyleNormal, isCSSStyleOblique, isCSSVariantNormal, isCSSVariantSmallCaps, isFixedPitch, subsetAndStream
Methods inherited from class com.adobe.fontengine.font.FontData
getContainerFingerprint, getCoolTypeCapHeight, getCoolTypeFontBBox, getCoolTypeGlyphBBox, getCoolTypeGlyphForChar, getCoolTypeUnitsPerEm, getCoolTypeXHeight, getCSS20FontDescription, getLineMetrics, getPointSizeRange, getPreferredCSS20FontDescription, getScaler, hasCoolTypeProportionalRoman, isSymbolic
-
Method Details
-
createSubset
Create a subset for this font.- Specified by:
createSubset
in classFontData
- Throws:
UnsupportedFontException
-
getNumGlyphs
Description copied from class:FontData
Return the number of glyphs in this font.- Specified by:
getNumGlyphs
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getGlyphName
Return the name of glyphgid
.- Specified by:
getGlyphName
in classCFFFont
- Throws:
InvalidFontException
UnsupportedFontException
-
getROS
Description copied from class:CFFFont
Get the ROS associated with this font. If the font does not have an ROS, return null. -
getGlyphCid
Description copied from class:CFFFont
Get the CID associated with glyphglyphID
. Returns -1 if getROS() returns null.- Specified by:
getGlyphCid
in classCFFFont
- Returns:
- the CID in the ROS associated with the font.
- Throws:
InvalidFontException
UnsupportedFontException
-
getGlyphOutline
public void getGlyphOutline(int gid, OutlineConsumer consumer) throws InvalidFontException, UnsupportedFontException Get the outline of glyphgid
.- Specified by:
getGlyphOutline
in classCFFFont
- Parameters:
gid
- the glyph id of the glyphconsumer
- the OutlineConsumer to receive the outline- Throws:
InvalidFontException
UnsupportedFontException
-
getOutline
public void getOutline(int gid, Type2OutlineParser parser, OutlineConsumer consumer) throws InvalidFontException, UnsupportedFontException Return the outline of glyphgid
.- Specified by:
getOutline
in classCFFFont
- Throws:
InvalidFontException
UnsupportedFontException
-
getStemVForGlyph
- Specified by:
getStemVForGlyph
in classCFFFont
- Throws:
InvalidFontException
-
getFontMatrix
- Specified by:
getFontMatrix
in classCFFFont
-
getHorizontalAdvance
Get the horizontal advance of a glyph. The returned value is in metric space.- Specified by:
getHorizontalAdvance
in classCFFFont
- Throws:
InvalidFontException
UnsupportedFontException
-
getFontBBox
- Specified by:
getFontBBox
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
getCoolTypeRawFontBBox
-
getGlyphForChar
Description copied from class:CFFFont
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 classCFFFont
- Parameters:
usv
- 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
-
getCoolTypeLineMetrics
Emulates the CoolType API CTFontDict:GetHorizontalMetrics CoolType API.The metrics are expressed in the design space of the font, i.e. they need to be converted through the metrics matrix.
This methods never returns null.
See also the
FontData.getLineMetrics()
method.- Specified by:
getCoolTypeLineMetrics
in classFontData
- Throws:
UnsupportedFontException
InvalidFontException
-
getCoolTypeIdeoEmBox
- Overrides:
getCoolTypeIdeoEmBox
in classCFFFont
- Throws:
UnsupportedFontException
InvalidFontException
-
getCoolTypeIcfBox
Description copied from class:CFFFont
Compute the IcfBox. Various heuristics are applied until the IcfBox can be determined.- Overrides:
getCoolTypeIcfBox
in classCFFFont
- Throws:
UnsupportedFontException
InvalidFontException
-
getEmbeddingPermission
public Permission getEmbeddingPermission(boolean wasEmbedded) throws InvalidFontException, UnsupportedFontException - Specified by:
getEmbeddingPermission
in classFontData
- Throws:
InvalidFontException
UnsupportedFontException
-
subsetAndStream
public void subsetAndStream(Subset subset, OutputStream out, boolean preserveROS, Integer fsType) throws InvalidFontException, UnsupportedFontException Subset and stream this font for PDF use. The stream is a CID-keyed CFF stream.- Specified by:
subsetAndStream
in classCFFFont
- Parameters:
out
- the OutputStream to which the bytes are streamedfsType
- if non-null an integer as described in technote 5147 http://partners.adobe.com/public/developer/en/acrobat/sdk/FontPolicies.pdf "Font Embedding Guidelines for Adobe Third-party Developers".- Throws:
InvalidFontException
UnsupportedFontException
-
getPDFFontDescription
- Specified by:
getPDFFontDescription
in classFontData
-
getXDCFontDescription
- Specified by:
getXDCFontDescription
in classFontData
-
stream
- Specified by:
stream
in classCFFFont
- Throws:
UnsupportedFontException
-